Map<Integer, Product> pdsSet = new HashMap<Integer, Product>();
List<GridRecord> grList = index.getGridRecords();
for (GridRecord gr : grList) {
GribGridRecord ggr = (GribGridRecord) gr;
GribPds pds = ggr.getPds();
if (!pds.isInterval()) continue;
//int startInterval = ggr.startOfInterval;
//if ((startInterval == GribNumbers.UNDEFINED) || (startInterval == GribNumbers.MISSING)) continue;
/* check valid time == base time + forecast
int forecast = ggr.forecastTime;
Date validTime = ggr.getValidTime();
Date refTime = ggr.getReferenceTime();
if (forecast != startInterval) {
String name = ParameterTable.getParameterName(ggr.discipline, ggr.category, ggr.paramNumber) +"/" + Grib2Tables.codeTable4_5(ggr.levelType1);
System.out.printf(" **time %s %d != %d%n", name, forecast, startInterval);
} */
Product bean = pdsSet.get(ggr.cdmVariableHash());
if (bean == null) {
bean = new Product(ggr);
pdsSet.put(ggr.cdmVariableHash(), bean);
nintVars++;
}
bean.list.add(ggr);
}