asascience-open / NetCDF-Java-UGRID

NetCDF-Java-UGRID
5 stars 1 forks source link

Exception with requesting too large subset area #1

Open acrosby opened 13 years ago

acrosby commented 13 years ago

An exception occurs when requesting a large area of subset.

This occurs when subsetting "dods://testbedapps.sura.org/thredds/dodsC/ugrid/TestCases/ELCIRC/elcirc_delt.ncml" by lat = [30.973509 40.57480] and lon = [-80.580238 -40.786243].

Exception is : "java.lang.ArrayIndexOutOfBoundsException: -1

at java.util.ArrayList.get(Unknown Source)

at ucar.nc2.dt.ugrid.ConnectivityVariable.createCells(ConnectivityVariable.java:141)

at ucar.nc2.dt.ugrid.Mesh.processConnectivityVariables(Mesh.java:95)

at ucar.nc2.dt.ugrid.Mesh.(Mesh.java:54)

at ucar.nc2.dt.ugrid.UGridDataset.constructMeshVariable(UGridDataset.java:157)

at ucar.nc2.dt.ugrid.UGridDataset.(UGridDataset.java:143)

at ucar.nc2.dt.ugrid.UGridDataset.(UGridDataset.java:123)

at ucar.nc2.dt.ugrid.UGridDataset.subset(UGridDataset.java:405)"

kwilcox commented 13 years ago

Most likely due to subtracting the start index from the read value, since the connectivity variable startes at "1" and not "0".