note4-The Self-Describing Files (SDF) interface in GrADS version 1.7 beta

GrADS is a data visualization and analysis package from COLAthe Center for Ocean-Land-Atmosphere studies. My work on GrADS has been to add the ability to read netCDF and HDF-SDS files, which I call SDFs (Self-Describing Files). The primary definition of what is needed in a netCDF or HDF-SDS file to be compatible with SDF interface in GrADS version 1.7 beta is the netCDF conventions adopted by participants in the Cooperative Ocean Atmosphere Research Data Service. In addition, the UNIDATA Program Center’s udunits package version 1.10 or later is needed.

For a description of the SDF interface inGrADS version 1.6, go here.

In the following discussion of an SDF variable that corresponds to “time” (in GrADS terms, a “T” variable), the variable name “time” is actually used, but this variable is not required to have that name. It is determined based on the units attribute value exclusively, as required by theCOARDS conventions.

The COARDS conventions imply that the time:units attribute value should contain an origin, and GrADSSDF interface requires it. Put in terms of function calls in the Udunits package, the time:units attribute value must encounter success with the calls utScan, utIsTime, and utHasOrigin (these are the C names; inFORTRAN,the function call names are utdec, uttime, and utorigin).

 Additionally, a time:units attribute specifying “months” is not supported, because that unit has no fixed length. However, data that have a monthly time step are easily described using a “days since origin_date” form of the units attribute value. The time step is checked and if it’s greater than 27 days (whether the units attribute specifies days or hours), monthly frequency is assumed.

Multiple horizontal grids (AKA staggered grids) are supported by theCOARDSconventions, but not by GrADS‘ SDF interface at this time. The new XDF interface can be used to partially address this point. For information on GrADS‘ XDF interface, an alternative fornetCDF/HDF-SDSfiles, follow this link.

Climatology files are difficult to use at this time. Work is under way to correct this in future releases.

NetCDF defines a coordinate variable as a one-dimensional variable of the same name as a dimension. What GrADS describes as anXcoordinate variable is recognized by values of the units attribute of:

        "degrees_east", "degree_east", "degrees_E", or "degree_E"

Y coordinate variables are recognized if they have a units attribute values of:

        "degrees_north", "degree_north", "degrees_N", or "degree_N"

Z coordinate variables are recognized if they have a units attribute value that is a unit of length that can be converted by the udunitspackage to “feet”, or a unit of pressure that can be converted to “pascals”, or a unit of temperature that can be converted to “degrees Kelvin”, or have one of the following explicit values (case is not significant):

        "mb", "sigma_level", "level", "layer", "layers",
        "hybird_sigma_level", "degreesk", or "degrees_k"

Any non-coordinate variable with dimensions consisting of theX &Yand optionally T and/or Z dimensions discovered as described above are considered displayable by the SDF interface, and may be used in expressions.

The preceding describes, to some extent, what an SDF needs in order to be accessible via the sdfopen command. However, files which do not have conformant metadata can still be read via the xdfopen command.

The syntax for the sdfopen command consists of one required argument (the path to the SDF file), and two optional arguments:

sdfopen SDFpath [template #time_steps] The optional arguments are for using a time series of files as a single entity. The #time_steps is the sum of the count in all the files to be examined, not the count in any one file. The different files are automatically accessed as the “time” or “t” settings in GrADSare altered. For example, if one had daily uwnd data in, one could enter: sdfopen /Data/ 730 Thereafter in the session, times from either data file can be accessed. The %y4 in the template indicates a four-digit year that can vary in the filenames that can be accessed.


Fill in your details below or click an icon to log in: 徽标

您正在使用您的 账号评论。 登出 /  更改 )

Google photo

您正在使用您的 Google 账号评论。 登出 /  更改 )

Twitter picture

您正在使用您的 Twitter 账号评论。 登出 /  更改 )

Facebook photo

您正在使用您的 Facebook 账号评论。 登出 /  更改 )

Connecting to %s