netcdf, dimension levels

Charles Seman Charles.Seman at NOAA.GOV
Tue Jan 18 16:54:31 EST 2005


Dear Thomas,

GrADS is able to read multiple lines containing your levels... If you
try something like this:

ZDEF 59 LEVELS
        5
      10
      20
      ...

it should be OK.  Here is an example of code which could be used in a
Unix Bourne or Korn Shell script to generate the GrADS ctl file
containing the ZDEF record:

     echo "ZDEF $zdef_nz LEVELS " >>ctl_file
     for z in $zlev
      do
        echo "   $z " >>ctl_file
      done

where "zdef_nz" is the number of your levels, and "zlev" is a variable
containing the levels... Please let me know if you have any questions
about this, OK?

I hope this helps,
Chuck

Thomas LOUBRIEU wrote:

> Hi everybody,
>
> I use grads  with gds for netcdf files publication.
> I wanted to configure my dataset that way :
>
> DSET /home4/begmeil/coriolis_etc/co0401/oa/field/TEMP/OA_%y4%m2%d2.nc
> DTYPE netcdf
> UNDEF 32767.0 _FillValue
> UNPACK scale_factor add_offset
> OPTIONS template
> XDEF 421 LEVELS -100 ...
> YDEF 597 LEVELS -69.9662 ...
> ZDEF 59 LEVELS 5 10 20 30 40 50 60 80 100 120 140 160 180 200 220 240
> 260 280 300 320 360 400 440 480 520 560 600 640 680 720 760 800 840 880
> 920 960 1000 1040
> 1080 1120 1160 1200 1240 1280 1320 1360 1400 1440 1480 1520 1560 1600
> 1650 1700
> 1750 1800 1850 1900 1950
> TDEF 257 LINEAR 05jan2000 7dy
> VARS 2
> temperature 59 t,z,x,y sea temperature
> pct_variance 59 t,z,x,y variance a priori
> ENDVARS
>
> But my X and Y dimensions are irregularly distributed. I cannot use XDEF
> 421 LINEAR or GAUS..., and using LEVELS, the dimension is to high to be
> defined into a single line of ctl file (255 characters maximum, I think).
>
> Do you have any idea that could help me,
>
> Thanks,
>
> Thomas
>
> PS : I use GrADS 1.9b3 and GDS 1.2.9.


--

********************************************************************
 Charles Seman                                Charles.Seman at noaa.gov
 Geophysical Fluid Dynamics Laboratory / NOAA
 Princeton University                          voice: (609) 452-6547
 P.O. Box 308                                    fax: (609) 987-5063
 Princeton, NJ  08542-0308            http://www.gfdl.noaa.gov/~cjs/
********************************************************************

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



More information about the gradsusr mailing list