Re: [netcdf-java] indexing error/bug

Hi Sachin:

it is a bug in VerticalTransformImpl. I have fixed in release 2.2.22.16.
If was failing on the case when the x or y dimension had only one point.

thanks for reporting!

Sachin Kumar Bhate wrote:
> Hello,
> 
> I am trying to get the array for vertical transform for 'temp'
> grid for the dataset
> ftp://ftp.ssc.hpc.msstate.edu/outgoing/skbhate/nopp/test_bora.nc'
> 
> But, I get this error,
> 
> ??? Java exception occurred:
> java.lang.ArrayIndexOutOfBoundsException: 1
> 
>        at ucar.unidata.geoloc.vertical.OceanS.makeHeight(OceanS.java:198)
> 
>        at 
> ucar.unidata.geoloc.vertical.OceanS.getCoordinateArray(OceanS.java:141)
> 
> 
> for the code..
> 
> GridDataset = GridDataset.open(uri);
> 
> % get the grid associated with the variable name "temp" (temperature)
> Grid = GridDataset.findGridByName('temp');
> 
> % get the coordinate system for this grid:
> GridCoordSys = Grid.getCoordinateSystem();
> 
> % if 3D, get vertical coordinate
>   zj = GridCoordSys.getVerticalTransform.getCoordinateArray(0); % 
> vertical transform
> 
> 
> right now, the ' xi_rho' is the singleton dimension, but if I change the 
> dimension to anything
> other than singleton, it works fine.
> 
> Can you suggest me why ?
> 
> thanks..
> 
> Sachin.
> 
> 
> _______________________________________________
> netcdf-java mailing list
> netcdf-java@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe, visit: 
> http://www.unidata.ucar.edu/mailing_lists/ 


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