XDFOPEN For Nonstandard NetCDF File
Jennifer Adams
jma at COLA.IGES.ORG
Fri Mar 17 10:20:18 EST 2006
Dave,
Think of the GDS as a data format normalizer -- funky data formats
behind the server appear to GDS clients as standard COARDS-compliant
netcdf files. The descriptor files you write (either the xdfopen style
or the dtype netcdf style) will be used behind the scenes by the GDS to
get the funky data into GrADS, then the metadata is recast by GDS into
the standard netcdf framework. Using GrADS as a client to access GDS
datasets, you will always be able to use sdfopen to open any file. But
as the GDS administrator, you may have to use clever tricks and a
variety of descriptor files (open or xdfopen) to get the funky data
into GrADS. The descriptor files that are used behind the server are
invisible to the clients accessing the data.
The tricky part with casting the Z dimension as an ensemble dimension
is that GDS will automatically change that axis to be pressure levels
with units of millibars (because that's what's COARDS-compliant). So,
the metadata will be incorrect. If you put plenty of comments (which
will appear to clients as global attributes) that the Z axis is not
pressure levels but ensemble members, then it will probably be okay,
but metadata-wise the more correct way to do this would be to use the
dtype netcdf and have each ensemble member be a separate variable.
I hope this clarifies things for you...
Jennifer
On Mar 16, 2006, at 4:43 PM, daved wrote:
> Hi Jennifer,
> Thanks, that worked fine. Can you tell me how such an xdf descriptor
> file could be opened remotely
> via GDS? My confusion is the use of open versus xdfopen. Is it possible
> to use the open
> command in GDS?
>
> Dave
>
> Jennifer M. Adams wrote:
>
>> Dave,
>> The simplest option is to use the Z dimension as a proxy for M, since
>> your variable doesn't appear to vary in Z. Using the Z dimension
>> makes it easier to slice and dice (and average) through your ensemble
>> dimension, but you should document in the descriptor file (with
>> comments and perhaps in the title too) that Z is ensemble member
>> instead of a vertical axis such as depth or millibars. You can still
>> use xdfopen if you do it this way, just give the name of the ensemble
>> dimension with your ZDEF entry.
>>
>> The second option is to list each ensemble member as a separate
>> variable, with declarations like this:
>> t2m=>t2m0 0 t,0,y,x 2m Temperature Ensemble 0
>> t2m=>t2m1 0 t,1,y,x 2m Temperature Ensemble 1
>> t2m=>t2m2 0 t,2,y,x 2m Temperature Ensemble 2
>> ...
>> With this option you have to use the 'open' command with a full
>> 'dtype netcdf' descriptor. This reminds me of a question from Vincent
>> Moron (a colleague of yours at IRI) who asked about reading a netcdf
>> with 5 dims. I believe the 2nd option would work in his case ...
>>
>> A variable that looked like this (with ncdump)
>> float u(T,M,Z,Y,X)
>> could be described this way (assuming Z dimension has 5 elements):
>> u=>u0 5 t,0,z,y,x U-Wind Ensemble 0
>> u=>u1 5 t,1,z,y,x U-Wind Ensemble 1
>> ...
>>
>> This option didn't occur to me at the time when he asked his
>> question, but I do think that will work, although I haven't tested it
>> (yet)!
>>
>> Jennifer
>>
>>
>>
>> On Mar 16, 2006, at 1:19 PM, David G DeWitt wrote:
>>
>>> Hi Folks,
>>> I am trying to open a netcdf file that has an extra dimension, i.e.
>>> ensemble
>>> member. Reading the documentation it appears that GrADS can handle
>>> this
>>> with a comma delimited list for the units parameter, i.e.
>>>
>>> VAR=>hist0 0 0,y,x First historgram interval for VAR
>>>
>>> is the example given in the documentation. For a variable with the
>>> following ncdump what would this syntax look like:
>>>
>>> float t2m(T, M, Y, X)
>>>
>>> where:
>>> T is time
>>> M is ensemble member (the non-standard dimension)
>>> Y is latitude
>>> X is longitude
>>>
>>> Thanks for any advice you can give me on this. I have tried what I
>>> thought
>>> this would be and I clearly do not understand the example.
>>>
>>> Dave
>>>
>>
>> Jennifer M. Adams
>> IGES/COLA
>> 4041 Powder Mill Road, Suite 302
>> Beltsville, MD 20705
>> jma at cola.iges.org
>
>
>
> --
> Dr. David G. DeWitt
> 223 Monell Building
> IRI - International Research Institute for Climate Prediction (IRI)
> Lamont-Doherty Earth Observatory
> Columbia University
> 61 Route 9W
> Palisades, NY 10964-8000
> United States
> Phone: (845) 680-4415
> Fax: (845) 680-4865
> daved at iri.columbia.edu
>
>
--
Jennifer Miletta Adams
Center for Ocean-Land-Atmosphere Studies (COLA)
4041 Powder Mill Road, Suite 302
Calverton, MD 20705 USA
jma at cola.iges.org
More information about the gradsusr
mailing list