<div dir="ltr">Soares,<div><br></div><div>Also show the output from print (time(0)) before you call cd_string.</div><div><br></div><div>--Dave</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 24, 2017 at 1:29 PM, Dave Allured - NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@noaa.gov</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">Soares,<div><br>The documentation for cd_string says that you must have this line at the top of your program:<br><br>   load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/contrib/cd_string.<wbr>ncl&quot;<div><br></div><div>If that does not solve your problem, then please show:</div></div><div><br></div><div>1.  Complete console output up to the point of error.  This should include the command to run your program, and the NCL version number.</div><div><br></div><div>2.  A complete copy of your NCL script, or a reduced test script that just shows this error.</div><div><br></div><div>--Dave</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 23, 2017 at 9:28 PM, isakhar sakhar isakhar <span dir="ltr">&lt;<a href="mailto:isakhar.inside13@gmail.com" target="_blank">isakhar.inside13@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>Dear Mr. Dave<br><br></div>I have modified the syntax to cd_string but I still face the error &#39;fatal:Undefined identifier: (cd_string) is undefined, can&#39;t continue&#39;<br><br>time_numeric=cd_string(time,&quot;%<wbr>Y%N%D%H%M&quot;)  ;; will return in hours since 1800-01-01 unless specified otherwise<br>offset=-9    ; hours<br>time_numeric =time_numeric-offset<br><br>time=cd_string(time_numeric,&quot;%<wbr>Y%N%D%H%M&quot;)<br><br></div><br>Soares<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 24, 2017 at 12:39 PM, Dave Allured - NOAA Affiliate <span dir="ltr">&lt;<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@noaa.gov</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">Soares,<div><br></div><div>The function <span style="font-size:14px">cd_inv_string is in the next NCL release.  It is not available in the current release 6.3.0.  That is why you are getting a syntax error.</span></div><div><span style="font-size:14px"><br></span></div><div>If your data already has date/time in numeric format as hours since XXX, then you might be able to directly subtract the offset and use cd_string to print the times that you want.</div><span class="m_8713132754400176082m_-2943709031549377148HOEnZb"><font color="#888888"><div><span style="font-size:14px"><br></span></div><div><span style="font-size:14px">--Dave</span></div></font></span><div><div class="m_8713132754400176082m_-2943709031549377148h5"><div><span style="font-size:14px"><br></span></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 23, 2017 at 8:07 PM, isakhar sakhar isakhar <span dir="ltr">&lt;<a href="mailto:isakhar.inside13@gmail.com" target="_blank">isakhar.inside13@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>Dear Mr.Dennis<br><br>I have a wrfout data and it is in UTC. I want to print in my local time (UTC+9). I already have the file cd_inv_string.ncl and already load it in my top of file. I also adjust as below to the my local time but I still face the error. <br><br>time_numeric=cd_inv_string(nti<wbr>mes,“%Y%N%D%H%M”)  ;; will return in hours since 1800-01-01 unless specified otherwise<br>offset=-9    ; hours<br>time_numeric =time_numeric-offset<br>time=cd_string(time_numeric,“%<wbr>Y%N%D%H%M” )<br><br></div>I got the error say: fatal:syntax error: line 34 in file script.ncl before or near � <br>time_numeric=cd_inv_string(tim<wbr>e,<br><br></div>My file in attachment. <br></div>Really appreciate for any help.<br><br></div>Big thanks<br></div>Soares</div></blockquote></div></div></div></div></div></blockquote></div></div></blockquote></div></div></div>
</blockquote></div><br></div></div>