public void testSubset() throws Exception {
ucar.nc2.dt.grid.GridDataset dataset = GridDataset.open(TestGrid.topDir+"rankTest.nc");
GeoGrid grid = dataset.findGridByName("full4");
assert null != grid;
GridCoordSystem gcs = grid.getCoordinateSystem();
assert null != gcs;
assert grid.getRank() == 4;
doRead4(grid);
GeoGrid grid_section = grid.subset(null, new Range(0,3,2), null, null);
GridCoordSystem gcs_section = grid_section.getCoordinateSystem();
CoordinateAxis zaxis = gcs_section.getVerticalAxis();
assert zaxis.getSize() == 2;
assert gcs_section.getXHorizAxis().equals( gcs.getXHorizAxis());
assert gcs_section.getYHorizAxis().equals( gcs.getYHorizAxis());
assert gcs_section.getTimeAxis().equals( gcs.getTimeAxis());
Array data = grid_section.readDataSlice(-1, -1, -1, -1);
NCdump.printArray( data, "grid_section", System.out, null);
dataset.close();