Re: [netcdf-java] ArrayIndexOutOfBoundsException reading from NcML/OPeNDAP dataset

Hi John,

According to the manifest, the version was: Implementation-Version:
4.0.28.20081224.0135.

Just tried the latest version (4.0.29.20090109.0256) and the problem
persists, I'm afraid.

Thanks,
Jon

2009/1/12 John Caron <caron@xxxxxxxxxxxxxxxx>:
> Hi Jon:
>
> Can you give me the exact version.date on the jar? I did fix some bugs there 
> recently. You could also try the release i made friday (4.0.29) and see if 
> its still happening.
>
> Jon Blower wrote:
>> Hi all,
>>
>> I'm getting a strange problem when reading data from a certain
>> dataset.  The NcML is attached (it's from Rich Signell at USGS) and it
>> essentially aggregates a few OPeNDAP endpoints.  The CDL for the
>> variable in question looks OK:
>>
>> short water_temp(time=32, depth=34, lat=561, lon=401);
>>      :_CoordinateAxes = "time depth lat lon ";
>>      :long_name = "Water Temperature";
>>      :units = "degC";
>>      :NAVO_code = 15; // int
>>      :_FillValue = -30000s; // short
>>      :missing_value = -30000s; // short
>>      :scale_factor = 0.0010f; // float
>>      :add_offset = 20.0f; // float
>>
>> (generated using ToolsUI-4.0).  I can read the metadata from this
>> variable without a problem.  However, when I try to read actual data I
>> get a problem at the line:
>>
>> GridDatatype subset = grid.makeSubset(null, null, tRange, zRange,
>> yRange, xRange);
>>
>> "grid" is a GridDatatype object representing the un-subsetted
>> water_temp variable, whose shape is [32, 34, 561, 401] as expected.
>> The values of the various Ranges at this point are:
>>   tRange: 31:31
>>   zRange: 0:0
>>   yRange: 1:559
>>   zRange: 1:399
>>
>> These all look fine, and are within the range of the various axis
>> lengths.  However I get the following exception:
>>
>> java.lang.ArrayIndexOutOfBoundsException: 1
>>       at 
>> ucar.nc2.dataset.CoordinateAxis1D.readValues(CoordinateAxis1D.java:636)
>>       at ucar.nc2.dataset.CoordinateAxis1D.doRead(CoordinateAxis1D.java:569)
>>       at 
>> ucar.nc2.dataset.CoordinateAxis1D.getCoordName(CoordinateAxis1D.java:116)
>>       at ucar.nc2.dt.grid.GridCoordSys.makeTimes(GridCoordSys.java:1290)
>>       at ucar.nc2.dt.grid.GridCoordSys.<init>(GridCoordSys.java:463)
>>       at ucar.nc2.dt.grid.GeoGrid.subset(GeoGrid.java:750)
>>       at ucar.nc2.dt.grid.GeoGrid.makeSubset(GeoGrid.java:757)
>>
>>  I am using a very recent download of the netcdf-4.0.jar from the web.
>>  Can anyone help?  Is this a problem in my code or is it a bug in
>> nj4.0?
>>
>> Thanks in advance,
>> Jon
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> netcdf-java mailing list
>> netcdf-java@xxxxxxxxxxxxxxxx
>> For list information or to unsubscribe, visit: 
>> http://www.unidata.ucar.edu/mailing_lists/
>



-- 
Dr Jon Blower
Technical Director, Reading e-Science Centre
Environmental Systems Science Centre
University of Reading
Harry Pitt Building, 3 Earley Gate
Reading RG6 6AL. UK
Tel: +44 (0)118 378 5213
Fax: +44 (0)118 378 6413
j.d.blower@xxxxxxxxxxxxx
http://www.nerc-essc.ac.uk/People/Staff/Blower_J.htm


  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: