Back to home page

MITgcm

 
 

    


Warning, /verification/adjustment.cs-32x32x1/input.nlfs/gendata.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
60c29405bb Jean*0001 % This is a matlab script that generates the input data
                0002 
                0003 nx=32;ny=nx;ntx=6;
                0004 
                0005 h=zeros(nx,ntx,ny);
                0006 
                0007 x=0.25*((0.5:nx)/nx-0.5);
                0008 [X,Y]=ndgrid(x,x);
                0009 R=sqrt(X.^2+Y.^2);
                0010 
                0011 
                0012 tileno=1;
                0013 
                0014 o=1;
                0015 i=round(nx*1/2);
                0016 j=round(ny*1/2);
                0017 h(i:i+o,tileno,j:j+o)=1;
                0018 
                0019 h(:,1,:)=0.5+0.5*cos(   pi*min(R,0*R+0.04)/0.04 );
                0020 
                0021 %- PS anomaly = 100.mb (10^4 Pa):
                0022 h=h*1.e+4;
                0023 
                0024 fid=fopen('ps100mb.bin','w','b');
                0025 fwrite(fid,h,'real*8');
                0026 fclose(fid);