grads xdfopen netcdf file with template option

Youhua Tang ytang at CGRER.UIOWA.EDU
Fri Jan 7 00:16:36 EST 2005


Thank you very much, Diane. It works prfectly.

Youhua

On Thu, 6 Jan 2005, Diane Stokes wrote:

> Youhua,
>
> Set xdef, ydef, zdef and tdef as you would in a regular ctl file.
> Remove COL, ROW, LAY and TSTEP from your def statements.
>
> Don't forget to change your variable statement too.  Maybe:
>
> SO2=>so2 21 x,y,z,t  SO2 (ppbv)
>
> Check the output of your "ncdump -c" to get the order right for your
> dimensions.  See:
>
> http://grads.iges.org/grads/gadoc/descriptorfile.html#VARS
>
> specifically, units for DTYPE netcdf or hdfsds.
>
>
>      Diane
>
>
>
>
> Youhua Tang wrote:
>
> > Thank you for your information, Diane. I tried your method. However, my
> > netcdf file is a non-COARDS-compliant file. Do you know how to convert
> > coordinate name using "open"? For example, the x-coordinate in my netcdf
> > file is "COL", and I can use "xdef COL 97 linear 1. 1." with "xdfopen",
> > but how I can make it work using "open".
> >
> >
> > Youhua
> >
> > On Wed, 5 Jan 2005, Diane Stokes wrote:
> >
> >
> >>Dear Youhua,
> >>
> >>The new "dtype netcdf" in 1.9b3 has done the trick for me for netcdf
> >>files with multiple time steps.  See:
> >>
> >>http://grads.iges.org/grads/gadoc/descriptorfile.html#DTYPE
> >>
> >>You'd then use "open" rather than "xdfopen".
> >>
> >>     Good Luck.
> >>       Diane
> >>
> >>
> >>Youhua Tang wrote:
> >>
> >>
> >>>Hello, All:
> >>>
> >>>I found that current version of grads do not well handle
> >>>the netcdf file with template option. When I use xdfopen to open
> >>>the ddf file as below
> >>>
> >>>dset ^SOUT.%m2-%d2-00.nc
> >>>title 3D gaseous species
> >>>undef  -99999.0
> >>>options template
> >>>xdef COL 97 linear 1. 1.
> >>>ydef ROW 62 linear 1. 1.
> >>>zdef LAY 21 levels 7.25 25.40 54.5117 109.328 219.887 406.969 675.054
> >>>990.77 135
> >>>8.73 1828.5 2368.88 2942.16 3553.04 4207.36 4912.52 5678.06 6516.63
> >>>7527.75 8868
> >>>.97 10717.2 13153.4
> >>>* in GMT
> >>>tdef TSTEP 377 linear 00Z01JUL2004 3hr
> >>>vars 1
> >>>SO2=>so2 21 99 SO2 (ppbv)
> >>>endvars
> >>>
> >>>The grads-1.8s111 has "Segmentation fault" (my linux machine uses
> >>>RedHat 7.3). The grads-1.9beta3 is "slightly" better as it can finish
> >>>'xdfopen', but "Segmentation fault" appeared again when I perform further
> >>>operation, like 'd ave(so2,t=1,t=300)'. I found that only
> >>>grads-1.7beta9 can handle all the issues, but this old version lacks of
> >>>some useful math functions. Does anybody know how to
> >>>solve this problem?
> >>>
> >>>Thanks a lot
> >>>
> >>>
> >>>Youhua Tang
> >>>
> >>
>
> --
> Diane Stokes
> Environmental Modeling Center
> National Weather Service/NOAA
>

--
----------------------------------------------------
Youhua Tang
Center for Global & Regional Environmental Research
University of Iowa
402 IATL
Iowa City, IA 52242

Phone: (319)335-0264  Fax: (319)335-3337
----------------------------------------------------



More information about the gradsusr mailing list