/[MITgcm]/MITgcm/verification/front_relax/input/gendata.m
ViewVC logotype

Diff of /MITgcm/verification/front_relax/input/gendata.m

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

revision 1.1 by adcroft, Mon Apr 10 14:38:01 2000 UTC revision 1.2 by adcroft, Mon Apr 10 16:14:07 2000 UTC
# Line 20  fid=fopen('topog.bin','w',ieee); fwrite( Line 20  fid=fopen('topog.bin','w',ieee); fwrite(
20  Lx=dx*nx;  Lx=dx*nx;
21  Ly=dy*(ny-1);  % Solid wall in North  Ly=dy*(ny-1);  % Solid wall in North
22    
23    % Variable resolution
24    y=(1:ny)/(ny-0)-0.5;
25    dy=1-0.3*exp( -(5*y).^2 );
26    %dy=ones(1,ny);              % Constant resolution
27    dy=dy/sum(dy(1:ny-1))*Ly;
28    fid=fopen('dy.bin','w',ieee); fwrite(fid,dy,prec); fclose(fid);
29    
30  % Coordinates  % Coordinates
31  xc=((1:nx)-0.5)*dx;  xc=((1:nx)-0.5)*dx;
32  yc=((1:ny)-0.5)*dy-Ly/2;  yf=-Ly/2+[0 cumsum(dy)];
33    yc=(yf(1:end-1)+yf(2:end))/2;
34  zf=[0 -cumsum(dz)];  zf=[0 -cumsum(dz)];
35  zc=(zf(1:end-1)+zf(2:end))/2;  zc=(zf(1:end-1)+zf(2:end))/2;
36  [X,Y]=ndgrid(xc,yc);  [X,Y]=ndgrid(xc,yc);

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

  ViewVC Help
Powered by ViewVC 1.1.22