<div dir="ltr">Erik, <div>I don't have a real solution (just a simple workaround). </div><div><br></div><div><span style="font-size:13px">yyyymm_to_yyyyfrac utilises the function <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/day_of_year.shtml">day_of_year()</a> internally. <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/day_of_year.shtml">day_of_year</a> as you'll see on the documentation page doesn't support the proleptic_gregorian calendar. </span><br></div><div><br></div><div>My suggestion for you for now would be to convert the time units to a calendar that is supported by day_of_year, and then continue. cd_convert will currently by default convert to a "standard" calendar this should then work in <span style="font-size:13px">yyyymm_to_yyyyfrac</span></div><div><br></div><div>Just need to add 1 line and edit the next. see below. </div><div><br></div><div><br></div><div>standard_time = cd_convert(eof_ts&time, eof_ts&time@units)</div><div><span style="font-size:13px">timeRec= cd_calendar(</span>standard_time<span style="font-size:13px">,2)</span><span style="font-size:13px"><br></span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px"><br></span></div><div><br></div><div><span style="font-size:13px">~Alan. </span></div><div><span style="font-size:13px"><br></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 23, 2015 at 8:43 PM, Erik Jan Schaffernicht <span dir="ltr"><<a href="mailto:eschaffe@uni-koeln.de" target="_blank">eschaffe@uni-koeln.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Additional remark: I updated now to most recent NCL,i.e. version 6.2.1 but I still have the same error and problem.<div class="HOEnZb"><div class="h5"><br>
<br>
I am using these functions:<br>
eof_ts() runs successful on a climate model output.<br>
Then I take<br>
timeRec= cd_calendar(eof_ts&time,2)<br>
and<br>
printVarSummary(timeRec) gives me:<br>
Variable: timeRec<br>
Type: double<br>
Total Size: 292192 bytes<br>
36524 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [36524]<br>
Coordinates:<br>
Number Of Attributes: 1<br>
calendar : proleptic_gregorian<br>
<br>
Then I like to plot the time series (~36500 days = ~100years) so I like to convert the time from YYYYMMDD to YYYY.fraction<br>
yearFrac= yyyymmdd_to_yyyyfrac(timeRec,<u></u>0.)<br>
<br>
This last step causes these errors: Any idea/help/solution?<br>
<br>
[... many more of these illegal calendar errors lines, I did not copy all due to redundancy ...]<br>
day_of_year: illegal calendar = 'proleptic_gregorian'<br>
day_of_year: illegal calendar = 'proleptic_gregorian'<br>
day_of_year: illegal calendar = 'proleptic_gregorian'<br>
day_of_year: illegal calendar = 'proleptic_gregorian'<br>
day_of_year: illegal calendar = 'proleptic_gregorian'<br>
isleapyear: illegal calendar = 'proleptic_gregorian'<br>
fatal:Undefined identifier: (con) is undefined, can't continue<br>
fatal:["Execute.c":8567]:<u></u>Execute: Error occurred at or near line 7801 in file $NCARG_ROOT/lib/ncarg/<u></u>nclscripts/csm/contributed.ncl<br>
<br>
<br>
A few minutes before I used yyyymm_to_yyyyfrac( ) on a similar file that is monthly averaged. There, using the yyyymm_to_...(), this function does not cause any error.<br>
<br>
<br>
<br>
<br>
</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>