[gradsusr] how to read netdcf using description file
Jeff Duda
jeffduda319 at gmail.com
Tue Sep 4 16:56:34 EDT 2012
-Add to your control file DTYPE netcdf
-In your VAR entries you need to include the number of vertical levels at
which the arrays are valid, and the list of dimensions by which each array
is indexed. For example, your epflux_vert array, according to the header
information you specified, is indexed by t, z, y and is valid at17 levels,
so the entry should look like
epflux_vert=>whatever 17 t,z,y "description"
Where you need to use the => to rename the array to something that conforms
to Grads standards (underscores are not allowed). It can be anything
alphanumeric in which the first character is a letter. The description can
be whatever string you want.
See if that works. See the appropriate section of this page (
http://www.iges.org/grads/gadoc/descriptorfile.html#VARS) if you continue
to have difficulties with the variable entries.
Jeff Duda
On Tue, Sep 4, 2012 at 3:49 PM, Eduardo Agosta Scarel <
eduardo.agosta at gmail.com> wrote:
> Hello everybody!
>
> I am trying to read netcdf data (EP flux) that has the header info pasted
> below. If I use the sdfopen directly it does not open, prompting the error
> message: SDF file has no discernible X coordinate.
>
> I am using Grads for Windows. I tried to use xdfopen. Now the problem I
> have is that it cannot recongnize the XVAR dimension when using a simple
> description file as the one below.
>
> DSET ^epflux_monthly_ncep.nc
> TITLE This is a sample
> UNDEF 99999.0
> XDEF 1 levels 0
> YDEF 73 LINEAR -90.0 2.5
> TDEF 768 LINEAR 0Z01JAN1948 1DY
> VARS 2
> epflux_vert epflux_ver
> epflux_horz epflux_horz
> ENDVARS
>
> Can someone help me with the description file to open using the xdopen
> command?
>
> Thanks.
>
> Eduardo.
>
>
> -----------------
> Header INFO
> ---------------
> NcFileName ^epflux_monthly_ncep.nc
> NcFileType Unknown
> Global Attributes
> Name NcType Value
> Conventions NC_CHAR "COARDS"
> description NC_CHAR "EP flux vector from NCEP reanalysis (monthly mean)"
> author NC_CHAR "Ingo Wohltmann, Alfred Wegener Institute"
> date NC_CHAR "16-Mar-2012 19:45:31"
> history NC_CHAR "Version 1.0"
> Dimensions
> Name Excel Name Value
> time time 768
> levels levels 17
> latitude latitude 73
> Variables
> Name Excel Name NcType Dimension Attribute Name Attribute NcType Attribute
> Value NcStorageType
> time time NC_DOUBLE time units NC_CHAR "days since 1900-01-01 00:00:00"
> NC_DOUBLE
> - - - - long_name NC_CHAR "Days since 1st January 1900 00:00 GMT" -
> levels levels NC_DOUBLE levels units NC_CHAR "hPa" NC_DOUBLE
> - - - - long_name NC_CHAR "Pressure (hPa)" -
> latitude latitude NC_DOUBLE latitude units NC_CHAR "degrees_north"
> NC_DOUBLE
> - - - - long_name NC_CHAR "Latitude (degrees north)" -
> year year NC_DOUBLE time units NC_CHAR "n/a" NC_DOUBLE
> - - - - long_name NC_CHAR "Year of mean" -
> month month NC_DOUBLE time units NC_CHAR "n/a" NC_DOUBLE
> - - - - long_name NC_CHAR "Month of mean" -
> epflux_vert epflux_vert NC_DOUBLE time x levels x latitude units NC_CHAR
> "kg/s2" NC_DOUBLE
> - - - - long_name NC_CHAR "EP flux vertical component (kg/s2)" -
> epflux_horz epflux_horz NC_DOUBLE time x levels x latitude units NC_CHAR
> "kg/s2" NC_DOUBLE
> - - - - long_name NC_CHAR "EP flux horizontal component (kg/s2)" -
> Data
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
--
Jeff Duda
Graduate research assistant
University of Oklahoma School of Meteorology
Center for Analysis and Prediction of Storms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20120904/88f9fba2/attachment-0003.html
More information about the gradsusr
mailing list