<div dir="ltr">That does seem to have helped, but not entirely. The error still happens, but not as frequently. To the devs: if you would like some data to diagnose, let me know what exactly you would like so I can send it along. A caveat though, my script is processing somewhere around 2000 files, so whatever I might send will be big.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 15, 2015 at 6:35 AM, Alan Brammer <span dir="ltr">&lt;<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.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">This isn&#39;t going to be a solution and one of the devs who knows about the internals of the cd_ routines may have a better answer.  <div>That said,  have you tried reading in the times first, then passing the array to cd_calendar. e.g.</div><div><br></div><div>fin_time = fin[:]-&gt;time</div><div>mtime := cd_calendar(fin_time, -1)</div><div><br></div><div>It shouldn&#39;t really make a difference, but when I&#39;ve had weird quirks like this it&#39;s occasionally on the netcdf side of things. </div><div><br></div><div>If that still fails, it may help if you then save that time array to a new netcdf and send it to the list so devs can recreate the problem and diagnose. </div><div><br></div><div><br></div><div>Alan. </div><div><br></div></div><br><div class="gmail_quote"><div><div class="h5"><div dir="ltr">On Tue, 14 Jul 2015 at 15:01 Daniel Barandiaran &lt;<a href="mailto:dbarandiaran@gmail.com" target="_blank">dbarandiaran@gmail.com</a>&gt; wrote:<br></div></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"><div><div><div>Hi all,<br><br></div>I have an unusual problem, which I believe is happening when I call the cd_calendar function. What is particularly strange is that the error does not always happen, but it occurs quite frequently, which requires me to run my script many times to get a successful run. The error code I get is:<br><br>CDMS error: Error on character time conversion: invalid hour = 80<br><br></div>The invalid hour changes from time to time, and the file that causes it to trip up changes from run to run as well, although there do seem to be a few files that cause the trip-up more frequently. Here is a code snippet of my usage:<br><br>      flist := systemfunc(&quot;ls &quot; + diri + model(m) + &quot;/&quot; + dirlist(d) + &quot;/pr*_r&quot; + r + &quot;i&quot; + i + &quot;*.nc&quot;)<br>      if (.not.any(ismissing(flist))) then<br><br>         nfiles   := dimsizes(flist)<br>         fin   := addfiles(flist,&quot;r&quot;)<br>         ListSetType(fin,&quot;cat&quot;)<br>         mtime := cd_calendar(fin[:]-&gt;time,-1)<br>         mntime   = dimsizes(mtime)<br>         tind  = ind(TIME.ge.mtime(0) .and. TIME.le.mtime(mntime-1))<br>         mind  := ind(mtime.le.max(TIME))<br>         mpreU(r,tind)  = dim_avg_n(fin[:]-&gt;pr(mind,{Uminlat:Umaxlat},{Uminlon:Umaxlon}),(/1,2/))<br><br></div>I realize that my usage might be a little weird, but the CMIP5 data files have such variation on dimension sizes, particularly in the time dimension, so I have to make this funky code to get it to be generic enough, and read in file contents to predefined arrays. This code chunk resides within three nested loops (m,d,i), which perhaps is causing this problem, but I don&#39;t know how else to tackle what I am trying to do. I would offer the files that the script reads but it is way too much...<br><div><br clear="all"><div><div><div><br>-- <br><div><div dir="ltr"><div>Danny Barandiaran<br></div><div>Ph.D. Candidate<br></div><div><div>Department of Plants, Soils, and Climate</div><div>Utah State University</div><div><br><div><br></div></div></div></div></div>
</div></div></div></div></div></div></div>
_______________________________________________<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>
</blockquote></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>Danny Barandiaran<br></div><div>Ph.D. Candidate<br></div><div><div>Department of Plants, Soils, and Climate</div><div>Utah State University</div><div><br><div><br></div></div></div></div></div>
</div>