<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="">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><blockquote type="cite" class=""><div class="">Am 12.05.2015 um 17:09 schrieb Najib Yusuf <<a href="mailto:najibgal@yahoo.com" class="">najibgal@yahoo.com</a>>:</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=""> Copyright (C) 1995-2012 - All Rights Reserved<br style="" class=""> University Corporation for Atmospheric Research<br style="" class=""> NCAR Command Language Version 6.1.0<br style="" class=""> The use of this software is governed by a License Agreement.<br style="" class=""> See <a href="http://www.ncl.ucar.edu/" class="">http://www.ncl.ucar.edu/</a> for more details.<br style="" class="">ncl 0> dir = "/home/najib/Desktop/"<br style="" class="">ncl 1> filen = "TRODAN.dat"<br style="" class="">ncl 2> z1 = asciiread(dir+filen,(/3326/),"string")<br style="" class="">ncl 3> printVarSummary(z1)<br style="" class=""><br style="" class=""></div></div></div></div></blockquote><div><br class=""></div>here your file is called <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><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=""> 3326 values<br style="" class="">Number of Dimensions: 1<br style="" class="">Dimensions and sizes: [3326]<br style="" class="">Coordinates: <br style="" class="">Number Of Attributes: 1<br style="" class=""> _FillValue : missing<br style="" class="">ncl 4> new_str = str_split_csv(z1, ",", 1)<br style="" class="">ncl 5> 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=""> 33260 values<br style="" class="">Number of Dimensions: 2<br style="" class="">Dimensions and sizes: [3326] x [10]<br style="" class="">Coordinates: <br style="" class="">Number Of Attributes: 1<br style="" class=""> _FillValue : missing<br style="" class="">ncl 6> _FillValue = 999<br style="" class="">ncl 7> variables = new_str(0,0:9)<br style="" class="">ncl 8> 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=""> 10 values<br style="" class="">Number of Dimensions: 1<br style="" class="">Dimensions and sizes: [10]<br style="" class="">Coordinates: <br style="" class="">Number Of Attributes: 1<br style="" class=""> _FillValue : missing<br style="" class="">(0) Year<br style="" class="">(1) Month<br style="" class="">(2) Day<br style="" class="">(3) Hour<br style="" class="">(4) Minute<br style="" class="">(5) Second<br style="" class="">(6) UT_sec<br style="" class="">(7) Ozone_ppbv<br style="" class="">(8) Temperature_K<br style="" class="">(9) Pressure_Torr<br style="" class="">ncl 9> year = stringtoint(new_str(1:3325,0))<br style="" class="">ncl 10> month = stringtoint(new_str(1:3325,1))<br style="" class="">ncl 11> day = stringtoint(new_str(1:3325,2))<br style="" class="">ncl 12> hour = stringtoint(new_str(1:3325,3))<br style="" class="">ncl 13> minute = stringtoint(new_str(1:3325,4))<br style="" class="">ncl 14> second = stringtoint(new_str(1:3325,5))<br style="" class="">ncl 15> UT_sec = stringtofloat(new_str(1:3325,6))<br style="" class="">ncl 16> ozone_ppbv = stringtofloat(new_str(1:3325,7))<br style="" class="">ncl 17> Temp_K = stringtofloat(new_str(1:3325,8))<br style="" class="">ncl 18> Press_Pa = stringtofloat(new_str(1:3325,9))<br style="" class="">ncl 19> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br style="" class="">ncl 20> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br style="" class="">ncl 21> begin<br style="" class="">ncl 22>f = addfile ("$NCARG_ROOT/lib/ncarg/data/ascii/TRODAN.dat.asc","r“)</div></div></div></div></blockquote><div><br class=""></div>here you try to open a file called <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><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 </span></font></div><div><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><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: medium;" class="">“,“r")</span></div><div><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> u = f->U<br style="" class="">ncl 24> wks = gsn_open_wks ("ps","xy")<br style="" class="">ncl 25> res = True<br style="" class="">ncl 26> rest@tiMainString = "Basic XY plot"<br style="" class="">ncl 27> plot = gsn_csm_xy (wks,u&lat,u(1,{3325}),res)<br style="" class="">ncl 28> end<br style="" class="">fatal:["FileSupport.c":2758]:_NclFindFileExt: Requested file <$NCARG_ROOT/lib/ncarg/data/ascii/TRODAN.dat.asc> or <$NCARG_ROOT/lib/ncarg/data/ascii/TRODAN.dat> does not exist<br style="" class=""><br style="" class=""></div></div></div></div></blockquote><div><br class=""></div>This error message says exactly what happened.</div><div><br class=""></div><div><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><br class=""></div>And it tells you also at which line of your script you have to look.</div><div><br class=""></div><div><br class=""></div><div>Bye,</div><div>Karin</div><div><br class=""></div><div apple-content-edited="true" class=""><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br class=""></div></body></html>