<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">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">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">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>