static void readAllTimes1D(Coverage cover, GridDatatype dt, CalendarDate rt_val, int rt_idx, CoordinateAxis1DTime timeAxis, CoordinateAxis1D ensAxis, CoordinateAxis1D vertAxis) { if (timeAxis == null) readAllEnsembles(cover, dt, rt_val, rt_idx, null, -1, ensAxis, vertAxis); else { for (int i = 0; i < timeAxis.getSize(); i++) { CalendarDate timeDate = timeAxis.isInterval() ? timeAxis.getCoordBoundsMidpointDate(i) : timeAxis.getCalendarDate(i); readAllEnsembles(cover, dt, rt_val, rt_idx, timeDate, i, ensAxis, vertAxis); } } }
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)); } } }
if (axis.isInterval()) { this.isInterval = true; this.bound1 = new double[n];
if (axis.isInterval()) { this.isInterval = true; this.bound1 = new double[n];