<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi</p>
    <p>The time unit "months since" is not udunits complaint as months
      vary in length. While GrADS is able to handle it, it is not the
      best idea for files that might be read by pretty much all other
      software.</p>
    <p>If you want time steps as months, there are other ways to do this
      (though they do not use udunits). </p>
    <a class="moz-txt-link-freetext" href="https://github.com/Unidata/netcdf4-python/issues/434">https://github.com/Unidata/netcdf4-python/issues/434</a><br>
    <br>
    <p>Cathy Smith<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 5/21/18 1:52 PM, Boyin Huang - NOAA
      Federal wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAK9AafQFT85uTQBOWab-Q0O3cmJrnwu2yC2_OvYmQb4HbNq+Wg@mail.gmail.com">
      <div dir="ltr">
        <div class="gmail_default" style="font-size:small">Thanks a lot.
          It works.</div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Mon, May 21, 2018 at 1:42 PM, Andrew
          Friedman <span dir="ltr"><<a
              href="mailto:andfried@gmail.com" target="_blank"
              moz-do-not-send="true">andfried@gmail.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Boyin,<br>
            <br>
            One option is to use the NCO utilities (<a
              href="http://nco.sourceforge.net/nco.html"
              rel="noreferrer" target="_blank" moz-do-not-send="true">http://nco.sourceforge.net/<wbr>nco.html</a>)
            to change the starting time and time units. <br>
            <br>
            Here’s an example of changing time from seconds to minutes,
            and the starting time to 1979:<br>
            ncap2 -O -s "time=time/(60)" -s "time@units=\"minutes since
            1979-01-01 00:00:00\"" $infile $infile<br>
            [I imagine that for changing from minutes to months you’ll
            need to use a loop for different lengths of month].<br>
            <br>
            -Andrew<br>
            <br>
            > On May 21, 2018, at 4:31 PM, Boyin Huang - NOAA Federal
            <<a href="mailto:boyin.huang@noaa.gov"
              moz-do-not-send="true">boyin.huang@noaa.gov</a>> wrote:<br>
            > <br>
            > Hi Jennifer and Andrew,<br>
            > <br>
            > Thanks a lot. Indeed, if I write necdf by "set t 1
            last", I got the right time values (first value is zero) in
            unit of minute. The question is whether I can change the
            unit into "month" instead of minute.<br>
            > <br>
            > ​By "set t num", the​ time value is always zero. I hope
            that I can change the starting time by the attribute setting
            like this:<br>
            > 'set sdfattr time char units months since 1854-01-15
            00:00:00'<br>
            <span class="HOEnZb"><font color="#888888">> -- <br>
                > Boyin Huang, Room-468<br>
                > NOAA/NCEI/CCOG<br>
                > Asheville, NC.<br>
                > 828-271-4851<br>
                <br>
              </font></span></blockquote>
        </div>
        <br>
        <br clear="all">
        <div><br>
        </div>
        -- <br>
        <div class="gmail_signature" data-smartmail="gmail_signature">
          <div dir="ltr">
            <div>
              <div dir="ltr">
                <div>
                  <div dir="ltr">
                    <div>
                      <div dir="ltr">
                        <div>
                          <div dir="ltr">Boyin Huang, Room-468<br>
                            NOAA/NCEI/CCOG<br>
                            Asheville, NC.<br>
                            828-271-4851</div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!--'"--><br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gradsusr mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>
<a class="moz-txt-link-freetext" href="http://gradsusr.org/mailman/listinfo/gradsusr">http://gradsusr.org/mailman/listinfo/gradsusr</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
----------------------------------------------
NOAA/ESRL PSD and CU CIRES
303-497-6263
<a class="moz-txt-link-freetext" href="http://www.esrl.noaa.gov/psd/people/cathy.smith/">http://www.esrl.noaa.gov/psd/people/cathy.smith/</a>

Emails about data/webpages may get quicker responses from emailing 
<a class="moz-txt-link-abbreviated" href="mailto:esrl.psd.data@noaa.gov">esrl.psd.data@noaa.gov</a></pre>
  </body>
</html>