error using coordinate subscripting

From: Don Murray (NOAA Affiliate) <don.murray_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 26 2014 - 09:43:08 MDT

Hi

I'm resending this since a colleague didn't see it turn up on the list
and I haven't had a response. Perhaps the zip file attachment in the
original made it go into the ether (it was under the size limits).

-------- Original Message --------
Subject: error using coordinate subscripting
Date: Tue, 18 Mar 2014 13:52:04 -0600
From: Don Murray (NOAA Affiliate) <don.murray@noaa.gov>
Reply-To: Don.Murray@noaa.gov
Organization: NOAA/ESRL/PSD and CU-CIRES
To: ncl-talk@ucar.edu

Hi-

I have a script that was working in NCL 5.2.1 and 6.0.0, but doesn't
work in version 6.1.2. I've searched the archives, but I didn't see
this reported, but maybe I didn't use the right search terms.

The error occurs when trying to subset the data with something like:

   vardata = datafile->$varname$(:,{minLat:maxLat},{minLon:maxLon})

With this, under 5.2.1 it works fine. In 6.1.2, I get:

fatal:["NclAdvancedFile.c":2869]:Subscript out of range, error in
subscript #2
fatal:["Execute.c":8128]:Execute: Error occurred at or near line 128 in
file readdata.ncl

fatal:["Execute.c":8128]:Execute: Error occurred at or near line 297 in
file readdata.ncl

If I change the code to be:

   tmpdata = datafile->$varname$
   vardata = tmpdata(:,{minLat:maxLat},{minLon:maxLon})

it works, but then I'm reading in the entire variable (aren't I?) and I
have to change my code before upgrading to 6.1.2. There is also a
problem when I try to subset on level (for a 3D dataset) where I use the
exact value of the single level in the grid and I get an error.

I can upload a zip file with data and a sample script if needed.

Thanks for any help you can provide.

Don

-- 
Don Murray
NOAA/ESRL/PSD and CU-CIRES
303-497-3596
http://www.esrl.noaa.gov/psd/people/don.murray/
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Mar 26 09:43:19 2014

This archive was generated by hypermail 2.1.8 : Mon Mar 31 2014 - 11:47:09 MDT