@Override public CoverageCoordAxis copy() { return new TimeAxis2DFmrc(new CoverageCoordAxisBuilder(this)); }
@Override public Optional<CoverageCoordAxis> subset(double minValue, double maxValue, int stride) { // LOOK not implemented, maybe illegal ?? return Optional.of(new TimeAxis2DFmrc(new CoverageCoordAxisBuilder(this))); }
@Override public Optional<CoverageCoordAxis> subset(SubsetParams params) { if (params == null) return Optional.of(new TimeAxis2DFmrc(new CoverageCoordAxisBuilder(this))); CalendarDate rundate = (CalendarDate) params.get(SubsetParams.runtime); boolean runtimeAll = (Boolean) params.get(SubsetParams.runtimeAll); boolean latest = (rundate == null) && !runtimeAll; // default is latest int run_index = -1; if (latest) { run_index = runCoord.getNcoords() - 1; } else if (rundate != null){ double rundateTarget = runCoord.convert(rundate); CoordAxisHelper helper = new CoordAxisHelper(runCoord); run_index = helper.findCoordElement(rundateTarget, true); // LOOK Bounded } if (run_index >= 0) { CoverageCoordAxis1D time1D = getTimeAxisForRun(run_index); return time1D.subset(params); } // no subsetting needed return Optional.of(new TimeAxis2DFmrc(new CoverageCoordAxisBuilder(this))); }
if (ftype == FeatureType.FMRC) { builder.setDependsOn(dtCoordAxis.getDimension(0).getFullName()); // only the first dimension return ucar.nc2.util.Optional.of(new TimeAxis2DFmrc(builder));
builder.setSpacingFromValues(time2D.isTimeInterval()); return new TimeAxis2DFmrc(builder); // LOOK should be FmrcTimeAxisReg2D to take advantage of regular