[ncl-talk] Calendar attribute for time_to_newtime

Lam Hoang lamhpvn at gmail.com
Fri Oct 3 20:08:38 MDT 2014


Dear NCL supporting team,
I want to convert the time units from a CMIP5 model to make them unique.
I try to use time_to_newtime function but unfortunately after convert the
time units, the calendar attribute changes to "gregorian" as well.
What should I do if I want to keep the calendar attribute as the original
time variable?

Regards,
Lam


f =
addfile("./oldtime_psl_day_NorESM1-M_historicalExt_r3i1p1_20060101-20121231.nc","r")
temp = f->psl
t = f->time

printVarSummary(t)

*** Variable: t

*** Type: double

*** Total Size: 20440 bytes

***             2555 values

*** Number of Dimensions: 1

*** Dimensions and sizes: [time | 2555]

*** Coordinates:

***             time: [ 0.5..2554.5]

*** Number Of Attributes: 6

***   bounds : time_bnds

***   units : days since 2006-01-01 00:00:00

***   calendar : noleap

***   axis : T

***   long_name : time

***   standard_name : time

t = time_to_newtime(t, "days since 1850-01-01 00:00:00")

printVarSummary(t)

*** Variable: t

*** Type: double

*** Total Size: 20440 bytes

***             2555 values

*** Number of Dimensions: 1

*** Dimensions and sizes: [time | 2555]

*** Coordinates:

***             time: [56978.5..59534.5]

*** Number Of Attributes: 6

***   calendar : gregorian

***   units : days since 1850-01-01 00:00:00

***   bounds : time_bnds

***   axis : T

***   long_name : time

***   standard_name : time


-- 
Hoang Phuc Lam
Viet Nam National Center of Hydro-Meteorology Forecasting
National Hydro-Meteorological Services of Vietnam
Mob: +84 12 1616 5258
Tel:   +844 38247002
Fax:  +844 38254278
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141004/43f82dbd/attachment.html 


More information about the ncl-talk mailing list