[ncl-talk] Strange units of time

Rick Brownrigg brownrig at ucar.edu
Wed May 30 07:15:12 MDT 2018


Hi,

Its hard to say where the issue lies, offhand. Do you have other tools that
can look at that HDF5 file, and is the odd units string absent there?

If so, what version of NCL are you using?  If you are using the latest,
6.4.0, are you able to send that HDF5 file to me? (either email directly,
is not too large, or see the instructions about our FTP site:

   http://ncl.ucar.edu/ftp_files.shtml

)

Rick


On Wed, May 30, 2018 at 2:38 AM, Beáta Szabó-Takács <szabo.b at czechglobe.cz>
wrote:

> Dear NCL Users,
>
> I wrote a HDF5 file in Java by IHDF5Writer http://svnsis.ethz.ch/doc/
> openbis/S176.0/ch/systemsx/cisd/hdf5/IHDF5Writer.html
>
> Because IHDF5Writer can write timestamps as number of milliseconds since
> January 1, 1970, 00:00:00 GMT I converted the java.Util.Date to serial
> date number as days since 1970-01-01.
>
> I wrote the time values into HDF5 file
>
> writer.writeDoubleArray("time", time);
>
> writer.string().setAttr("time", "units", "days since 1970-01-01");
>
>
>
> I checked the resulted test.h5 in NCL and printed the time variable and I
> got the following result:
>
> fn = "test.h5"
>
> fi = addfile(fn, "r")
>
> time = fi->time
>
> time1 = time(0)
>
> print(time1)
>
>
>
> Variable: time1
>
> Type: double
>
> Total Size: 8 bytes
>
>             1 values
>
> Number of Dimensions: 1
>
> Dimensions and sizes:   [1]
>
> Coordinates:
>
> Number Of Attributes: 1
>
>   units :       days since 1970-01-01tyeratelatedofileion
>
> (0)     17348.00006944444
>
>
>
> Can someone let me know why ncl receive a strange units?
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180530/f1510e32/attachment.html>


More information about the ncl-talk mailing list