[gradsusr] [EXTERNAL] Re: variable tdef in the netcdf file

Adams, Jennifer M. (GSFC-610.2)[ADNET SYSTEMS INC] jennifer.m.adams at nasa.gov
Thu Apr 30 08:21:01 EDT 2020


Hi, Artur –
You can have a non-linear Z axis (use ZDEF n LEVELS …), but you can’t have a non-linear T axis. If you want to bring your irregularly spaced observational data into GraDS and maintain accurate time metadata, then you must break up your netcdf file into separate small files, each with one time step and a filename that reflects the valid time so you can use ‘options template’ and the usual %y %m %d %h %n substitution strings. Then define a linear time axis and GrADS will place your observations in their proper position and treat any gaps between them as missing.
--Jennifer
--
Jennifer Miletta Adams
ADNET Systems, Inc.
NASA/GSFC, Code 610.2
Building 32, Room S159
(301) 614-6070


From: gradsusr <gradsusr-bounces at gradsusr.org> on behalf of Gevorgyan Artur <agm86 at yandex.ru>
Reply-To: GrADS Users Forum <gradsusr at gradsusr.org>
Date: Wednesday, April 29, 2020 at 9:51 PM
To: GrADS Users Forum <gradsusr at gradsusr.org>
Subject: [EXTERNAL] Re: [gradsusr] variable tdef in the netcdf file

Dear Jeff,

Thanks for your help! Can you attach the examples of control files using the CHSUB templating (%ch)?

Can I apply the same method for the zdef if I also have varying heights in my data? If yes, can you please send me the relevant example control file?

Kind regards,
Artur


29.04.2020, 18:08, "Jeff Duda" <jeffduda319 at gmail.com>:
For netCDF, GrADS doesn't read the time from the file itself if you use a control file. So I would write a control file and then rename the files to some arbitrary interval that is close to the actual valid times of the files.

If you need exact and non-constant timing, then you have two other options I can see
1) Use CHSUB templating (%ch) to manually type each time stamp into a single control file and then use the time index to loop over those.
2) If the times change frequently or writing them all out is too tedious, then you can use control files (plural) by using an external scripting source such as Linux shell scripting to loop over individual files, making a separate control file (or using sdfopen) to read/plot from each file in the loop.

Jeff Duda

On Wed, Apr 29, 2020 at 12:23 AM Gevorgyan Artur <agm86 at yandex.ru<mailto:agm86 at yandex.ru>> wrote:
Dear Colleges,

I have observed data with variable (not constant) observational time intervals. The data are in netcdf format, and the observational times are prescribed defined the time variable, and time:units = "seconds since 1970-01-01"? How can I plot my data using those observational times?

Kind regards,
Artur

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr<https://urldefense.proofpoint.com/v2/url?u=http-3A__gradsusr.org_mailman_listinfo_gradsusr&d=DwMGaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=M2mFZsxo0ZoztoK2Lyoypu1kKkBVKyEoM9CXGWO42zk&m=yBacwggIwPcM42d51hngANUHlJgDqGar0d1Ch46i2Kw&s=rGn1NukezJsA30DBPq8r2QFd8AswdeA-Smt6N04M-CU&e=>


--
Jeff Duda, Research Scientist
University of Colorado Boulder
Cooperative Institute for Research in Environmental Sciences
NOAA/OAR/ESRL/Global Systems Laboratory
Boulder, CO
,

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
http://gradsusr.org/mailman/listinfo/gradsusr<https://urldefense.proofpoint.com/v2/url?u=http-3A__gradsusr.org_mailman_listinfo_gradsusr&d=DwMGaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=M2mFZsxo0ZoztoK2Lyoypu1kKkBVKyEoM9CXGWO42zk&m=yBacwggIwPcM42d51hngANUHlJgDqGar0d1Ch46i2Kw&s=rGn1NukezJsA30DBPq8r2QFd8AswdeA-Smt6N04M-CU&e=>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20200430/d7fd28c9/attachment-0001.html>


More information about the gradsusr mailing list