GridDatatype grid = gridDs.findGridDatatype(gridName);
assert (grid != null) : "Cant find grid "+gridName;
GridCoordSystem gcs = grid.getCoordinateSystem();
CoordinateAxis1DTime runtime = gcs.getRunTimeAxis();
assert (runtime != null) : "Cant find runtime for "+gridName;
CoordinateAxis time = gcs.getTimeAxis();
assert (time != null) : "Cant find time for "+gridName;
assert (time.getRank() == 2) : "Time should be 2D "+gridName;
if (showCount) {
System.out.println(" runtimes=" + runtime.getSize());
System.out.println(" ntimes=" + time.getDimension(1).getLength());
}
if (ngrids >= 0)
assert ngrids == countGrids : "Grids " + ngrids + " != " + countGrids;
//if (ncoordSys >= 0)
// assert ncoordSys == countCoordSys : "CoordSys " + ncoordSys + " != " + countCoordSys;
if (ncoordAxes >= 0)
assert ncoordAxes == countCoordAxes : "CoordAxes " + ncoordAxes + " != " + countCoordAxes;
if (nVertCooordAxes >= 0)
assert nVertCooordAxes == countVertCooordAxes : "VertAxes" + nVertCooordAxes + " != " + countVertCooordAxes;
if (nruns >= 0)
assert runtime.getSize() == nruns : runtime.getSize()+" != "+ nruns;
if (nruns >= 0)
assert time.getDimension(0).getLength() == nruns : " nruns should be "+ nruns;
if (ntimes >= 0)
assert time.getDimension(1).getLength() == ntimes : " ntimes should be "+ ntimes;