>
> Hi,
>
> I'm struggling to convert time obtained from NetCDF Reanalysis data.
> Output from the time variable looks like this:
>
> Variable: time (coordinate)
> Type: double
> Total Size: 40 bytes
> 5 values
> Number of Dimensions: 1
> Dimensions and sizes: [time | 5]
> Coordinates:
> Number Of Attributes: 4
> units : hours since 1-1-1 00:00:0.0
> long_name : Time
> actual_range : <ARRAY>
> delta_t : 0000-00-00 06:00:00
> (0) 17544792
> (1) 17544798
> (2) 17544804
> (3) 17544810
> (4) 17544816
>
> How should I make this conversion so that I can plot correct time stamps
> in an animation of images?
>
> Thanks,
> Paul Nutter
Hi Paul,
We've added a "udunits" type function to NCL that takes as input a
unit of time of the form like you mentioned above: "hours since 1-1-1
00:00:0.0", along with the actual double precision values that
represent the "hours since", and it returns a 6 x n array (6 x 5 in
your case) that contains the years, months, days, hours, minutes, and
seconds.
We haven't customized this function much beyond returning this 6 x n
array, although eventually we might add the capability to have this
info returned in a nice string format, like:
"2001080100"
"2001080106"
"2001080112"
where the last two digits represent the hour. This type of string
could then be used as a time stamp, like you mentioned.
If you are interested in testing this function as it is, let me know
what kind of system you have, and I'll provide an NCL binary for you
to try. Also, let me know what kind of time stamp you are interested
in, and I'll write an NCL script that shows how to do this.
--Mary
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Tue Feb 25 2003 - 16:58:13 MST