<div dir="ltr"><div>The real source of the error is that location you are specifying is<b> outside the lat and lon boundaries.<br></b></div><div><br></div><div> 99 lat = <b>-22.721949</b><br>100 lon = <b>-65.695454</b></div><div><br></div><div><br></div><div>(0) LATITUDE, SOUTH IS NEGATIVE (degree_north) : <b>min=-27.42 max=-24.0203</b><br>
</div>
<div>(0) LONGITUDE, WEST IS NEGATIVE (degree_east) : <b>min=-65.6508 max=-62.762</b></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 31, 2019 at 8:27 AM Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><pre class="gmail-m_-4448633479463043862gmail-aLF-aPX-K0-aPE">netcdf wrfout_d01 {
dimensions:
Time = UNLIMITED ; // (97 currently)
DateStrLen = 19 ;
<span style="color:rgb(0,0,255)"><b> west_east = 30 ;
south_north = 39 ;</b></span>
bottom_top = 34 ;<br><br>---<br></pre><pre class="gmail-m_-4448633479463043862gmail-aLF-aPX-K0-aPE">The grid size is <b>(97,[34,] 39,30)</b><br></pre><div>fatal:<b>Subscript out of range, error in subscript #1</b><br>
</div>
<div>fatal:An error occurred reading rain<br>
</div>
<div>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 165 in file meteo_abrapampa_b.ncl</div><div><br></div><div>1<b>65 arain_point = rain(:,<span style="color:rgb(0,0,255)">locY,</span>locX) ; subscript numbers 0,<span style="color:rgb(0,0,255)">1</span>,2</b></div><div><b><br></b></div><div>---</div><div> 99 lat = -22.721949<br>100 lon = -65.695454<br>101 llres = True<br>102 llres@ReturnInt = True ; Return integer values<br>103 locij = <b><a href="http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_ll_to_ij.shtml" target="_blank">wrf_user_ll_to_ij</a>(</b>a, lon, lat, llres)<br>104 locij = locij - 1 ; array pointers in NCL space<br>105 locX = locij(0)<br>106 locY = locij(1)</div><div>107 print(locY)<br>108 print(locX)</div><div><br></div><div><div>Variable: <b>locY</b><br>
</div>
<div>Type: integer<br>
</div>
<div>[snip]<br></div><div>(0) <span style="color:rgb(255,0,0)"><b>53</b></span><b><span style="color:rgb(255,0,0)"> <== This value exceeds the Y grid dimension</span> <span style="color:rgb(255,0,0)">size</span> <span style="color:rgb(255,0,0)">of 39</span><br></b></div><div><b><br></b></div><div>The<b> <b><a href="http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_ll_to_ij.shtml" target="_blank">wrf_user_ll_to_ij</a></b></b> function documentation states:</div><div><br></div><div>"The return values will represent indexes in the WRF-ARW lon, lat model
domain and will be <b>1-based</b>. This is different from
<a href="http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_ll_to_xy.shtml" target="_blank"><strong>wrf_user_ll_to_xy</strong></a> in which the index
values are 0-based.
</div><div><p>
Important note: if the index values from this function are later used
as indexes in NCL scripts, then a value of 1 needs to be deducted from
the values first"</p><p>Even subtracting one: <b> locY-1=52</b> will exceed the Y grid size.</p><p>Further, the <a href="http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_ll_to_xy.shtml" target="_blank"><strong>wrf_user_ll_to_xy</strong></a> documentation states</p><p><font color="red">"<b>This function will be deprecated in NCL version
6.6.0</b></font><b>.
</b>Use <a href="http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_ll_to_xy.shtml" target="_blank"><strong>wrf_user_ll_to_xy</strong></a> instead." <br></p><p><br></p><p>===</p><p>So use <a href="http://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_ll_to_xy.shtml" target="_blank"><strong>wrf_user_ll_to_xy</strong></a> <br></p><p>These functions were not written by NCL developers. If this does not work matbe write to <a href="mailto:wrfhelp@ucar.edu" class="gmail-m_-4448633479463043862gmail-Yh1nIb gmail-m_-4448633479463043862gmail-asUmFb gmail-m_-4448633479463043862gmail-AL18ce" target="_blank">wrfhelp@ucar.edu</a></p><p><br></p><p>Good luck<br></p><p><br></p><p><br></p><p><br></p><p><br></p><p>.
</p></div>
</div>
<span></span></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 31, 2019 at 6:44 AM Carina V. Barca via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div style="margin:0px;font-size:12pt;font-family:Calibri,Helvetica,sans-serif;background-color:rgb(255,255,255)">
Hello I have trouble with ncl script.</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri,Helvetica,sans-serif;background-color:rgb(255,255,255)">
I'm trying to draw a meteogram with rain</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri,Helvetica,sans-serif;background-color:rgb(255,255,255)">
<br>
</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri,Helvetica,sans-serif;background-color:rgb(255,255,255)">
<span><b>ncl -V</b><br>
</span>
<div>6.6.2<br>
</div>
<span></span><br>
</div>
<div style="margin:0px;font-size:12pt;font-family:Calibri,Helvetica,sans-serif;background-color:rgb(255,255,255)">
</div>
<span style="margin:0px;font-size:15px;color:rgb(32,31,30);background-color:rgb(255,255,255)"><b>ncdump
-h<span> </span><a href="http://wrfout_d01.nc/" rel="noopener noreferrer" style="margin:0px" target="_blank">wrfout_d01.nc</a></b><span> (attach file ncdump.txt) </span></span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="margin:0px;font-size:15px;color:rgb(32,31,30);background-color:rgb(255,255,255)"><span>Attach
file meteo_abrapampa_b.ncl</span></span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="margin:0px;font-size:15px;color:rgb(32,31,30);background-color:rgb(255,255,255)"><span><br>
</span></span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="margin:0px;font-size:15px;color:rgb(32,31,30);background-color:rgb(255,255,255)"><span>The
error I get is..</span></span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="margin:0px;font-size:15px;color:rgb(32,31,30);background-color:rgb(255,255,255)"><span><br>
</span></span></div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span>Copyright (C) 1995-2019 - All Rights Reserved<br>
</span>
<div> University Corporation for Atmospheric Research<br>
</div>
<div> NCAR Command Language Version 6.6.2<br>
</div>
<div> The use of this software is governed by a License Agreement.<br>
</div>
<div> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Variable: locY<br>
</div>
<div>Type: integer<br>
</div>
<div>Total Size: 4 bytes<br>
</div>
<div> 1 values<br>
</div>
<div>Number of Dimensions: 1<br>
</div>
<div>Dimensions and sizes: [1]<br>
</div>
<div>Coordinates:<br>
</div>
<div>Number Of Attributes: 1<br>
</div>
<div> _FillValue : -2147483647<br>
</div>
<div>(0) 53<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Variable: locX<br>
</div>
<div>Type: integer<br>
</div>
<div>Total Size: 4 bytes<br>
</div>
<div> 1 values<br>
</div>
<div>Number of Dimensions: 1<br>
</div>
<div>Dimensions and sizes: [1]<br>
</div>
<div>Coordinates:<br>
</div>
<div>Number Of Attributes: 1<br>
</div>
<div> _FillValue : -2147483647<br>
</div>
<div>(0) 0<br>
</div>
<div>(0) LATITUDE, SOUTH IS NEGATIVE (degree_north) : min=-27.42 max=-24.0203<br>
</div>
<div>(0) LONGITUDE, WEST IS NEGATIVE (degree_east) : min=-65.6508 max=-62.762<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Variable: temp<br>
</div>
<div>Type: integer<br>
</div>
<div>Total Size: 12 bytes<br>
</div>
<div> 3 values<br>
</div>
<div>Number of Dimensions: 1<br>
</div>
<div>Dimensions and sizes: [3]<br>
</div>
<div>Coordinates:<br>
</div>
<div>(0) 97<br>
</div>
<div>(1) 39<br>
</div>
<div>(2) 30<br>
</div>
<div><br>
</div>
<div>Variable: t2<br>
</div>
<div>Type: float<br>
</div>
<div>Total Size: 453960 bytes<br>
</div>
<div> 113490 values<br>
</div>
<div>Number of Dimensions: 3<br>
</div>
<div>Dimensions and sizes: [Time | 97] x [south_north | 39] x [west_east | 30]<br>
</div>
<div>Coordinates:<br>
</div>
<div>Number Of Attributes: 6<br>
</div>
<div> FieldType : 104<br>
</div>
<div> MemoryOrder : XY<br>
</div>
<div> description : Temp.(C)<br>
</div>
<div> units : K<br>
</div>
<div> stagger :<br>
</div>
<div> coordinates : XLONG XLAT XTIME<br>
</div>
<div><br>
</div>
<div>Variable: hr<br>
</div>
<div>Type: float<br>
</div>
<div>Total Size: 453960 bytes<br>
</div>
<div> 113490 values<br>
</div>
<div>Number of Dimensions: 3<br>
</div>
<div>Dimensions and sizes: [Time | 97] x [south_north | 39] x [west_east | 30]<br>
</div>
<div>Coordinates:<br>
</div>
<div>Number Of Attributes: 6<br>
</div>
<div> description : Hum. (%)<br>
</div>
<div> units : %<br>
</div>
<div> coordinates : XLONG XLAT XTIME<br>
</div>
<div> stagger :<br>
</div>
<div> MemoryOrder : XY<br>
</div>
<div> FieldType : 104<br>
</div>
<div>fatal:Subscript out of range, error in subscript #1<br>
</div>
<div>fatal:An error occurred reading rain<br>
</div>
<div>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 165 in file meteo_abrapampa_b.ncl<br>
</div>
<span></span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Someone can help me with this?</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Best Regards</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Carina</div>
<div id="gmail-m_-4448633479463043862gmail-m_943664830120808465Signature">
<p><br>
</p>
<p>Enviado desde <a href="http://aka.ms/weboutlook" target="_blank">Outlook</a><br>
</p>
</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></blockquote></div>
</blockquote></div>