[ncl-talk] day_of_year: illegal calendar = 'proleptic_gregorian' isleapyear: illegal calendar = 'proleptic_gregorian'
Alan Brammer
abrammer at albany.edu
Sun May 3 09:29:56 MDT 2015
unless your dates extend back before 1582 I think you could just drop the
proleptic from the calendar attribute.
For a better answer though, if you're using 6.3. (which you probably should
be, as there are lots of updates to calendar functionality), you can use a
currently still undocumented feature in cd_convert.
e.g. ( Will need to be adapted to work in your specific case. )
x = -5550000
x at units = "hours since 1800-01-01 00:00:00"
x at calendar = "proleptic_gregorian"
unitsTo = x at units ;; keep same time units
unitsTo at calendar = "gregorian" ;; change the calendar to "gregorian" aka
"standard"
x2 = cd_convert(x, unitsTo) ; calendar now gregorian
cd_n = cd_calendar(x2, 2)
Alan.
On 1 May 2015 at 13:04, Xi Chang <xi.chang01 at gmail.com> wrote:
> Hallo,
>
> Could you please let me know how to get rid off this error:
>
> day_of_year: illegal calendar = 'proleptic_gregorian'
> isleapyear: illegal calendar = 'proleptic_gregorian'
>
> the errors came from:
>
> *m = yyyymmdd_to_yyyyddd(cd_n) *
>
> any solution to use this function for proleptic gregorian calender?
>
> Thanks.
>
> _______________________________________________
> ncl-talk mailing list
> 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/20150503/c8b8eae4/attachment.html
More information about the ncl-talk
mailing list