Back to home page

MITgcm

 
 

    


Warning, /verification/tutorial_advection_in_gyre/input/gendata.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit 8f734a8a on 2008-01-23 23:50:44 UTC
3a56f3a153 Oliv*0001 ieee='b';
                0002 accuracy='real*8';
                0003 
                0004 Ho=5000;
                0005 nx=60;
                0006 ny=60;
                0007 
                0008 % Flat bottom at z=-Ho
                0009 h=-Ho*ones(nx,ny);
                0010 % Walls
                0011 h(end,:)=0;
                0012 h(:,end)=0;
                0013 fid=fopen('topog.box5000','w',ieee); fwrite(fid,h,accuracy); fclose(fid);
                0014 
                0015 % Wind-stress
                0016 tauMax=0.1;
                0017 x=((1:nx)-0.5)/(nx-1); % nx-1 accounts for a solid wall
                0018 y=((1:ny)-0.5)/(ny-1); % ny-1 accounts for a solid wall
                0019 [X,Y]=ndgrid(x,y);
                0020 tau=-tauMax*cos(2*pi*Y);
                0021 fid=fopen('windx.m01cos2y','w',ieee); fwrite(fid,tau,accuracy); fclose(fid);
                0022 
                0023 % dye
                0024 dye=zeros(60,60,1);
                0025 dye(2,30,1)=1;
8f734a8a8e Chri*0026 fid=fopen('dye.bin','w',ieee); fwrite(fid,dye,accuracy); fclose(fid);