public void testAggByteGiniSubsetStride() throws Exception {
GridDataset dataset = GridDataset.open(TestAll.cdmUnitTestDir + "formats/gini/giniAggByte.ncml"); // R:\testdata2\satellite\gini
GeoGrid grid = dataset.findGridByName("IR");
assert null != grid;
GridCoordSystem gcs = grid.getCoordinateSystem();
assert null != gcs;
assert grid.getRank() == 3;
int[] org_shape = grid.getShape();
assert grid.getDataType() == DataType.SHORT;
Array data_org = grid.readDataSlice(0, 0, -1, -1);
assert data_org != null;
assert data_org.getRank() == 2;
int[] data_shape = data_org.getShape();
assert org_shape[1] == data_shape[0];
assert org_shape[2] == data_shape[1];
assert data_org.getElementType() == short.class : data_org.getElementType();
System.out.println("original bbox= " + gcs.getBoundingBox());
LatLonRect bbox = new LatLonRect(new LatLonPointImpl(40.0, -100.0), 10.0, 20.0);
LatLonProjection llproj = new LatLonProjection();
ucar.unidata.geoloc.ProjectionRect[] prect = llproj.latLonToProjRect(bbox);
System.out.println("\n constrain bbox= " + prect[0]);
GeoGrid grid_section = grid.subset(null, null, bbox, 1, 2, 3);
GridCoordSystem gcs2 = grid_section.getCoordinateSystem();
assert null != gcs2;
assert grid_section.getRank() == 3;
assert grid_section.getDataType() == DataType.SHORT;
ucar.unidata.geoloc.ProjectionRect subset_prect = gcs2.getBoundingBox();
System.out.println(" resulting bbox= " + subset_prect);
// test stride
grid_section = grid.subset(null, null, null, 2, 2, 3);
Array data = grid_section.readVolumeData(1);