DataRecord getDataRecord(SubsetParams coords) throws IOException { // identify the master index for this runtime CalendarDate runtime = coords.getRunTime(); int masterIdx = masterRuntime.getIndex(runtime.getMillis()); // LOOK ok to use Best like this (see other getDataRecord) ? if (masterIdx < 0) { // means that the runtie is not in the masterRuntime list throw new RuntimeException("masterRuntime does not contain runtime " + runtime); } // each runtime is mapped to a partition int partno = run2part[masterIdx]; if (partno < 0) return null; // LOOK is this possible? // find the 2D vi in that partition GribCollectionImmutable.VariableIndex compVindex2D = getVindex2D(partno); // the 2D component variable in the partno partition if (compVindex2D == null) return null; // missing if (Grib.debugRead) System.out.printf(" compVindex2D = %s%n", compVindex2D.toStringFrom()); if (isPartitionOfPartitions) { VariableIndexPartitioned compVindex2Dp = (VariableIndexPartitioned) compVindex2D; return compVindex2Dp.getDataRecord(coords); } // otherwise its a GribCollection GribCollectionImmutable.Record record = compVindex2D.getRecordAt(coords); if (record == null) return null; if (Grib.debugRead) System.out.printf(" result success: partno=%d fileno=%d %n", partno, record.fileno); DataRecord dr = new DataRecord(PartitionCollectionImmutable.this, partno, compVindex2D.group.getGdsHorizCoordSys(), record); if (GribDataReader.validator != null) dr.validation = coords; return dr; }
switch (coord.getType()) { case runtime: CalendarDate runtimeCooord = coords.getRunTime(); idx = coord.getIndex(runtimeCooord); runIdx = idx;
CalendarDate rt_val = coords.getRunTime(); boolean runtimeOk = true; if (rt_val != null) {
CalendarDate rt_val = coords.getRunTime(); boolean runtimeOk = true; if (rt_val != null) {
CalendarDate wantRuntime = coords.getRunTime(); CalendarDate refdate = gr.getReferenceDate(); Assert.assertEquals("runtime", refdate, wantRuntime);
CalendarDate wantRuntime = coords.getRunTime(); CalendarDate refdate = gr.getReferenceDate(); Assert.assertEquals("runtime", wantRuntime, refdate);
CalendarDate runtime = params.getRunTime(); if (timeOffset != null) { if (runtime != null) {