/[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.1 by adcroft, Tue Dec 15 00:02:27 1998 UTC revision 1.4 by mlosch, Tue Oct 11 13:00:56 2005 UTC
# Line 36  z=-dz/2:-dz:-H; Line 36  z=-dz/2:-dz:-H;
36  % Temperature profile  % Temperature profile
37  [sprintf('Tref =') sprintf(' %8.6g,',Tz*z-mean(Tz*z))]  [sprintf('Tref =') sprintf(' %8.6g,',Tz*z-mean(Tz*z))]
38    
39    ieee='b';
40    accuracy='real*8';
41    
42  % Gaussian bump  % Gaussian bump
43  h=-H+dh*exp( -(X.^2+Y.^2)/(2*(L^2)) );  h=-H+dh*exp( -(X.^2+Y.^2)/(2*(L^2)) );
44  f77write('topog.bump',h,'real*8','b');  fid=fopen('topog.bump','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
45    
46    % $$$ % Side walls + bump
47    % $$$ h(:,1)=0;
48    % $$$ h(:,ny)=0;
49    % $$$ fid=fopen('topog.bumpchannel','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
50    
51    % $$$ % Simple channel
52    % $$$ h(:,1)=0;
53    % $$$ h(:,2:ny-1)=-H;
54    % $$$ h(:,ny)=0;
55    % $$$ 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  % Side walls + bump  fid=fopen('OBmeridU.bin','w',ieee); fwrite(fid,uMerid,accuracy); fclose(fid);
71  h(:,1)=0;  fid=fopen('OBzonalU.bin','w',ieee); fwrite(fid,uZonal,accuracy); fclose(fid);
72  h(:,ny)=0;  fid=fopen('OBzonalS.bin','w',ieee); fwrite(fid,sZonal,accuracy); fclose(fid);
 f77write('topog.bumpchannel',h,'real*8','b');  
   
 % Simple channel  
 h(:,1)=0;  
 h(:,2:ny)=0;  
 h(:,ny)=0;  
 f77write('topog.channel',h,'real*8','b');  

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

  ViewVC Help
Powered by ViewVC 1.1.22