// show params that are time intervals, how they relate to Grib2Pds.makeDate().
// Grib2 only
public void showTimeInterval2(String filename) throws IOException {
GridServiceProvider.debugOpen = true;
NetcdfFile ncd = NetcdfFile.open(filename);
DateFormatter df = new DateFormatter();
Calendar cal = Calendar.getInstance();
GribGridServiceProvider iosp = (GribGridServiceProvider) ncd.getIosp();
GridIndex index = (GridIndex) iosp.sendIospMessage("GridIndex");
List<GridRecord> grList = index.getGridRecords();
for (GridRecord gr : grList) {
GribGridRecord ggr = (GribGridRecord) gr;
if (!ggr.isInterval()) continue;
Grib2Pds pds = (Grib2Pds) ggr.getPds();
System.out.printf(" ref=%s fore=%s%n", df.toDateTimeStringISO(gr.getReferenceTime()), df.toDateTimeStringISO(pds.getForecastDate()));
Grib2Pds.PdsInterval pdsIntv = (Grib2Pds.PdsInterval) pds;
long timeEnd = pdsIntv.getIntervalTimeEnd();
int[] intv = pds.getForecastTimeInterval();
long startDate = Grib2Pds.makeDate(gr.getReferenceTime().getTime(), pds.getTimeUnit(), intv[0], cal);
long endDate = Grib2Pds.makeDate(gr.getReferenceTime().getTime(), pds.getTimeUnit(), intv[1], cal);
System.out.printf(" intv=[%s, %s] = [%d,%d]%n", df.toDateTimeStringISO(new Date(startDate)),
df.toDateTimeStringISO(new Date(endDate)), intv[0], intv[1]);
System.out.printf(" timeEnd=%s", df.toDateTimeStringISO(new Date(timeEnd)));
if (timeEnd == startDate)
System.out.printf(" agrees with intv start");
if (timeEnd == endDate)
System.out.printf(" agrees with intv end");