[MITgcm-support] Matlab for post-processing!

Van Thinh Nguyen vtnguyen at moisie2.math.uwaterloo.ca
Thu Sep 13 17:22:59 EDT 2007


Hi Dimitris,

I did use the readbin.m script to read my results (from MITgcm's run) as 
your advice below. 
However, when I did following test, it showed the result is quite 
differrent in comparison with the result I got from using rdmds.m script.

When I would like to have a 2D slice [Nx Ny], for example, at level 
k=15, I save the data at this level, as follows:

  for k=1:Nz (or can use for k=14:15)
    tmp=readbin(filename,[Nx Ny],1,'real*4',k-1);
    tmp=single(tmp);
    if k==15
      save tmp
    else
      clear tmp;
    end;
  end;

Could you please check if I might have any mistake on doing it?

Thanks

Vth

----------------------------------------------------------

On Thu, 5 Apr 2007, Dimitris Menemenlis wrote:

> Van Thinh, how big is your domain, Nx * Ny * Nz
>
> Can you fit a single slice Nx * Ny in memory?
>
> There is another routine that I use to read MITgcm output files:
> MITgcm/utils/matlab/cs_grid/read_cs/readbin.m
> also available here:
> ftp://ecco2.jpl.nasa.gov/matlab/mitgcm/readbin.m
>
> For example, if you have Nx=1000; Ny=1000; Nz=50;
> you would:
>
> for k=1:Nz
> tmp=readbin(filename,[Nx Ny],1,'real*4',k-1);
> tmp=single(tmp);    % if needed
> % do whatever you need to do with tmp
> end
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
>



More information about the MITgcm-support mailing list