[gradsusr] Uncorrect time value in sdfwrite

Boyin Huang - NOAA Federal boyin.huang at noaa.gov
Mon May 21 15:52:16 EDT 2018


Thanks a lot. It works.

On Mon, May 21, 2018 at 1:42 PM, Andrew Friedman <andfried at gmail.com> wrote:

> Hi Boyin,
>
> One option is to use the NCO utilities (http://nco.sourceforge.net/
> nco.html) to change the starting time and time units.
>
> Here’s an example of changing time from seconds to minutes, and the
> starting time to 1979:
> ncap2 -O -s "time=time/(60)" -s "time at units=\"minutes since 1979-01-01
> 00:00:00\"" $infile $infile
> [I imagine that for changing from minutes to months you’ll need to use a
> loop for different lengths of month].
>
> -Andrew
>
> > On May 21, 2018, at 4:31 PM, Boyin Huang - NOAA Federal <
> boyin.huang at noaa.gov> wrote:
> >
> > Hi Jennifer and Andrew,
> >
> > 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.
> >
> > ​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:
> > 'set sdfattr time char units months since 1854-01-15 00:00:00'
> > --
> > Boyin Huang, Room-468
> > NOAA/NCEI/CCOG
> > Asheville, NC.
> > 828-271-4851
>
>


-- 
Boyin Huang, Room-468
NOAA/NCEI/CCOG
Asheville, NC.
828-271-4851
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20180521/838b6c1f/attachment.html>


More information about the gradsusr mailing list