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

Charles Seman Charles.Seman at NOAA.GOV
Fri Jan 30 20:24:00 EST 2009


Stephen,

Have you checked out:
http://grads.iges.org/grads/gadoc/aboutstationdata.html
contains a lot of info on station data, including a Fortran program to
write out data for GrADS, and a GrADS station data descriptor file...

Hope this helps,
Chuck

Stephen Piper wrote:
> 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

--

Please note that Charles.Seman at noaa.gov should be considered my NOAA
email address, not cjs at gfdl.noaa.gov.

********************************************************************
 Charles Seman                                Charles.Seman at noaa.gov
 U.S. Department of Commerce / NOAA / OAR
 Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
 201 Forrestal Road                              fax: (609) 987-5063
 Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
********************************************************************

"The contents of this message are mine personally and do not necessarily
reflect any position of the Government or NOAA."



More information about the gradsusr mailing list