<div dir="ltr">Hi Mary,<div><br></div><div>Thanks.  Hopefully the cd_*_calendar developers will figure out what is wrong. My library <a href="https://github.com/sajinh/SysE/blob/master/lib/ncl/syse_db.ncl">https://github.com/sajinh/SysE/blob/master/lib/ncl/syse_db.ncl</a>  for now only needs to handle standard calendars. Therefore ut_*_calendar does it fine for me.</div><div><br></div><div>Best,</div><div>saji</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 31, 2015 at 1:12 AM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Saji,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">There are definitely issues when getting down to the seconds level, because the internal C code doesn&#39;t consistently handle the case where you have a seconds that are an even multiple of 60. Sometimes it &quot;resets&quot; to 0 and increases the minute value by one, and sometimes it doesn&#39;t. I have a note in to the developers of this code, but haven&#39;t heard anything yet.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I can&#39;t say for certain that ut_inv_calendar handles this better, but if it&#39;s working for you, and you don&#39;t need special calendars, then you should be okay.</div><span class="HOEnZb"><font color="#888888"><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 22, 2015 at 7:54 PM, Saji Hameed <span dir="ltr">&lt;<a href="mailto:saji.nh@gmail.com" target="_blank">saji.nh@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div><div><div>Hi Kyle,<br><br></div>Thanks.  <br><span><br>&gt; 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&#39;t &gt; being fed into the function?<br><br></span></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.<span><br><br>&gt; I&#39;ve used this function countless times with &quot;hours since xxx&quot; and &quot;days
 since xxxx&quot; and never experienced the issue you are describing.<br><br></span></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 &quot;error&quot;<br></div>by using a test script.<span><font color="#888888"><br><br></font></span></div><span><font color="#888888">saji<br></font></span></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 22, 2015 at 11:13 PM, Kyle Griffin <span dir="ltr">&lt;<a href="mailto:ksgriffin2@wisc.edu" target="_blank">ksgriffin2@wisc.edu</a>&gt;</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&#39;t being fed into the function? I&#39;ve used this function countless times with &quot;hours since xxx&quot; and &quot;days since xxxx&quot; 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>On Tue, Jul 21, 2015 at 6:32 AM, Saji Hameed <span dir="ltr">&lt;<a href="mailto:saji.nh@gmail.com" target="_blank">saji.nh@gmail.com</a>&gt;</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><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 &quot;minutes since&quot; or &quot;seconds since&quot;.  In my case the units are </div><div>&quot;days since 1900-01-01&quot;.</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><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>
</div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<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>
</div></div></blockquote></div><br></div>