private TimeCoord getTimeCoordinate(CoordinateAxis1DTime axis) { // check for same axis for (TimeCoord tc : times) { if (tc.getAxisName().equals(axis.getFullName())) return tc; } // check for same offsets TimeCoord want = new TimeCoord(runDate, axis); for (TimeCoord tc : times) { if ((tc.equalsData(want))) return tc; } // its a new one times.add(want); return want; }
private TimeCoord getTimeCoordinate(CoordinateAxis1DTime axis) { // check for same axis for (TimeCoord tc : times) { if (tc.getAxisName().equals(axis.getFullName())) return tc; } // check for same offsets TimeCoord want = new TimeCoord(runDate, axis); for (TimeCoord tc : times) { if ((tc.equalsData(want))) return tc; } // its a new one times.add(want); return want; }
private TimeCoord getTimeCoordinate(CoordinateAxis1DTime axis) { // check for same axis for (TimeCoord tc : times) { if (tc.getAxisName().equals(axis.getFullName())) return tc; } // check for same offsets TimeCoord want = new TimeCoord(runDate, axis); for (TimeCoord tc : times) { if ((tc.equalsData(want))) return tc; } // its a new one times.add(want); return want; }
f.format("rt=%s (%s)", runTimeAxis.getFullName(), runTimeAxis.getClass().getName()); if (showCoords) showCoords(runTimeAxis, f); f.format("%n");
f.format("rt=%s (%s)", runTimeAxis.getFullName(), runTimeAxis.getClass().getName()); if (showCoords) showCoords(runTimeAxis, f); f.format("%n");
runtimes = Arrays.asList(runDates); runtimeDimName = runtimeCoord.getDimension(0).getShortName(); coordSet.add(runtimeCoord.getFullName());
TimeCoord(CalendarDate runDate, CoordinateAxis1DTime axis) { this.runDate = runDate; this.axisName = axis.getFullName(); DateUnit unit = null; try { unit = new DateUnit(axis.getUnitsString()); } catch (Exception e) { throw new IllegalArgumentException("Not a unit of time " + axis.getUnitsString()); } int n = (int) axis.getSize(); if (axis.isInterval()) { this.isInterval = true; this.bound1 = new double[n]; this.bound2 = new double[n]; double[] orgBound1 = axis.getBound1(); double[] orgBound2 = axis.getBound2(); this.bound2 = new double[n]; for (int i = 0; i < axis.getSize(); i++) { this.bound1[i] = getValueInHours(unit, orgBound1[i]); this.bound2[i] = getValueInHours(unit, orgBound2[i]); } } else { offset = new double[n]; for (int i = 0; i < axis.getSize(); i++) { offset[i] = getValueInHours(unit, axis.getCoordValue(i)); } } }
TimeCoord(CalendarDate runDate, CoordinateAxis1DTime axis) { this.runDate = runDate; this.axisName = axis.getFullName();
TimeCoord(CalendarDate runDate, CoordinateAxis1DTime axis) { this.runDate = runDate; this.axisName = axis.getFullName();
Assert.assertNotNull(gridName, cov); CoverageCoordAxis ccaRuntime = cd.findCoordAxis(runAxis.getFullName()); Assert.assertNotNull(runAxis.getFullName(), ccaRuntime); Assert.assertEquals(CoverageCoordAxis.Spacing.irregularPoint, ccaRuntime.getSpacing());