<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">You need this in your preamble:<div class=""><span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);">load</span><span style="color: rgb(36, 41, 46); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);" class=""> </span><span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);">"<span class="pl-k" style="box-sizing: border-box; color: rgb(215, 58, 73);">$NCARG_ROOT</span>/lib/ncarg/nclscripts/contrib/cd_string<span class="pl-cce" style="box-sizing: border-box;">.</span>ncl”</span></div><div class=""><span class="pl-s" style="box-sizing: border-box; color: rgb(3, 47, 98); font-family: SFMono-Regular, Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-variant-ligatures: normal; orphans: 2; white-space: pre; widows: 2; background-color: rgb(255, 255, 255);"><br class=""></span></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Il giorno 08 ott 2017, alle ore 21:23, dale zuri <<a href="mailto:dalezuri@gmail.com" class="">dalezuri@gmail.com</a>> ha scritto:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="">Hi ,<br class=""></div><div class="">Thanks for your reply. I need to create a time array with the actual date associated with each forecast time. <br class=""></div><div class="">fatal:Undefined identifier: (cd_string) is undefined, can't continue error<br class="">t=cd_string(time, "%H:%M")<br class=""><br class=""></div><div class="">DZ<br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sun, Oct 8, 2017 at 9:32 AM, Guido Cioni <span dir="ltr" class=""><<a href="mailto:guidocioni@gmail.com" target="_blank" class="">guidocioni@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">You should really take a look at the starting guide of NCL and to the documentation of the individual functions before posting questions here.<div class=""><br class=""></div><div class="">I’ve just checked your file and it seems that the time variable has the right attributes. <br class=""><div class=""><br class=""></div><div class="">Something like this should work (NOT TESTED)<br class=""><div class=""><br class=""></div><div class=""><font face="Menlo" size="1" class="">a=addfile("tmp2m.1995053100.<wbr class="">time.grb2","r”)</font></div><div class=""><font face="Menlo" size="1" class="">time=a->forecast_time0</font></div><div class=""><span style="font-family:Menlo;font-size:x-small" class=""><br class=""></span></div><div class=""><span style="font-family:Menlo;font-size:x-small" class="">date_title= </span><span style="font-family:Menlo;font-size:x-small" class="">"Forecast for "</span><span style="font-family:Menlo;font-size:x-small" class="">+</span><span style="font-family:Menlo;font-size:x-small" class="">cd_string</span><span style="font-family:Menlo;font-size:x-small" class="">(time, </span><span style="font-family:Menlo;font-size:x-small" class="">"%d %c</span><span style="font-family:Menlo;font-size:x-small" class="">.</span><span style="font-family:Menlo;font-size:x-small" class=""> %Y"</span><span style="font-family:Menlo;font-size:x-small" class="">)+</span><span style="font-family:Menlo;font-size:x-small" class="">" at "</span><span style="font-family:Menlo;font-size:x-small" class="">+</span><span style="font-family:Menlo;font-size:x-small" class="">cd_string</span><span style="font-family:Menlo;font-size:x-small" class="">(time, </span><span style="font-family:Menlo;font-size:x-small" class="">"%H:%M"</span><span style="font-family:Menlo;font-size:x-small" class="">)+" UTC</span><font face="Menlo" size="1" class="">”</font></div><div class=""><span style="font-family:Menlo;font-size:x-small" class=""><br class=""></span></div><div class=""><span style="font-family:Menlo;font-size:x-small" class="">Cheers </span></div><div class=""><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">Il giorno 08 ott 2017, alle ore 11:40, dale zuri <<a href="mailto:dalezuri@gmail.com" target="_blank" class="">dalezuri@gmail.com</a>> ha scritto:</div><br class="m_5624277842751735818Apple-interchange-newline"><div class=""><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important" class="">date = cd_calendar(r, -3)</span></div></blockquote></div><br class=""></div></div></div></div></div></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></div></body></html>