@Test @Category(NeedsCdmUnitTest.class) public void testLatLonSubset() throws Exception { try (GridDataset dataset = GridDataset.open(TestDir.cdmUnitTestDir + "conventions/cf/SUPER-NATIONAL_latlon_IR_20070222_1600.nc")) { GeoGrid grid = dataset.findGridByName("micron11"); assert null != grid; GridCoordSystem gcs = grid.getCoordinateSystem(); assert null != gcs; assert grid.getRank() == 2; logger.debug("original bbox = {}", gcs.getBoundingBox()); LatLonRect bbox = new LatLonRect(new LatLonPointImpl(40.0, -100.0), 10.0, 20.0); testLatLonSubset(grid, bbox, new int[]{141, 281}); bbox = new LatLonRect(new LatLonPointImpl(-40.0, -180.0), 120.0, 300.0); testLatLonSubset(grid, bbox, new int[]{800, 1300}); } }