Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
I need to slice off north and south of 85 degrees lat (in order to tile for google maps), so I build a bounds:
LatLonRect bounds = new LatLonRect( new LatLonPointImpl ( -85, -180 ), 170, 360 );and call GeoGrid.subset on my input GeoGrid to produce say GG2. This works fine.
But I then go onto to subset GG2, to get say just the northwest quarter of the 'world' , and I get the following error
ucar.ma2.InvalidRangeException at ucar.ma2.Range.element(Range.java:337) at ucar.ma2.Range.<init>(Range.java:312) at ucar.nc2.Variable.makeSectionRanges(Variable.java:421) at ucar.nc2.Variable.read(Variable.java:603) at ucar.nc2.dataset.VariableDS._read(VariableDS.java:279) at ucar.nc2.Variable.read(Variable.java:643)at ucar.nc2.dataset.CoordinateAxis1D.readValues(CoordinateAxis1D.java: 482)
at ucar.nc2.dataset.CoordinateAxis1D.doRead(CoordinateAxis1D.java:431)at ucar.nc2.dataset.CoordinateAxis1D.getCoordEdge(CoordinateAxis1D.java: 152)
at ucar.nc2.dt.grid.GridCoordSys.getBoundingBox(GridCoordSys.java:879) at ucar.nc2.dt.grid.GridCoordSys.<init>(GridCoordSys.java:384) at ucar.nc2.dt.grid.GeoGrid.subset(GeoGrid.java:632) at ucar.nc2.dt.grid.GeoGrid.subset(GeoGrid.java:591) at glmpc.worldmap.tools.GebcoTiler.main(GebcoTiler.java:I have no idea why this is happening. I can try to provide code and datafile if necessary.
Maybe Geogrid subsetting can not extend past one subset operaion. Is there shared state among the Geogrids maybe?
Any help gratefully appreciated.Of course if any one has already cut up this dataset for Google Maps tiles I would very much like to talk to you ;)
Stuart
netcdf-java
archives: