<html><head></head><body><div class="ydp9087a2aayahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div></div>
<div>Output: <br></div><div><br></div><div><span><div>Variable: date_str</div><div>Type: string</div><div>Total Size: 392 bytes</div><div> 49 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span style="white-space: pre-wrap;"> </span>[49]</div><div>Coordinates: </div><div>(0)<span style="white-space: pre-wrap;"> </span>00Z 09 2004</div><div>(1)<span style="white-space: pre-wrap;"> </span>12Z 11 2004</div><div>(2)<span style="white-space: pre-wrap;"> </span>00Z 14 2004</div><div>(3)<span style="white-space: pre-wrap;"> </span>12Z 16 2004</div><div>(4)<span style="white-space: pre-wrap;"> </span>00Z 19 2004</div><div>(5)<span style="white-space: pre-wrap;"> </span>12Z 21 2004</div><div>(6)<span style="white-space: pre-wrap;"> </span>00Z 24 2004</div><div>(7)<span style="white-space: pre-wrap;"> </span>12Z 26 2004</div><div>(8)<span style="white-space: pre-wrap;"> </span>00Z 29 2004</div><div>(9)<span style="white-space: pre-wrap;"> </span>12Z 31 2004</div><div>(10)<span style="white-space: pre-wrap;"> </span>00Z 03 2004</div><div>(11)<span style="white-space: pre-wrap;"> </span>12Z 05 2004</div><div>(12)<span style="white-space: pre-wrap;"> </span>00Z 08 2004</div><div>(13)<span style="white-space: pre-wrap;"> </span>12Z 10 2004</div><div>(14)<span style="white-space: pre-wrap;"> </span>00Z 13 2004</div><div>(15)<span style="white-space: pre-wrap;"> </span>12Z 15 2004</div><div>(16)<span style="white-space: pre-wrap;"> </span>00Z 18 2004</div><div>(17)<span style="white-space: pre-wrap;"> </span>12Z 20 2004</div><div>(18)<span style="white-space: pre-wrap;"> </span>00Z 23 2004</div><div>(19)<span style="white-space: pre-wrap;"> </span>12Z 25 2004</div><div>(20)<span style="white-space: pre-wrap;"> </span>00Z 28 2004</div><div>(21)<span style="white-space: pre-wrap;"> </span>12Z 30 2004</div><div>(22)<span style="white-space: pre-wrap;"> </span>00Z 02 2004</div><div>(23)<span style="white-space: pre-wrap;"> </span>12Z 04 2004</div><div>(24)<span style="white-space: pre-wrap;"> </span>00Z 07 2004</div><div>(25)<span style="white-space: pre-wrap;"> </span>12Z 09 2004</div><div>(26)<span style="white-space: pre-wrap;"> </span>00Z 12 2004</div><div>(27)<span style="white-space: pre-wrap;"> </span>12Z 14 2004</div><div>(28)<span style="white-space: pre-wrap;"> </span>00Z 17 2004</div><div>(29)<span style="white-space: pre-wrap;"> </span>12Z 19 2004</div><div>(30)<span style="white-space: pre-wrap;"> </span>00Z 22 2004</div><div>(31)<span style="white-space: pre-wrap;"> </span>12Z 24 2004</div><div>(32)<span style="white-space: pre-wrap;"> </span>00Z 27 2004</div><div>(33)<span style="white-space: pre-wrap;"> </span>12Z 29 2004</div><div>(34)<span style="white-space: pre-wrap;"> </span>00Z 02 2004</div><div>(35)<span style="white-space: pre-wrap;"> </span>12Z 04 2004</div><div>(36)<span style="white-space: pre-wrap;"> </span>00Z 07 2004</div><div>(37)<span style="white-space: pre-wrap;"> </span>12Z 09 2004</div><div>(38)<span style="white-space: pre-wrap;"> </span>00Z 12 2004</div><div>(39)<span style="white-space: pre-wrap;"> </span>12Z 14 2004</div><div>(40)<span style="white-space: pre-wrap;"> </span>00Z 17 2004</div><div>(41)<span style="white-space: pre-wrap;"> </span>12Z 19 2004</div><div>(42)<span style="white-space: pre-wrap;"> </span>00Z 22 2004</div><div>(43)<span style="white-space: pre-wrap;"> </span>12Z 24 2004</div><div>(44)<span style="white-space: pre-wrap;"> </span>00Z 27 2004</div><div>(45)<span style="white-space: pre-wrap;"> </span>12Z 29 2004</div><div>(46)<span style="white-space: pre-wrap;"> </span>00Z 01 2004</div><div>(47)<span style="white-space: pre-wrap;"> </span>12Z 03 2004</div><div>(48)<span style="white-space: pre-wrap;"> </span>00Z 06 2004</div></span></div><div><br></div><div><br></div>
</div><div id="yahoo_quoted_4384890997" class="yahoo_quoted">
<div style="font-family:'Helvetica Neue', Helvetica, Arial, sans-serif;font-size:13px;color:#26282a;">
<div>
En miércoles, 3 de abril de 2019 12:23:14 GMT-6, Toni Klemm <toni-klemm@tamu.edu> escribió:
</div>
<div><br></div>
<div><br></div>
<div><div id="yiv9086471355"><div>Hi Andrea,<div class="yiv9086471355"><br clear="none" class="yiv9086471355"></div><div class="yiv9086471355">Could you include some of your output? That might make it easier to understand what is going wrong.</div><div class="yiv9086471355"><br clear="none" class="yiv9086471355"></div><div class="yiv9086471355">Toni<br clear="none" class="yiv9086471355"><div class="yiv9086471355">
<div class="yiv9086471355" style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;"><div class="yiv9086471355" style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;"><div class="yiv9086471355" style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;"><div class="yiv9086471355" style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;"><div class="yiv9086471355" style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word;"><div style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><font class="yiv9086471355" face="Calibri"><br clear="none" class="yiv9086471355Apple-interchange-newline"><br clear="none" class="yiv9086471355"></font></div><div style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><font class="yiv9086471355" face="Calibri"><b class="yiv9086471355">Toni Klemm, Ph.D.<br clear="none" class="yiv9086471355"></b>Postdoctoral Research Associate</font></div><div style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;">Department of Ecosystem Science and Management</div><div style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;">College of Agriculture and Life Sciences</div><div style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;">Texas A&M University, College Station, TX</div><div style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><font class="yiv9086471355" face="Calibri">Contributor to the <a rel="nofollow" shape="rect" class="yiv9086471355" target="_blank" href="http://www.eccforum.org">Early Career Climate Forum</a><br clear="none" class="yiv9086471355"><a rel="nofollow" shape="rect" class="yiv9086471355" target="_blank" href="http://www.toni-klemm.de">www.toni-klemm.de</a> | <a rel="nofollow" shape="rect" class="yiv9086471355" target="_blank" href="http://twitter.com/toniklemm">@toniklemm</a></font></div><div style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><font class="yiv9086471355" face="Calibri"><br clear="none" class="yiv9086471355"></font></div><div style="color:rgb(0, 0, 0);letter-spacing:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;"><font class="yiv9086471355" face="Calibri"><br clear="none" class="yiv9086471355"></font></div></div></div><br clear="none" class="yiv9086471355Apple-interchange-newline"></div><br clear="none" class="yiv9086471355Apple-interchange-newline"></div><br clear="none" class="yiv9086471355Apple-interchange-newline"></div><br clear="none" class="yiv9086471355Apple-interchange-newline"><br clear="none" class="yiv9086471355Apple-interchange-newline">
</div>
<div><br clear="none" class="yiv9086471355"><blockquote class="yiv9086471355" type="cite"><div class="yiv9086471355yqt5435021110" id="yiv9086471355yqt32193"><div class="yiv9086471355">On Apr 3, 2019, at 1:19 PM, Andrea Perez <<a rel="nofollow" shape="rect" class="yiv9086471355" ymailto="mailto:andreaperez151@yahoo.es" target="_blank" href="mailto:andreaperez151@yahoo.es">andreaperez151@yahoo.es</a>> wrote:</div><br clear="none" class="yiv9086471355Apple-interchange-newline"><div class="yiv9086471355"><div class="yiv9086471355"><div class="yiv9086471355yahoo-style-wrap" style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:13px;"><div class="yiv9086471355">HI!! </div><div class="yiv9086471355"><br clear="none" class="yiv9086471355"></div><div class="yiv9086471355"><span class="yiv9086471355"><span class="yiv9086471355" style="">I'm trying to use print dates in string format, c<span class="yiv9086471355">onverts UTreferenced
date <span class="yiv9086471355"><span class="yiv9086471355" style="">to Julian/Gregorian date. Dates are hourly (2004-07-09 to 2004-07-11) and in a netcdf file. </span></span></span></span></span><br clear="none" class="yiv9086471355"></div><div class="yiv9086471355"><span class="yiv9086471355"><span class="yiv9086471355" style=""><span class="yiv9086471355"><span class="yiv9086471355"><span class="yiv9086471355" style="">But the hours and day are wrongs. What can I do??<span class="yiv9086471355"><br clear="none" class="yiv9086471355ydp749c67ddApple-interchange-newline"></span><span class="yiv9086471355"><br clear="none" class="yiv9086471355ydp83f0bcdfApple-interchange-newline"><br clear="none" class="yiv9086471355"></span></span></span></span></span></span></div><div class="yiv9086471355"><span class="yiv9086471355"><span class="yiv9086471355" style=""><span class="yiv9086471355"><span class="yiv9086471355"><span class="yiv9086471355" style=""><br clear="none" class="yiv9086471355"></span></span></span></span></span></div><div class="yiv9086471355"><span class="yiv9086471355"><span class="yiv9086471355" style=""><span class="yiv9086471355"><span class="yiv9086471355"><span class="yiv9086471355" style=""><span class="yiv9086471355"></span></span></span></span></span></span><div class="yiv9086471355"><span class="yiv9086471355"></span><div class="yiv9086471355">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div class="yiv9086471355">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" </div><div class="yiv9086471355">load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl" </div><div class="yiv9086471355"><br clear="none" class="yiv9086471355"></div><div class="yiv9086471355"> begin</div><div class="yiv9086471355"><br clear="none" class="yiv9086471355"></div><div class="yiv9086471355"> f1=addfile("MMOUT_DOMAIN3_34_sigma.nc","r")</div><div class="yiv9086471355"> ;</div><div class="yiv9086471355"> ; Array to hold month abbreviations. Don't store anything in index</div><div class="yiv9086471355"> ; '0' (i.e. let index 1=Jan, 2=Feb, ..., index 12=Dec).</div><div class="yiv9086471355"> ;</div><div class="yiv9086471355"> month_abbr = (/"","Jul","Aug","Sep", \</div><div class="yiv9086471355"> "Oct","Nov","Dec"/)</div><div class="yiv9086471355"> ;</div><div class="yiv9086471355"> ; Time values and units.</div><div class="yiv9086471355"> ;</div><div class="yiv9086471355"> time = f1->time</div><div class="yiv9086471355"> time@units = "hours since 2004-07-09 00:00:0.0"</div><div class="yiv9086471355"> ;</div><div class="yiv9086471355"> utc_date = ut_calendar(time, 0)</div><div class="yiv9086471355"> ;</div><div class="yiv9086471355"> ; Store return information into more meaningful variables.</div><div class="yiv9086471355"> ;</div><div class="yiv9086471355"> year = tointeger(utc_date(:,0)) ; Convert to integer for</div><div class="yiv9086471355"> month = tointeger(utc_date(:,1)) ; use sprinti </div><div class="yiv9086471355"> day = tointeger(utc_date(:,2))</div><div class="yiv9086471355"> hour = tointeger(utc_date(:,3))</div><div class="yiv9086471355"> </div><div class="yiv9086471355"> ; Write out strings in the format "hhZ dd mmm yyyy".</div><div class="yiv9086471355"> ;</div><div class="yiv9086471355"><br clear="none" class="yiv9086471355"></div><div class="yiv9086471355"> date_str = sprinti("%0.2iZ ", hour) + sprinti("%0.2i ", day) + \</div><div class="yiv9086471355"> sprinti("%0.4i", year)</div><div class="yiv9086471355"> </div><div class="yiv9086471355"> print(date_str) </div><div class="yiv9086471355"> end</div><br clear="none" class="yiv9086471355"></div></div></div></div>_______________________________________________<br clear="none" class="yiv9086471355">ncl-talk mailing list<br clear="none" class="yiv9086471355"><a rel="nofollow" shape="rect" class="yiv9086471355" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none" class="yiv9086471355">List instructions, subscriber options, unsubscribe:<br clear="none" class="yiv9086471355">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br clear="none" class="yiv9086471355"></div></div></blockquote></div><br clear="none" class="yiv9086471355"></div></div></div></div>
</div>
</div></body></html>