Back to home page

MITgcm

 
 

    


Warning, /verification/lab_sea/input.hb87/modify_bathy.m is written in an unsupported language. File is not indexed.

view on githubraw file Latest commit 080cb527 on 2007-11-13 20:45:18 UTC
080cb527dc Jean*0001 
                0002 %---- modify bathymetry file: close the Northern boundary:
                0003 nx=20; ny=16;
                0004 
                0005 %- read-in original file:
                0006 fid=fopen('bathy.labsea1979','r','b');
                0007 h0=fread(fid,nx*ny,'real*4'); fclose(fid);
                0008 h0=reshape(h0,[nx ny]);
                0009 
                0010 %- close Norther boundary (put a wall):
                0011 h=h0; h(:,end)=0;
                0012 
                0013 %- write to file:
                0014 fid=fopen('bathy_closeN.bin','w','b'); fwrite(fid,h,'real*4'); fclose(fid);
                0015 
                0016 %- plot to check
                0017 figure(1);clf;
                0018 subplot(211)
                0019 imagesc(h0'); set(gca,'YDir','normal'); 
                0020 colorbar
                0021 title('Original Bathy')
                0022 
                0023 subplot(212)
                0024 imagesc(h'); set(gca,'YDir','normal'); 
                0025 colorbar
                0026 title('Modified Bathy')