[ncl-talk] "cd_inv_string" question

Sojin Lee noitul7 at gmail.com
Fri Sep 8 11:26:22 MDT 2017


Please see the below results.

load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_inv_string.ncl"

print(cd_calendar(cd_inv_string("1980-001-05", "%Y-%J-%H"), 0))

Variable: unnamed (return)
Type: float
Total Size: 24 bytes
            6 values
Number of Dimensions: 2
Dimensions and sizes: [1] x [6]
Coordinates:
Number Of Attributes: 2
  _FillValue : 9.96921e+36
  calendar : standard
(0,0) 1980
(0,1) 1
(0,2) 1
(0,3) 0 <--- ???
(0,4) 0
(0,5) 0

print(cd_calendar(cd_inv_string("1980-01-01-05", "%Y-%N-%D-%H"), 0))

Variable: unnamed (return)
Type: float
Total Size: 24 bytes
            6 values
Number of Dimensions: 2
Dimensions and sizes: [1] x [6]
Coordinates:
Number Of Attributes: 2
  _FillValue : 9.96921e+36
  calendar : standard
(0,0) 1980
(0,1) 1
(0,2) 1
(0,3) 5 <--- It is ok...
(0,4) 0
(0,5) 0

It seems that cd_inv_string has some problems with Julian format.

Thank you,

Sojin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170908/604bfb8c/attachment.html>


More information about the ncl-talk mailing list