Dear NCL users,
I noted a difference in the functioning of the *ut_inv_calendar* function
between 5.1.1 and 5.2.0 NCL versions. Please see the example below:
1) for 5.1.1 version:
ncl 0> dataStorm = (/2004,02,27,23/)
ncl 1> idxStorm = ut_inv_calendar( dataStorm(0), dataStorm(1), dataStorm(2),
dataStorm(3), 0, 0,"hours since 2004-02-25 00:00:0.0",0)
ncl 2> print(idxStorm)
Variable: idxStorm
Type: double
Total Size: 8 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
Number Of Attributes: 2
calendar : standard
units : hours since 2004-02-25 00:00:0.0
(0) 71
2) for 5.2.0 version, the same result from *print(idxStorm)*:
Variable: idxStorm
Type: double
Total Size: 8 bytes
1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
Number Of Attributes: 2
calendar : standard
units : hours since 2004-02-25 00:00:0.0
(0) 70.99999999999997
Why there is this difference? Is it caused by UDUNITS 2 in NCL 5.2.0?
I don't understand this difference since I'm not dealing with minutes and
seconds which will give me a non integer result.
With 5.1.1 NCL version, I could apply *doubletoint* directly to the result
of the *ut_inv_calendar* and use it to obtain an element of an array.
Now, with 5.2.0 I have to add more instructions to convert it correctly to
integer type, since *doubletoint* truncates it giving me a wrong result.
Best regards,
-- Mateus da Silva Teixeira Registered Linux User #466740 (http://counter.li.org/)
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Jul 17 18:55:52 2010
This archive was generated by hypermail 2.1.8 : Mon Jul 19 2010 - 09:39:01 MDT