/[MITgcm]/MITgcm/verification/adjustment.128x64x1/input/gendata.m
ViewVC logotype

Diff of /MITgcm/verification/adjustment.128x64x1/input/gendata.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by adcroft, Tue Apr 3 17:50:14 2001 UTC revision 1.2 by adcroft, Tue May 29 14:01:41 2001 UTC
# Line 0  Line 1 
1    nx=128;ny=64;                                   % Grid dimensions
2    
3    radi=30;                                        % Radius of patch
4    deltaPs=100;                                    % Amplitude
5    
6    x=(0.5:nx)/nx*360;                              %  0  < x < 360
7    y=(0.5:ny)/ny*180-90;                           % -90 < y < +90
8    [X,Y]=ndgrid(x,y);
9    
10    h=deltaPs*0.5*(1-cos(max(Y-90+radi,0*Y)/radi*pi));      % Horizontal structure
11    h=h*deltaPs/max(max(abs(h)));           % Re-scale to give max val
12    
13    fid=fopen('ps.init','w','b');
14    fwrite(fid,h,'real*8');
15    fclose(fid);

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.22