Re: subscript error

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 17 Jul 2007 16:04:02 -0600 (MDT)

Hi Huseyin,

I wasn't getting the same error message as you, but I did get a
message indicating that a coordinate variable was not the correct
size.

You hve the following code:

   data!0 = "yil"
   data!1 = "ist"
   data&yil = yillar

The "yillar" array has 37 elements. You are trying to assign it as the
coordinate array of the 0-th (leftmost) dimension of "data", but this
dimension is only 36 elements:

Variable: yillar
Type: integer
Total Size: 148 bytes
             37 values
Number of Dimensions: 1
Dimensions and sizes: [37]
Coordinates:

Variable: data
Type: float
Total Size: 720 bytes
             180 values
Number of Dimensions: 2
Dimensions and sizes: [36] x [5]
Coordinates:
Number Of Attributes: 1
   _FillValue : -999

The coordinate array must be the same length as the dimension it's
being assigned to. Please adjust "yillar" or "data" accordingly, and
this should at least fix this problem.

--Mary

On Tue, 17 Jul 2007, HUSEYIN OZDEMIR wrote:

> Hi all,
>
> I have a problem with my script. When I run ncl it
> gives the error below. I have attached my ncl script
> and the "txt" files. What shall I do to solve it?
>
> fatal:Subscript out of range, error in subscript #0
> fatal:An error occurred reading data_ham
> fatal:Execute: Error occurred at or near line 39 in
> file script_.ncl
>
> Huseyin
>
>
>
> ____________________________________________________________________________________
> Don't pick lemons.
> See all the new 2007 cars at Yahoo! Autos.
> http://autos.yahoo.com/new_cars.html
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jul 17 2007 - 16:04:02 MDT

This archive was generated by hypermail 2.2.0 : Wed Jul 18 2007 - 17:38:11 MDT