<div dir="ltr">Hello NCL Community,<div><br></div><div>I'm stuck with a simple problem of creating time string with an interval of 1 minute. I'm working with a wind model and the output file doesn't have any time coordinates attached. I'm using the cd_inv_calendar and cd_string functions for creating time string.  In my model output, I have outputs saved in each minute and in total, I have 900 minutes (15 hours) of data stored in the output file. This is what I tried:</div><div><br></div><div>-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div>----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_string.ncl"<br><br></div><div>; model start time 2017-09-10 12Z<br><br>syyyy = 2017<br>smm = 09<br>sdd = 10<br>shh = 12<br><br>; model end time 2017-09-11 03Z<br><br><br>eyyyy = 2017<br>emm = 09<br>edd = 11<br>ehh = 03<br><br>timeUnits = "hours since 1800-01-01 00:00:00"<br><br></div><div>sdate = cd_inv_calendar(syyyy,smm,sdd,shh,00,00,timeUnits,0)<br>edate = cd_inv_calendar(eyyyy,emm,edd,ehh,00,00,timeUnits,0)<br><br>ntimes = toint((edate-sdate)/.01666666667) +1 ; model has 900 steps, each step is 1 minute<br><br>times = new( (/ntimes/), "float")<br><br>times@units = timeUnits<br><br>do n=0,ntimes-1<br></div><div>   times(n) = tofloat(sdate + (.01666666667*n)) ;multiplying n by 1 makes time interval as 1 hour. Multiplying n by 0.25 makes time interval 15 minutes. But multiplying by 0.01666666667 doesn't create 1 minute interval.<br> end do<br><br> time_str = cd_string(times,"%H%M UTC %d %c %Y")<br><br>print(time_str)<br></div><div><br></div><div>--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div>Variable: time_str<br>Type: string<br>Total Size: 7200 bytes<br>            900 values<br>Number of Dimensions: 1<br>Dimensions and sizes:   [900]<br>Coordinates:<br>Number Of Attributes: 1<br>  _FillValue :  missing<br>(0)     1200 UTC 10 Sep 2017<br>(1)     1200 UTC 10 Sep 2017<br>(2)     1200 UTC 10 Sep 2017<br>(3)     1200 UTC 10 Sep 2017<br>(4)     1207 UTC 10 Sep 2017<br>(5)     1207 UTC 10 Sep 2017<br>(6)     1207 UTC 10 Sep 2017<br>(7)     1207 UTC 10 Sep 2017<br>(8)     1207 UTC 10 Sep 2017<br>(9)     1207 UTC 10 Sep 2017<br>(10)    1207 UTC 10 Sep 2017<br>(11)    1207 UTC 10 Sep 2017<br>(12)    1215 UTC 10 Sep 2017<br>(13)    1215 UTC 10 Sep 2017<br></div><div>.</div><div>.</div><div>.</div><div>(891)   0252 UTC 11 Sep 2017<br>(892)   0252 UTC 11 Sep 2017<br>(893)   0252 UTC 11 Sep 2017<br>(894)   0252 UTC 11 Sep 2017<br>(895)   0252 UTC 11 Sep 2017<br>(896)   0252 UTC 11 Sep 2017<br>(897)   0300 UTC 11 Sep 2017<br>(898)   0300 UTC 11 Sep 2017<br>(899)   0300 UTC 11 Sep 2017</div><div><br></div><div>--</div><div>Thank you, </div><div>Sakib Ahmed</div><div>Connecticut College<br></div><div>Environmental Studies Major,<br></div><div>New London, CT 06320<br></div></div>