<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:16px"><div id="yui_3_16_0_1_1431333704645_89950">Hello,</div><div id="yui_3_16_0_1_1431333704645_90048">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"><br></div><div dir="ltr" id="yui_3_16_0_1_1431333704645_90044">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 http://www.ncl.ucar.edu/ 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="">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")<br style="" 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="">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"><br></div><div id="yui_3_16_0_1_1431333704645_90177" dir="ltr">Thank you, Najib<br style="" class=""><br style="" class=""><br></div><div style="" class="" id="yui_3_16_0_1_1431333704645_90044"><br style="" class=""></div></div></body></html>