<div dir="ltr"><div><div><div><div><div>Hi Kyle,<br><br></div>Thanks. <br><br>> How are you calling cd_inv_calendar in your code? Are you certain that
partial days (e.g., hours, minutes, and/or seconds not equal to 0)
aren't > being fed into the function?<br><br></div>There is no issue with the parameters that I pass on to cd_inv_calendar, but one can never be absolutely sure. The hours, minutes and seconds are always 0 in my case. Since then I have switched back to ut_inv_calendar and do not face the same problem again.<br><br>> I've used this function countless times with "hours since xxx" and "days
since xxxx" and never experienced the issue you are describing.<br><br></div>Sure - this happens rarely. I guess it must be some kind of memory leak issue. The funny thing is that I am not able to simulate this "error"<br></div>by using a test script.<br><br></div>saji<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 22, 2015 at 11:13 PM, Kyle Griffin <span dir="ltr"><<a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</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">Hi Saji,<div><br></div><div>How are you calling cd_inv_calendar in your code? Are you certain that partial days (e.g., hours, minutes, and/or seconds not equal to 0) aren't being fed into the function? I've used this function countless times with "hours since xxx" and "days since xxxx" and never experienced the issue you are describing.</div><div><br></div><div><br></div><div>Kyle</div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr">----------------------------------------<div>Kyle S. Griffin</div><div>Department of Atmospheric and Oceanic Sciences</div><div>University of Wisconsin - Madison</div><div>Room 1421</div><div>1225 W Dayton St, Madison, WI 53706</div><div>Email: <a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</a></div></div></div></div>
<br><div class="gmail_quote"><div><div class="h5">On Tue, Jul 21, 2015 at 6:32 AM, Saji Hameed <span dir="ltr"><<a href="mailto:saji.nh@gmail.com" target="_blank">saji.nh@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Dear NCL developers,<div><br></div><div>I have a library that uses cd_inv_calendar for some critical parts. Once in a blue moon, my</div><div>script crashes due to problems with values returned by cd_inv_calendar. Instead of returning</div><div>a whole number (for example 37785 days since 1900-01-01 return value is double), it sometimes returns a fraction (37784.xxxx).</div><div><br></div><div>I use NCL version 6.3.0 on a Linux box.</div><div><br></div><div>It is quite difficult to reproduce this issue because it happens rarely and randomly. I notice that <a href="http://www.ncl.ucar.edu/current_release.shtml#KnownBugs6.3.0" target="_blank">http://www.ncl.ucar.edu/current_release.shtml#KnownBugs6.3.0</a> notes a bug with cd_calendar when the units are specified as "minutes since" or "seconds since". In my case the units are </div><div>"days since 1900-01-01".</div><div><br></div><div>I will use ut_calendar for the time being, but thought that I would notify the developers about this issue.</div><span><font color="#888888"><div><br></div><div>saji</div></font></span></div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><span class=""><br>
List instructions, subscriber options, unsubscribe:<br>
</span><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>