[MITgcm-support] rdmds.m: how to read a given field in a mult-field file?
Klymak Jody
jklymak at uvic.ca
Sun Mar 13 15:31:09 EDT 2011
On 2011-03-13, at 3:55 AM, Alastair McKinstry wrote:
> I can do:
> octave:2> [AA,ITER,MM] = rdmds('surfDiag',NaN);
> Reading 7 time levels: 20 40 60 80 100 120 140
> octave:3> MM
> MM = nDims = [ 2 ]; dimList = [ 192 32 ]; dataprec = [ 'float64' ]; nrecords = [ 3 ]; timeStepNumber = [ 20 40 60 80 100 120 140 ]; timeInterval = [ 0.000000000000E+00 1.200000000000E+04 ; 1.200000000000E+04 2.400000000000E+04 ; 2.400000000000E+04 3.600000000000E+04 ; 3.600000000000E+04 4.800000000000E+04 ; 4.800000000000E+04 6.000000000000E+04 ; 6.000000000000E+04 7.200000000000E+04 ; 7.200000000000E+04 8.400000000000E+04 ]; nFlds = [ 3 ]; fldList = { 'ETAN ' 'ETANSQ ' 'DETADT2 ' };
>
> but
> octave:4> size(AA)
> ans =
>
> 192 32 3 7
Looks like
EtaNsq = squeeze(AA(:,:,2,i));
will give you what you want, assuming octave has "squeeze".
Cheers, Jody
>
> so AA appears to be a 3-D array, with 7 time levels. What variable is AA? How do I read ETANSQ into an array, for example?
>
> Thanks
> Alastair
> --
> Alastair McKinstry, <alastair.mckinstry at nuigalway.ie>
> Centre for Astronomy, National University of Ireland,Galway
> _______________________________________________
> MITgcm-support mailing list
> MITgcm-support at mitgcm.org
> http://mitgcm.org/mailman/listinfo/mitgcm-support
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20110313/72757dc0/attachment.htm>
More information about the MITgcm-support
mailing list