<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">unless your dates extend back before 1582 I think you could just drop the proleptic from the calendar attribute. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">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. </div><div class="gmail_default" style="font-family:verdana,sans-serif">e.g. ( Will need to be adapted to work in your specific case. )</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default"><span style="font-family:verdana,sans-serif"> </span><font face="monospace, monospace">x = -5550000<br></font></div><div class="gmail_default"><font face="monospace, monospace"> x@units = "hours since 1800-01-01 00:00:00"<br></font></div><div class="gmail_default"><font face="monospace, monospace"> x@calendar = "proleptic_gregorian"<br></font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">unitsTo = x@units ;; keep same time units</font></div><div class="gmail_default"><font face="monospace, monospace">unitsTo@calendar = "gregorian" ;; change the calendar to "gregorian" aka "standard"</font></div><div class="gmail_default"><font face="monospace, monospace">x2 = cd_convert(x, unitsTo) ; calendar now gregorian<br></font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">cd_n = cd_calendar(x2, 2)<br></font></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Alan. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 1 May 2015 at 13:04, Xi Chang <span dir="ltr"><<a href="mailto:xi.chang01@gmail.com" target="_blank">xi.chang01@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hallo,<div><br></div><div>Could you please let me know how to get rid off this error:</div><div><br></div><div><div>day_of_year: illegal calendar = 'proleptic_gregorian'</div><div>isleapyear: illegal calendar = 'proleptic_gregorian'</div><div><br></div><div>the errors came from:</div><div><br></div><div> <b>m = yyyymmdd_to_yyyyddd(cd_n) </b><br></div><div><br></div><div>any solution to use this function for proleptic gregorian calender?</div><div><br></div><div>Thanks.</div></div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>