[MITgcm-support] rdmds.m: how to read a given field in a mult-field file?

Alastair McKinstry alastair.mckinstry at nuigalway.ie
Sun Mar 13 06:55:38 EDT 2011


Hi,

This may be a trivial question but I'm a newbie to matlab, and I don't 
see how to do this,
and no code I've seen gives an example.
How can I read a multi-field file like 'surfDiag' in the verification 
examples?

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

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mitgcm.org/pipermail/mitgcm-support/attachments/20110313/73dbdc52/attachment.htm>


More information about the MITgcm-support mailing list