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

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

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

revision 1.3 by adcroft, Wed May 5 18:32:39 1999 UTC revision 1.4 by mlosch, Tue Oct 11 13:00:56 2005 UTC
# Line 43  accuracy='real*8'; Line 43  accuracy='real*8';
43  h=-H+dh*exp( -(X.^2+Y.^2)/(2*(L^2)) );  h=-H+dh*exp( -(X.^2+Y.^2)/(2*(L^2)) );
44  fid=fopen('topog.bump','w',ieee); fwrite(fid,h,accuracy); fclose(fid);  fid=fopen('topog.bump','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
45    
46  % Side walls + bump  % $$$ % Side walls + bump
47  h(:,1)=0;  % $$$ h(:,1)=0;
48  h(:,ny)=0;  % $$$ h(:,ny)=0;
49  fid=fopen('topog.bumpchannel','w',ieee); fwrite(fid,h,accuracy); fclose(fid);  % $$$ fid=fopen('topog.bumpchannel','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
50    
51  % Simple channel  % $$$ % Simple channel
52  h(:,1)=0;  % $$$ h(:,1)=0;
53  h(:,2:ny-1)=-H;  % $$$ h(:,2:ny-1)=-H;
54  h(:,ny)=0;  % $$$ h(:,ny)=0;
55  fid=fopen('topog.channel','w',ieee); fwrite(fid,h,accuracy); fclose(fid);  % $$$ fid=fopen('topog.channel','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
56    
57    % initial fields for salinity
58    si = 35;
59    fid=fopen('S.init','w',ieee); fwrite(fid,si*ones(nx,ny,nz),accuracy); fclose(fid);
60    
61    % open boundary conditions;
62    u0 = .25;
63    s0 = si+1;
64    
65    % create two time slabs for testing
66    uMerid = cat(3,u0*ones(nx,nz),zeros(nx,nz));
67    uZonal = cat(3,u0*ones(ny,nz),zeros(ny,nz));
68    sZonal = cat(3,s0*ones(ny,nz),s0*ones(ny,nz));
69    
70    fid=fopen('OBmeridU.bin','w',ieee); fwrite(fid,uMerid,accuracy); fclose(fid);
71    fid=fopen('OBzonalU.bin','w',ieee); fwrite(fid,uZonal,accuracy); fclose(fid);
72    fid=fopen('OBzonalS.bin','w',ieee); fwrite(fid,sZonal,accuracy); fclose(fid);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22