return fmrc.getConstantForecastDataset(date); } else if (config.fmrcConfig.getBestDatasets() != null) { for (FeatureCollectionConfig.BestDataset bd : config.fmrcConfig.getBestDatasets()) { if (wantName.endsWith(bd.name)) { return fmrc.getDatasetBest(bd);
if (config.fmrcConfig.getBestDatasets() != null) { for (FeatureCollectionConfig.BestDataset bd : config.fmrcConfig.getBestDatasets()) { InvDatasetImpl ds = new InvDatasetImpl(this, bd.name); String name = getName() + "_" + bd.name;
if (config.fmrcConfig.getBestDatasets() != null) { for (FeatureCollectionConfig.BestDataset bd : config.fmrcConfig.getBestDatasets()) { InvDatasetImpl ds = new InvDatasetImpl(this, bd.name); String name = getName() + "_" + bd.name;
if (fmrcElem != null) { String regularize = fmrcElem.getAttributeValue("regularize"); config.fmrcConfig = new FeatureCollectionConfig.FmrcConfig(regularize); config.fmrcConfig.addDatasetType(datasetTypes); String offs = best.getAttributeValue("offsetsGreaterEqual"); double off = Double.parseDouble(offs); config.fmrcConfig.addBestDataset(bestName, off);
if (fmrcElem != null) { String regularize = fmrcElem.getAttributeValue("regularize"); config.fmrcConfig = new FeatureCollectionConfig.FmrcConfig(regularize); config.fmrcConfig.addDatasetType(datasetTypes); String offs = best.getAttributeValue("offsetsGreaterEqual"); double off = Double.parseDouble(offs); config.fmrcConfig.addBestDataset(bestName, off);
if (fmrcElem != null) { String regularize = fmrcElem.getAttributeValue("regularize"); config.fmrcConfig = new FeatureCollectionConfig.FmrcConfig(regularize); config.fmrcConfig.addDatasetType(datasetTypes); String offs = best.getAttributeValue("offsetsGreaterEqual"); double off = Double.parseDouble(offs); config.fmrcConfig.addBestDataset(bestName, off);
if (fmrcElem != null) { String regularize = fmrcElem.getAttributeValue("regularize"); config.fmrcConfig = new FeatureCollectionConfig.FmrcConfig(regularize); config.fmrcConfig.addDatasetType(datasetTypes); String offs = best.getAttributeValue("offsetsGreaterEqual"); double off = Double.parseDouble(offs); config.fmrcConfig.addBestDataset(bestName, off); String offs = best.getAttributeValue("offsetsGreaterEqual"); double off = Double.parseDouble(offs); config.fmrcConfig.addBestDataset(bestName, off);
return fmrc.getConstantForecastDataset(date); } else if (config.fmrcConfig.getBestDatasets() != null) { for (FeatureCollectionConfig.BestDataset bd : config.fmrcConfig.getBestDatasets()) { if (wantName.endsWith(bd.name)) { return fmrc.getDatasetBest(bd);
@Test public void testBestOffsetGE() throws IOException { FeatureCollectionConfig config = new FeatureCollectionConfig("espresso_2013_da_his_fmrc_offset_with_Offset_in_filename", "DavidRobertson", FeatureCollectionType.FMRC, TestDir.cdmUnitTestDir + "ft/fmrc/espresso/.*.nc$", null, "#espresso_his_#yyyyMMdd_HHmm", null, null, null); config.fmrcConfig.regularize=false; config.fmrcConfig.addBestDataset("Best", 26); Formatter errlog = new Formatter(); Fmrc fmrc = Fmrc.open(config, errlog); assert (fmrc != null) : errlog; FeatureCollectionConfig.BestDataset bd = new FeatureCollectionConfig.BestDataset("Best", 26); try (ucar.nc2.dt.GridDataset gridDs = fmrc.getDatasetBest(bd)) { GridDatatype grid = gridDs.findGridByShortName("salt"); GridCoordSystem gcs = grid.getCoordinateSystem(); CoordinateAxis1D timeAxis = gcs.getTimeAxis1D(); logger.debug("timeAxis = {} {}", NCdumpW.toString(timeAxis.read()), timeAxis.getUnitsString()); CoordinateAxis1D runAxis = gcs.getRunTimeAxis(); logger.debug("runAxis = {} {}", NCdumpW.toString( runAxis.read()), runAxis.getUnitsString()); CalendarDate expected = CalendarDate.parseISOformat(null, "2013-05-05T00:00:00"); CalendarDateUnit cdu = CalendarDateUnit.of(null, timeAxis.getUnitsString()); Assert.assertEquals(expected, cdu.getBaseCalendarDate()); CalendarDateUnit cdu2 = CalendarDateUnit.of(null, runAxis.getUnitsString()); Assert.assertEquals(expected, cdu2.getBaseCalendarDate()); for (int i=0; i<runAxis.getSize(); i++) { Assert.assertEquals("run coord", i<12 ? 0 : 24, runAxis.getCoordValue(i), 1.0e-8); } } }