<div dir="ltr"><div>What version of NCL do you have? <br><br>%> ncl -V<br><br></div><div>The 6.3.0 version has:<br><br>undef("yyyymmdd_to_yyyyddd")<br>function yyyymmdd_to_yyyyddd (yyyymmdd[*]:integer)<br>local ntim, yyyy, mmdd, mm, dd, yyyyddd<br>begin<br> ntim = dimsizes(yyyymmdd)<br><br>;;if (isatt(yyyymmdd,"calendar") .and. yyyymmdd@calendar.eq."proleptic_gregorian") then <br>;; print("yyyymmdd_to_yyyyddd: proleptic_gregorian calendar not supported")<br>;; yyyyddd = new(ntim, "integer", -9999)<br>;; yyyyddd@long_name = "yyyymmdd_to_yyyyddd: proleptic_gregorian calendar not supported"<br>;; return(yyyyddd)<br>;;end if<br><br> yyyy = yyyymmdd/10000<br> mmdd = yyyymmdd - (yyyy*10000)<br> mm = mmdd/100<br> dd = mmdd - (mm*100)<br> <br> if (isatt(yyyymmdd,"calendar")) then ; needed for day_of_year<br> yyyy@calendar = yyyymmdd@calendar<br> end if<br> <br> yyyyddd = yyyy*1000 +day_of_year(yyyy, mm, dd)<br> copy_VarMeta(yyyymmdd, yyyyddd)<br> yyyyddd@long_name = "yyyy and day_of_year"<br> yyyyddd@units = "yyyyddd"<br><br> return(yyyyddd)<br>end<br><br></div><div><br></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 1, 2015 at 11:04 AM, 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>