Need help with grads ctl file for reading 3 dim instead of std 5 dim array

Stephen Piper scpiper at UCSD.EDU
Fri Jan 30 18:29:07 EST 2009


I am trying to read a fortran binary file that is written with the
following Fortran code:

       integer, parameter                       :: statcnt=228,
       ^                                            tractot=26,tlen=2190
       real,dimension(statcnt,tractot,tlen)     :: statco2
     ie., 1 record with no. of stations, no. of tracers, and no. of days

Can I read this in grads by setting the dimensions of YDEF and ZDEF
to 1 with the
following ctl file?   At present, grads is coughing about the
variable definitions.

The values in the file are really just daily values for 26 different
tracers at 228 stations.
Current draft of my ctl file is below.

Thanks!
Steve


my ctl file - doesn't quite work:

DSET     /Users/stephenpiper/Transcom3/CSU.gurney.L1.statco2.le.dat
OPTIONS  sequential
OPTIONS  little_endian
OPTIONS   365_day_calendar

      * .le. in filename probably means little endian ...

TITLE     CSU gurney hi frequency station data
UNDEF    1.e36

   * fortran statements
   *    integer, parameter                       :: statcnt=228,
   *   ^                                            tractot=26,tlen=2190
   *    real,dimension(statcnt,tractot,tlen)     :: statco2

   *  fortran sequential file - 1 record of 228,26,2190
   *     ie, fortran binary with rec lengths in each record

XDEF     228 linear   1 1
    *  no. of items scaletype startcoord increment
YDEF     1 linear 1 1
ZDEF     1 levels 1000
TDEF     2190 linear 1jan91 1dy
VARS      26
           fos90  0 -99
      *  note that the format is standard x,y,z,var,t
           fos95  0 -99
           bioa   0 -99
           dum    0 -99
           bio1   0 -99
           bio2   0 -99
           bio3   0 -99
           bio4   0 -99
           bio5   0 -99
           bio6   0 -99
           bio7   0 -99
           bio8   0 -99
           bio9   0 -99
           bio10  0 -99
           bio11  0 -99
           oce1   0 -99
           oce2   0 -99
           oce3   0 -99
           oce4   0 -99
           oce5   0 -99
           oce6   0 -99
           oce7   0 -99
           oce8   0 -99
           oce9   0 -99
           oce10  0 -99
           oce11  0 -99
       ENDVARS



More information about the gradsusr mailing list