<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="">This was a question about NCL, so you have to send it to the ncl-talk mailing list.&nbsp;<div class="">If you’re not subscribed to ncl-talk, yet:<div class=""><br class=""></div><div class=""><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></div><div class=""><br class=""></div><div class="">Bye,</div><div class="">Karin</div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 12.05.2015 um 17:39 schrieb Karin Meier-Fleischer &lt;<a href="mailto:meier-fleischer@dkrz.de" class="">meier-fleischer@dkrz.de</a>&gt;:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Najib,<div class=""><br class=""></div><div class="">you have a typo in the second addfile call. See below.</div><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">Am 12.05.2015 um 17:09 schrieb Najib Yusuf &lt;<a href="mailto:najibgal@yahoo.com" class="">najibgal@yahoo.com</a>&gt;:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class=""><div id="yui_3_16_0_1_1431333704645_89950" class="">Hello,</div><div id="yui_3_16_0_1_1431333704645_90048" class="">I am a new ncl learner, and i am trying to make a plot from an ascii data file but i am getting error messages, kindly guide me, this is how it looks like;</div><div id="yui_3_16_0_1_1431333704645_90063" class=""><br class=""></div><div dir="ltr" id="yui_3_16_0_1_1431333704645_90044" class="">najib@UbuntuVaio:~$ ncl<br style="" class="">&nbsp;Copyright (C) 1995-2012 - All Rights Reserved<br style="" class="">&nbsp;University Corporation for Atmospheric Research<br style="" class="">&nbsp;NCAR Command Language Version 6.1.0<br style="" class="">&nbsp;The use of this software is governed by a License Agreement.<br style="" class="">&nbsp;See <a href="http://www.ncl.ucar.edu/" class="">http://www.ncl.ucar.edu/</a> for more details.<br style="" class="">ncl 0&gt; dir = "/home/najib/Desktop/"<br style="" class="">ncl 1&gt; filen = "TRODAN.dat"<br style="" class="">ncl 2&gt; z1 = asciiread(dir+filen,(/3326/),"string")<br style="" class="">ncl 3&gt; printVarSummary(z1)<br style="" class=""><br style="" class=""></div></div></div></div></blockquote><div class=""><br class=""></div>here your file is called &nbsp;<span style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);" class="">/home/najib/Desktop/</span><span style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);" class="">TRODAN.dat</span></div><div class=""><font face="HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" size="3" class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></font><blockquote type="cite" class=""><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class=""><div dir="ltr" id="yui_3_16_0_1_1431333704645_90044" class="">Variable: z1<br style="" class="">Type: string<br style="" class="">Total Size: 26608 bytes<br style="" class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3326 values<br style="" class="">Number of Dimensions: 1<br style="" class="">Dimensions and sizes:&nbsp;&nbsp;&nbsp; [3326]<br style="" class="">Coordinates: <br style="" class="">Number Of Attributes: 1<br style="" class="">&nbsp; _FillValue :&nbsp;&nbsp;&nbsp; missing<br style="" class="">ncl 4&gt; new_str = str_split_csv(z1, ",", 1)<br style="" class="">ncl 5&gt;&nbsp; printVarSummary(new_str)<br style="" class=""><br style="" class="">Variable: new_str<br style="" class="">Type: string<br style="" class="">Total Size: 266080 bytes<br style="" class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 33260 values<br style="" class="">Number of Dimensions: 2<br style="" class="">Dimensions and sizes:&nbsp;&nbsp;&nbsp; [3326] x [10]<br style="" class="">Coordinates: <br style="" class="">Number Of Attributes: 1<br style="" class="">&nbsp; _FillValue :&nbsp;&nbsp;&nbsp; missing<br style="" class="">ncl 6&gt; _FillValue = 999<br style="" class="">ncl 7&gt; variables = new_str(0,0:9)<br style="" class="">ncl 8&gt; print(variables)<br style="" class=""><br style="" class=""><br style="" class="">Variable: variables<br style="" class="">Type: string<br style="" class="">Total Size: 80 bytes<br style="" class="">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 10 values<br style="" class="">Number of Dimensions: 1<br style="" class="">Dimensions and sizes:&nbsp;&nbsp;&nbsp; [10]<br style="" class="">Coordinates: <br style="" class="">Number Of Attributes: 1<br style="" class="">&nbsp; _FillValue :&nbsp;&nbsp;&nbsp; missing<br style="" class="">(0)&nbsp;&nbsp;&nbsp; Year<br style="" class="">(1)&nbsp;&nbsp;&nbsp; Month<br style="" class="">(2)&nbsp;&nbsp;&nbsp; Day<br style="" class="">(3)&nbsp;&nbsp;&nbsp; Hour<br style="" class="">(4)&nbsp;&nbsp;&nbsp; Minute<br style="" class="">(5)&nbsp;&nbsp;&nbsp; Second<br style="" class="">(6)&nbsp;&nbsp;&nbsp; UT_sec<br style="" class="">(7)&nbsp;&nbsp;&nbsp; Ozone_ppbv<br style="" class="">(8)&nbsp;&nbsp;&nbsp; Temperature_K<br style="" class="">(9)&nbsp;&nbsp;&nbsp; Pressure_Torr<br style="" class="">ncl 9&gt; year = stringtoint(new_str(1:3325,0))<br style="" class="">ncl 10&gt; month = stringtoint(new_str(1:3325,1))<br style="" class="">ncl 11&gt; day = stringtoint(new_str(1:3325,2))<br style="" class="">ncl 12&gt; hour = stringtoint(new_str(1:3325,3))<br style="" class="">ncl 13&gt; minute = stringtoint(new_str(1:3325,4))<br style="" class="">ncl 14&gt; second = stringtoint(new_str(1:3325,5))<br style="" class="">ncl 15&gt; UT_sec = stringtofloat(new_str(1:3325,6))<br style="" class="">ncl 16&gt; ozone_ppbv = stringtofloat(new_str(1:3325,7))<br style="" class="">ncl 17&gt; Temp_K = stringtofloat(new_str(1:3325,8))<br style="" class="">ncl 18&gt; Press_Pa = stringtofloat(new_str(1:3325,9))<br style="" class="">ncl 19&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br style="" class="">ncl 20&gt; load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br style="" class="">ncl 21&gt; begin<br style="" class="">ncl 22&gt;f = addfile ("$NCARG_ROOT/lib/ncarg/data/ascii/TRODAN.dat.asc","r“)</div></div></div></div></blockquote><div class=""><br class=""></div>here you try to open a file called &nbsp;<span style="background-color: rgb(255, 255, 255);" class=""><font face="HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" size="3" class="">$NCARG_ROOT/lib/ncarg/data/ascii/TRODAN.dat.asc which doesn’t exist.</font></span></div><div class=""><font face="HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" size="3" class=""><span style="background-color: rgb(255, 255, 255);" class="">Shouldn’t it be &nbsp;</span></font></div><div class=""><font face="HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" size="3" class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></font></div><div class=""><font face="HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" size="3" class=""><span style="background-color: rgb(255, 255, 255);" class="">f = addfile("</span></font><span style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);" class="">/home/najib/Desktop/</span><span style="font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);" class="">TRODAN.dat</span><span style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: inherit;" class="">“,“r")</span></div><div class=""><font face="HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif" size="3" class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></font><blockquote type="cite" class=""><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class=""><div dir="ltr" id="yui_3_16_0_1_1431333704645_90044" class="">ncl 23&gt; u = f-&gt;U<br style="" class="">ncl 24&gt; wks = gsn_open_wks ("ps","xy")<br style="" class="">ncl 25&gt; res = True<br style="" class="">ncl 26&gt; rest@tiMainString = "Basic XY plot"<br style="" class="">ncl 27&gt; plot = gsn_csm_xy (wks,u&amp;lat,u(1,{3325}),res)<br style="" class="">ncl 28&gt; end<br style="" class="">fatal:["FileSupport.c":2758]:_NclFindFileExt: Requested file &lt;$NCARG_ROOT/lib/ncarg/data/ascii/TRODAN.dat.asc&gt; or &lt;$NCARG_ROOT/lib/ncarg/data/ascii/TRODAN.dat&gt; does not exist<br style="" class=""><br style="" class=""></div></div></div></div></blockquote><div class=""><br class=""></div>This error message says exactly what happened.</div><div class=""><br class=""></div><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div class=""><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;" class=""><div dir="ltr" id="yui_3_16_0_1_1431333704645_90044" class="">fatal:["FileSupport.c":3052]:($NCARG_ROOT/lib/ncarg/data/ascii/TRODAN.dat.asc) has no file extension, can't determine type of file to open<br style="" class="">fatal:file (f) isn't defined<br style="" class="">fatal:["Execute.c":7741]:Execute: Error occurred at or near line 23</div><div id="yui_3_16_0_1_1431333704645_90169" dir="ltr" class=""><br class=""></div></div></div></div></blockquote><div class=""><br class=""></div>And it tells you also at which line of your script you have to look.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Bye,</div><div class="">Karin</div><div class=""><br class=""></div></div></div></div></blockquote></div><div apple-content-edited="true" class=""><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""></div></div></body></html>