[ncl-talk] Subscript out of range

Rick Brownrigg brownrig at ucar.edu
Wed Jul 31 08:24:10 MDT 2019


Hi,

Its hard to tell from just visual inspection of your script, but that error
message always means what it says -- trying to index into an array beyond
its bounds.  By my measure, line 165 is this:

  arain_point  = rain(:,locY,locX)

Perhaps print the variables rain, locY, locX for insight into the bug.

Hope that helps...
Rick

On Wed, Jul 31, 2019 at 6:44 AM Carina V. Barca via ncl-talk <
ncl-talk at ucar.edu> wrote:

> Hello I have trouble with ncl script.
> I'm trying to draw a meteogram with rain
>
> *ncl -V*
> 6.6.2
>
> *ncdump -h wrfout_d01.nc <http://wrfout_d01.nc/>*  (attach file
> ncdump.txt)
> Attach file meteo_abrapampa_b.ncl
>
> The error I get is..
>
> Copyright (C) 1995-2019 - All Rights Reserved
>  University Corporation for Atmospheric Research
>  NCAR Command Language Version 6.6.2
>  The use of this software is governed by a License Agreement.
>  See http://www.ncl.ucar.edu/ for more details.
>
>
> Variable: locY
> Type: integer
> Total Size: 4 bytes
>             1 values
> Number of Dimensions: 1
> Dimensions and sizes:   [1]
> Coordinates:
> Number Of Attributes: 1
>   _FillValue :  -2147483647
> (0)     53
>
>
> Variable: locX
> Type: integer
> Total Size: 4 bytes
>             1 values
> Number of Dimensions: 1
> Dimensions and sizes:   [1]
> Coordinates:
> Number Of Attributes: 1
>   _FillValue :  -2147483647
> (0)     0
> (0)     LATITUDE, SOUTH IS NEGATIVE (degree_north) : min=-27.42
> max=-24.0203
> (0)     LONGITUDE, WEST IS NEGATIVE (degree_east) : min=-65.6508
> max=-62.762
>
>
> Variable: temp
> Type: integer
> Total Size: 12 bytes
>             3 values
> Number of Dimensions: 1
> Dimensions and sizes:   [3]
> Coordinates:
> (0)     97
> (1)     39
> (2)     30
>
> Variable: t2
> Type: float
> Total Size: 453960 bytes
>             113490 values
> Number of Dimensions: 3
> Dimensions and sizes:   [Time | 97] x [south_north | 39] x [west_east | 30]
> Coordinates:
> Number Of Attributes: 6
>   FieldType :   104
>   MemoryOrder : XY
>   description : Temp.(C)
>   units :       K
>   stagger :
>   coordinates : XLONG XLAT XTIME
>
> Variable: hr
> Type: float
> Total Size: 453960 bytes
>             113490 values
> Number of Dimensions: 3
> Dimensions and sizes:   [Time | 97] x [south_north | 39] x [west_east | 30]
> Coordinates:
> Number Of Attributes: 6
>   description : Hum. (%)
>   units :       %
>   coordinates : XLONG XLAT XTIME
>   stagger :
>   MemoryOrder : XY
>   FieldType :   104
> fatal:Subscript out of range, error in subscript #1
> fatal:An error occurred reading rain
> fatal:["Execute.c":8637]:Execute: Error occurred at or near line 165 in
> file meteo_abrapampa_b.ncl
>
> Someone can help me with this?
> Best Regards
>
> Carina
>
>
> Enviado desde Outlook <http://aka.ms/weboutlook>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190731/4e09090e/attachment.html>


More information about the ncl-talk mailing list