Back to home page

MITgcm

 
 

    


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

view on githubraw file Latest commit 961c26b1 on 2012-12-08 00:41:22 UTC
961c26b165 Jean*0001 
                0002 it=720;
                0003 
                0004 rDir='res_o16/'; sfx='_3c0.bin';
                0005 u=rdmds([rDir,'U'],it);
                0006 v=rdmds([rDir,'V'],it);
                0007 et=rdmds([rDir,'Eta'],it);
                0008 u1=u(:,:,1);
                0009 v1=v(:,:,1);
                0010 
                0011 namf=['uVel',sfx]; var=u1;
                0012 fprintf('write to file: %s\n',namf);
                0013 fid=fopen(namf,'w','b'); fwrite(fid,var,'real*8'); fclose(fid);
                0014 namf=['vVel',sfx]; var=v1;
                0015 fprintf('write to file: %s\n',namf);
                0016 fid=fopen(namf,'w','b'); fwrite(fid,var,'real*8'); fclose(fid);
                0017 namf=['eta',sfx]; var=et;
                0018 fprintf('write to file: %s\n',namf);
                0019 fid=fopen(namf,'w','b'); fwrite(fid,var,'real*8'); fclose(fid);
                0020 
                0021 nx=80; ny=42; nr=3;
                0022 xax=[1:nx]-.5 ; yax=[1:ny]-.5;
                0023 xtxt=1; ytxt=-2;
                0024 
                0025 nf=1; ccB=[0 0];
                0026 figure(nf);clf;
                0027 subplot(211);
                0028  var=v1;
                0029  var=et;
                0030  imagesc(xax,yax,var'); set(gca,'YDir','normal');
                0031  if ccB(2) > ccB(1), caxis(ccB); end
                0032  change_colmap(-1);
                0033  colorbar;
                0034  grid
                0035 titv=['dir: ',strrep(rDir,'_','\_'),' ; sfx=',strrep(sfx,'_','\_')];
                0036 title(titv);
                0037 
                0038 rDir='res_o06/'; sfx='_3c1.bin';
                0039 u=rdmds([rDir,'U'],it);
                0040 v=rdmds([rDir,'V'],it);
                0041 et=rdmds([rDir,'Eta'],it);
                0042 u1=u(:,:,1);
                0043 v1=v(:,:,1);
                0044 
                0045 namf=['uVel',sfx]; var=u1;
                0046 fprintf('write to file: %s\n',namf);
                0047 fid=fopen(namf,'w','b'); fwrite(fid,var,'real*8'); fclose(fid);
                0048 namf=['vVel',sfx]; var=v1;
                0049 fprintf('write to file: %s\n',namf);
                0050 fid=fopen(namf,'w','b'); fwrite(fid,var,'real*8'); fclose(fid);
                0051 namf=['eta',sfx]; var=et;
                0052 fprintf('write to file: %s\n',namf);
                0053 fid=fopen(namf,'w','b'); fwrite(fid,var,'real*8'); fclose(fid);
                0054 
                0055 subplot(212);
                0056  var=v1;
                0057  var=et;
                0058  imagesc(xax,yax,var'); set(gca,'YDir','normal');
                0059  if ccB(2) > ccB(1), caxis(ccB); end
                0060  change_colmap(-1);
                0061  colorbar;
                0062  grid
                0063 titv=['dir: ',strrep(rDir,'_','\_'),' ; sfx=',strrep(sfx,'_','\_')];
                0064 title(titv);
                0065