<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi, Artur – <o:p></o:p></p>
<p class="MsoNormal">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. <o:p></o:p></p>
<p class="MsoNormal">--Jennifer<o:p></o:p></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">-- <span style="color:black"><br>
Jennifer Miletta Adams<br>
ADNET Systems, Inc.<br>
NASA/GSFC, Code 610.2</span><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;color:black">Building 32, Room S159<br>
(301) 614-6070<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:12.0pt;color:black">From: </span></b><span style="font-size:12.0pt;color:black">gradsusr <gradsusr-bounces@gradsusr.org> on behalf of Gevorgyan Artur <agm86@yandex.ru><br>
<b>Reply-To: </b>GrADS Users Forum <gradsusr@gradsusr.org><br>
<b>Date: </b>Wednesday, April 29, 2020 at 9:51 PM<br>
<b>To: </b>GrADS Users Forum <gradsusr@gradsusr.org><br>
<b>Subject: </b>[EXTERNAL] Re: [gradsusr] variable tdef in the netcdf file<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Dear Jeff,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks for your help! Can you attach the examples of control files using the CHSUB templating (%ch)?<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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?  <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Kind regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Artur<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">29.04.2020, 18:08, "Jeff Duda" <jeffduda319@gmail.com>:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">If you need exact and non-constant timing, then you have two other options I can see<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">2) If the times change frequently or writing them all out is too tedious, then you can use control
<u>files</u> (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.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Jeff Duda<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal">  <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">On Wed, Apr 29, 2020 at 12:23 AM Gevorgyan Artur <<a href="mailto:agm86@yandex.ru">agm86@yandex.ru</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal">Dear Colleges,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">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?  <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Kind regards,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Artur<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
<p class="MsoNormal">_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="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=">http://gradsusr.org/mailman/listinfo/gradsusr</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:10.0pt">Jeff Duda, Research Scientist</span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">University of Colorado Boulder<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Cooperative Institute for Research in Environmental Sciences<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">NOAA/OAR/ESRL/Global Systems Laboratory<br>
<span style="font-size:10.0pt">Boulder, CO</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal">, <o:p></o:p></p>
<p>_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="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=">http://gradsusr.org/mailman/listinfo/gradsusr</a><o:p></o:p></p>
</blockquote>
</div>
</body>
</html>