<div dir="ltr"><div class="gmail_default" style="font-size:small"><font face="arial, helvetica, sans-serif">Soares,</font></div><div class="gmail_default" style="font-size:small"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style="font-size:small"><font face="arial, helvetica, sans-serif">When you continue to have problems, you must include the new code and the new error messages. You referred to &quot;line 295&quot;, but we have no idea what this is since there&#39;s no code to look at.</font></div><div class="gmail_default" style="font-size:small"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style="font-size:small"><font face="arial, helvetica, sans-serif">As Dennis stated earlier, &quot;printVarSummary&quot; is just a print statement that helps you determine what the problem might be. It does NOT fix the code for you.  </font></div><div class="gmail_default" style="font-size:small"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default" style="font-size:small"><font face="arial, helvetica, sans-serif">You are getting an error because you are subscripting an array with a value that is out-of-range. Here&#39;s an example of a 2-line code that produces this error:</font></div><div class="gmail_default" style=""><pre style="font-size:small"><font face="arial, helvetica, sans-serif">    x = random_uniform(-100,100,(/10,20,30/))
    print(x(5,20,5))                           ; index &#39;20&#39; is invalid</font></pre><pre style="font-size:small"><font face="arial, helvetica, sans-serif">The error occurs because &quot;x&quot; is dimensioned 10 x 20 x 30, and the &quot;20&quot; of x(5,20,5) is out-of-range because dimensions start at 0.</font></pre><pre style="font-size:small"><font face="arial, helvetica, sans-serif">This would work:</font></pre><pre style="font-size:small"><font face="arial, helvetica, sans-serif">    x = random_uniform(-100,100,(/10,20,30/))
    print(x(5,19,5))                           ; index &#39;19&#39; is valid</font></pre><pre style="font-size:small"><font face="arial, helvetica, sans-serif">The &quot;printVarSummary&quot; procedure will tell you what the dimension sizes of the array are, and you can then compare this against how you are trying to subscript the array.</font></pre><pre style="font-size:small"><font face="arial, helvetica, sans-serif">If you continue to have problems, then I suggest that you include the full script and the data file so we can run it here. </font></pre><pre style="font-size:small"><font face="arial, helvetica, sans-serif">You can use our ftp site to upload your files:</font></pre><pre style=""><font face="arial, helvetica, sans-serif" style=""><a href="http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP">http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP</a></font></pre><pre style=""><font face="arial, helvetica, sans-serif" style="">--Mary</font></pre><pre style=""><font face="arial, helvetica, sans-serif" style=""><br></font></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 21, 2016 at 2:24 AM, 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>Hi all,<br></div><div><br></div>I added  printVarSummary but It didn&#39;t work even if I changed to use variable used in line 295 like  printVarSummary(geom_segIndex) or geom_segIndex (feature).<br><br></div><div>I have also googled what kinds of variable inside line 295 but I couldn&#39;t see anything.<br></div><div>Appreciate for your help.<br></div><div><br></div>Soares<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 6, 2016 at 1:53 AM, Dennis Shea <span dir="ltr">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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><div>As previously suggested:<span><br><br>&quot;If you continue to have problems, please look at the error messages closely.&quot;<br><br></span>==<br></div>The output has:<span><br><br>fatal:Subscript out of range, error in subscript #0<br>fatal:[&quot;Execute.c&quot;:8128]:Execute: Error occurred at or near line 295 in file shapefiles_5.ncl<br><br></span>===<br>You state: &quot;it must fix with printVarSummary&quot;<br><br></div>printVarSummary prints information about a file or variable. ... it does not &quot;fix&quot; anything.<br>===<br><br></div>Immediately ***before*** line 295, add a printVarSummary(...)<br><br></div>*not* of the file but of the variable(s) used in line 295.<br><br></div>Please **look carefully** at the outputs and examine the array sizes and compare with line 295 usage.<br></div><br><div><br>===<br><br><div><div><div><div><br><div><div><span><font color="#888888"></font></span></div></div></div></div></div></div></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 4, 2016 at 6:26 AM, 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>Hi Mary,<br><br></div>After following all your information, I get the error say:<br><br><br>(0)    masking row 0<br>(0)    masking row 1<br>(0)    masking row 2<br>(0)    masking row 3<br>(0)    masking row 4<br>(0)    masking row 5<br>(0)    masking row 6<br>(0)    masking row 7<br>(0)    masking row 8<br>(0)    masking row 9<br>(0)    masking row 10<br>(0)    masking row 11<br>(0)    Wind Speed: 10m: min=0.102553   max=9.43881<br>(0)    Wind Speed: 10m: min=0.102553   max=9.43881<br>(0)    geometry<br>(1)    segments<br>(2)    x<br>(3)    y<br>(4)    ID_0<br>(5)    ISO<br>(6)    NAME_0<br>(7)    ID_1<br>(8)    NAME_1<br>(9)    ID_2<br>(10)    NAME_2<br>(11)    VARNAME_2<br>(12)    NL_NAME_2<br>(13)    HASC_2<br>(14)    CC_2<br>(15)    TYPE_2<br>(16)    ENGTYPE_2<br>(17)    VALIDFR_2<br>(18)    VALIDTO_2<br>(19)    REMARKS_2<br>(20)    Shape_Leng<br>(21)    Shape_Area<br><br>Variable: f<br>Type: file<br>File path:    /user/wrfout_d01_2014-01-07_18:00:<a href="http://00.nc" target="_blank">00.nc</a><br>Number of global attributes:     117<br>Number of dimensions:     9<br>Number of variables:     142<br>fatal:Subscript out of range, error in subscript #0<br>fatal:[&quot;Execute.c&quot;:8128]:Execute: Error occurred at or near line 295 in file shapefiles_5.ncl<br><br><br><br></div>And according to the information of this website <a href="http://mms.dkrz.de/pdf/vis/NCL_docs/NCL_User_Guide_v1.0_kmf_20151207_Draft.pdf" target="_blank">http://mms.dkrz.de/pdf/vis/NCL_docs/NCL_User_Guide_v1.0_kmf_20151207_Draft.pdf</a> , it must fix with printVarSummary. So I add more the code below;<br><br>printVarSummary(f)       ;which (f) is my wrfout file and it same if change to shapefile too (TLS_adm.shp)<br><br></div><br><br>Soares<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 3, 2016 at 12:05 AM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</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 class="gmail_default" style="font-size:small">The error messages are giving you useful information about what the problem is.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">The first error message:</div><span><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px">warning:ContourPlotSetValues: Data values out of range of levels set by EXPLICITLEVELS mode</span><br style="font-size:12.8px"></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px"><br></span></div></span><div class="gmail_default"><span style="font-size:12.8px">is telling you that the contour levels you chose are not in the same range of your data. You chose these levels:</span></div><div class="gmail_default"><span style="font-size:12.8px"><br></span></div><div class="gmail_default">







<p>  res@cnLevels              = (/ 5.4, 6.2, 6.9, 7.4, 7.8, 8.6 /)</p><p>So you should look at your data (VERY IMPORTANT) to see what the range is and make sure that your data intersects with this range of values.  &quot;printMinMax&quot; is useful for this:</p><p>printMinMax(maskedS(nt,:,:),0)</p><p>The second error message:</p><span><p><span style="font-size:12.8px">fatal:[&quot;Execute.c&quot;:5900]:</span><span style="font-size:12.8px">variable (NAME_3) is not in file (citiesShapes)</span></p></span><p>is telling you that you are trying to reference a variable called &quot;NAME_3&quot; from the &quot;citiesShapes.shp&quot; shapefile, but that the variable doesn&#39;t exist on the file. You need to look at your shapefile to see what the variable names are. You can either do this on the UNIX command line with:</p><p>   ncl_filedump citiesShapes.shp</p><p>or you can do it inside the NCL script by using the &quot;getfilevarnames&quot; function:</p><p>







</p><p>  f = <span>addfile</span>(<span>&quot;citiesShapes.shp&quot;</span>, <span>&quot;r&quot;</span>)</p><p>  print(getfilevarnames(f))</p><p>If you continue to have problems, please look at the error messages closely.<span><font color="#888888"><br></font></span></p><span><font color="#888888"><p>--Mary</p><p><br></p>







</font></span></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 2, 2016 at 6:01 AM, 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>Dear Mary,<br><br></div>Now I am getting the error as shown below. I tried to change the name of NAME_3 according to name of the cities but still same.<br><br><br>warning:ContourPlotSetValues: Data values out of range of levels set by EXPLICITLEVELS mode<br>fatal:[&quot;Execute.c&quot;:5900]:variable (NAME_3) is not in file (citiesShapes)<br>fatal:[&quot;Execute.c&quot;:8128]:Execute: Error occurred at or near line 269 in file shapefiles_5.ncl<br><br><br></div>Appreciate for any help,<br><br></div>Soares<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jun 1, 2016 at 11:36 PM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</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 class="gmail_default"><font face="arial, helvetica, sans-serif">Soares,</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">The error is telling you that you have a undefined function or procedure. If you have an older version of NCL, then you may need to include some &quot;load&quot; command at the top of your script:</font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><pre><font face="arial, helvetica, sans-serif"> load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;
 load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;</font></pre><span><font color="#888888"><pre><font face="arial, helvetica, sans-serif"><br></font></pre><pre><font face="arial, helvetica, sans-serif">--Mary</font></pre><pre><br></pre></font></span></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 28, 2016 at 3:59 AM, 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.Rick<br><br></div>I still face the error as shown below;<br><br>fatal:syntax error: line 122 in file shapefiles_5.ncl before or near \n <br>  gsn_define_colormap(wks, cmap) <br>---------------------------------^<span><br><br>fatal:syntax error: possibly an undefined procedure<br></span><span>fatal:syntax error: line 329 in file shapefiles_5.ncl before or near \n <br>  gsn_table(wks, (/ 1, 1 /), (/ ulX-.005, ulX+.255 /), (/ ulY-.21, ulY /), (/ &quot; &quot; /), tblRes)<br>---------------------------------------------------------------------------------------------^<br><br>fatal:syntax error: possibly an undefined procedure<br>fatal:syntax error: line 337 in file shapefiles_5.ncl before or near \n <br>  gsn_table(wks, hdr, hdrX, hdrY, hdrText, tblRes)<br>--------------------------------------------------^<br><br>fatal:syntax error: possibly an undefined procedure<br>fatal:syntax error: line 346 in file shapefiles_5.ncl before or near \n <br>  gsn_table(wks, subHdr, hdrX, hdrY, subHdrText, tblRes)<br>--------------------------------------------------------^<br><br>fatal:syntax error: possibly an undefined procedure<br>fatal:syntax error: line 380 in file shapefiles_5.ncl before or near \n <br>  gsn_table(wks, tblBdy, tblX, tblY, tblText, tblRes)<br>-----------------------------------------------------^<br><br>fatal:syntax error: possibly an undefined procedure<br>fatal:Syntax Error in block, block not executed<br>fatal:error at line 383 in file shapefiles_5.ncl<br><br><br></span></div>Soares<br></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 28, 2016 at 12:56 AM, Rick Brownrigg <span dir="ltr">&lt;<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</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>Hi,<br><br></div>It looks there&#39;s a syntax error at line 258 that likely cascades to the other errors. Lines 257-258 read:<br><br><span style="font-family:monospace,monospace">  majorCities = (/ (/ &quot;Dili&quot;, &quot;Dili&quot;     /), \<br>                   (/ &quot;Hera &quot;,&quot;Hera&quot;/)<span style="color:rgb(255,0,0)">, \</span> /)<br><br>                                   ^^^^^^^^<br></span></div><span style="font-family:monospace,monospace">That should be:<br><br>  majorCities = (/ (/ &quot;Dili&quot;, &quot;Dili&quot;     /), \<br>                   (/ &quot;Hera &quot;,&quot;Hera&quot;/)  /)<br></span><br></div>Rick<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Fri, May 27, 2016 at 3:35 AM, 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></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div>Dear NCL team<br><br></div>I download the shapefiles for administrative boundaries from GIVA-DIS website (<a href="http://www.diva-gis.org/gdata" target="_blank">http://www.diva-gis.org/gdata</a>) to run my wrfout. Here I got error as shown below;<br><div><div><br><br>fatal:syntax error: possibly an undefined procedure<br>fatal:syntax error: line 258 in file shapefiles_5.ncl before or near \n <br><br>^<br><br>fatal:syntax error: line 329 in file shapefiles_5.ncl before or near \n <br>  gsn_table(wks, (/ 1, 1 /), (/ ulX-.005, ulX+.255 /), (/ ulY-.21, ulY /), (/ &quot; &quot; /), tblRes)<br>---------------------------------------------------------------------------------------------^<br><br>fatal:syntax error: possibly an undefined procedure<br>fatal:syntax error: line 337 in file shapefiles_5.ncl before or near \n <br>  gsn_table(wks, hdr, hdrX, hdrY, hdrText, tblRes)<br>--------------------------------------------------^<br><br>fatal:syntax error: possibly an undefined procedure<br>fatal:syntax error: line 346 in file shapefiles_5.ncl before or near \n <br>  gsn_table(wks, subHdr, hdrX, hdrY, subHdrText, tblRes)<br>--------------------------------------------------------^<br><br>fatal:syntax error: possibly an undefined procedure<br>fatal:syntax error: line 380 in file shapefiles_5.ncl before or near \n <br>  gsn_table(wks, tblBdy, tblX, tblY, tblText, tblRes)<br>-----------------------------------------------------^<br><br>fatal:syntax error: possibly an undefined procedure<br>fatal:Syntax Error in block, block not executed<br>fatal:error at line 383 in file shapefiles_5.ncl<br><br><br></div><div>Here I attach my ncl script and ncdump file.<br></div><div>Many thanks for your help.<br><br></div><div>Regards,<br></div><div>Soares<br></div></div></div>
<br></div></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>