private Fmrc(String collectionSpec, Formatter errlog) throws IOException { this.manager = MFileCollectionManager.open(collectionSpec, collectionSpec, null, errlog); // LOOK no name this.config = new FeatureCollectionConfig(); this.config.spec = collectionSpec; }
@Override protected void buildNetcdfDataset(CancelTask cancelTask) throws IOException { DateExtractor dateExtractor = null; if (runMatcher != null) dateExtractor = new DateExtractorFromName(runMatcher, false); // uses path if (dateExtractor == null && dateFormatMark != null) dateExtractor = new DateExtractorFromName(dateFormatMark, true); fmrc = new Fmrc(datasetManager, new FeatureCollectionConfig()); // fill in the ncDataset fmrc.getDataset2D( ncDataset); ncDataset.finish(); }
public static Fmrc readNcML(String ncmlString, Formatter errlog) throws IOException { NcmlCollectionReader ncmlCollection = NcmlCollectionReader.readNcML(ncmlString, errlog); if (ncmlCollection == null) return null; Fmrc fmrc = new Fmrc(ncmlCollection.getCollectionManager(), new FeatureCollectionConfig()); fmrc.setNcml(ncmlCollection.getNcmlOuter(), ncmlCollection.getNcmlInner()); return fmrc; }
@Test public void testGFSconus80_dir() throws IOException { FeatureCollectionConfig config = new FeatureCollectionConfig("gfsConus80_dir", "test/gfsConus80", FeatureCollectionType.GRIB1, TestDir.cdmUnitTestDir + "gribCollections/gfs_conus80/**/.*grib1", null, null, null, "directory", null); System.out.printf("===testGFSconus80_dir %n"); boolean changed = GribCdmIndex.updateGribCollection(config, updateMode, logger); System.out.printf("changed = %s%n", changed); }
@Test public void testGFSconus80_file() throws IOException { FeatureCollectionConfig config = new FeatureCollectionConfig("gfsConus80_file", "test/gfsConus80", FeatureCollectionType.GRIB1, TestDir.cdmUnitTestDir + "gribCollections/gfs_conus80/**/.*grib1", null, null, null, "file", null); System.out.printf("===testGFSconus80_file %n"); boolean changed = GribCdmIndex.updateGribCollection(config, updateMode, logger); System.out.printf("changed = %s%n", changed); }
@Test public void testDgex() throws IOException { FeatureCollectionConfig config = new FeatureCollectionConfig("dgex_46", "test/dgex", FeatureCollectionType.GRIB2, TestDir.cdmUnitTestDir + "gribCollections/dgex/**/.*grib2", null, null, null, "file", null); boolean changed = GribCdmIndex.updateGribCollection(config, updateMode, logger); System.out.printf("changed = %s%n", changed); }
@Test public void createECMWFmad() throws IOException { // SRC FeatureCollectionConfig config = new FeatureCollectionConfig("ECMWFmad", "test/ECMWFmad", FeatureCollectionType.GRIB1, TestDir.cdmUnitTestDir + "gribCollections/ecmwf/mad/.*001$", null, null, null, "directory", null); boolean changed = GribCdmIndex.updateGribCollection(config, updateMode, logger); System.out.printf("changed = %s%n", changed); }
@Test public void createHRRRanalysis() throws IOException { // MRUTC FeatureCollectionConfig config = new FeatureCollectionConfig("HRRRanalysis", "test/HRRRanalysis", FeatureCollectionType.GRIB2, TestDir.cdmUnitTestDir + "gribCollections/anal/.*grib2$", null, null, null, "directory", null); boolean changed = GribCdmIndex.updateGribCollection(config, updateMode, logger); System.out.printf("changed = %s%n", changed); } }
@Ignore("B: not visible on spock") @Test public void testRDAds628p1_fcst_surf125_var() throws IOException { FeatureCollectionConfig config = new FeatureCollectionConfig("ds628p1_fcst_surf125_var", "rdavm/ds628p1_fcst_surf125_var", FeatureCollectionType.GRIB1, "B:/rdavm/ds628.1_fcst_surf125_var/fcst_surf125_var\\..*195812$", null, null, null, null, null); // config.gribConfig.setOption("timeUnit", "1 minute"); boolean changed = GribCdmIndex.updateGribCollection(config, CollectionUpdateType.always, logger); System.out.printf("changed = %s%n", changed); }
@Ignore("B: not visible on spock") @Test public void testCarlosMoraga() throws IOException { FeatureCollectionConfig config = new FeatureCollectionConfig("CarlosMoragaEcmwf", "CarlosMoragaEcmwf", FeatureCollectionType.GRIB1, "B:/testdata/support/CarlosMoraga/ECMWF_GNERA.*", null, null, null, null, null); boolean changed = GribCdmIndex.updateGribCollection(config, CollectionUpdateType.always, logger); System.out.printf("changed = %s%n", changed); }
@Test public void testRdvamds083p2_PofP() throws IOException { FeatureCollectionConfig config = new FeatureCollectionConfig("ds083.2-pofp", "test/ds083.2-pofp", FeatureCollectionType.GRIB1, TestDir.cdmUnitTestDir + "gribCollections/rdavm/ds083.2/PofP/**/.*grib1", null, null, null, "directory", null); boolean changed = GribCdmIndex.updateGribCollection(config, updateMode, logger); System.out.printf("changed = %s%n", changed); Grib.setDebugFlags(new DebugFlagsImpl()); }
@Test // has one file for for each month, all in same directory public void testTimePartition() throws IOException { Grib.setDebugFlags(new DebugFlagsImpl("Grib/debugGbxIndexOnly")); FeatureCollectionConfig config = new FeatureCollectionConfig("yearPartition", "test/yearPartition", FeatureCollectionType.GRIB1, TestDir.cdmUnitTestDir + "gribCollections/rdavm/ds627.1/.*gbx9", null, "#ei.mdfa.fc12hr.sfc.regn128sc.#yyyyMMddhh", null, "year", null); System.out.printf("config = %s%n", config); boolean changed = GribCdmIndex.updateGribCollection(config, updateMode, logger); System.out.printf("changed = %s%n", changed); Grib.setDebugFlags(new DebugFlagsImpl()); }
@Category(NeedsRdaData.class) @Test public void testRdvamds093p2() throws IOException { FeatureCollectionConfig config = new FeatureCollectionConfig("ds093.2", "test/ds093.2", FeatureCollectionType.GRIB2, "D:/work/rdavm/ds093.2/diurnal/.*grb2", null, null, null, "directory", null); boolean changed = GribCdmIndex.updateGribCollection(config, CollectionUpdateType.always, logger); System.out.printf("changed = %s%n", changed); Grib.setDebugFlags(new DebugFlagsImpl()); }
@Test public void createNDFD() throws IOException { Grib.setDebugFlags(new DebugFlagsImpl("Grib/debugGbxIndexOnly")); FeatureCollectionConfig config = new FeatureCollectionConfig("NDFD-CONUS-5km", "test/NDFD-CONUS-5km", FeatureCollectionType.GRIB2, TestDir.cdmUnitTestDir + "datasets/NDFD-CONUS-5km/.*grib2$", null, null, null, "file", null); config.gribConfig.addGdsHash("-197088379", "-198041691"); config.gribConfig.useGenType = true; boolean changed = GribCdmIndex.updateGribCollection(config, updateMode, logger); System.out.printf("changed = %s%n", changed); }
@Test public void testRdvamds083p2() throws IOException { Grib.setDebugFlags(new DebugFlagsImpl("Grib/debugGbxIndexOnly")); FeatureCollectionConfig config = new FeatureCollectionConfig("ds083.2_Aggregation", "test/ds083.2", FeatureCollectionType.GRIB1, TestDir.cdmUnitTestDir + "gribCollections/rdavm/ds083.2/grib1/**/.*gbx9", null, null, null, "directory", null); boolean changed = GribCdmIndex.updateGribCollection(config, CollectionUpdateType.always, logger); System.out.printf("changed = %s%n", changed); Grib.setDebugFlags(new DebugFlagsImpl()); }
@Ignore("B: not visible on spock") @Test public void makeCfsr2() throws IOException { Grib.setDebugFlags(new DebugFlagsImpl("Grib/debugGbxIndexOnly")); FeatureCollectionConfig config = new FeatureCollectionConfig("ds094.1", "test/ds094.1", FeatureCollectionType.GRIB2, "B:/rdavm/ds094.1/2011/.*gbx9", null, null, null, null, null); boolean changed = GribCdmIndex.updateGribCollection(config, CollectionUpdateType.always, logger); System.out.printf("changed = %s%n", changed); Grib.setDebugFlags(new DebugFlagsImpl()); }
@Category(NeedsRdaData.class) @Test public void testRdvamds277p6() throws IOException { Grib.setDebugFlags(new DebugFlagsImpl("Grib/debugGbxIndexOnly")); FeatureCollectionConfig config = new FeatureCollectionConfig("ds277.6", "test/ds277.6", FeatureCollectionType.GRIB1, "D:/work/rdavm/ds277.6/monthly/.*gbx9", null, null, null, "directory", null); boolean changed = GribCdmIndex.updateGribCollection(config, CollectionUpdateType.always, logger); System.out.printf("changed = %s%n", changed); Grib.setDebugFlags(new DebugFlagsImpl()); }
@Ignore("B: not visible on spock") @Test public void makeDs0832() throws IOException { Grib.setDebugFlags(new DebugFlagsImpl("Grib/debugGbxIndexOnly")); FeatureCollectionConfig config = new FeatureCollectionConfig("ds083.2", "test/ds083.2", FeatureCollectionType.GRIB1, "B:/rdavm/ds083.2/grib1/**/.*gbx9", null, null, null, null, null); boolean changed = GribCdmIndex.updateGribCollection(config, CollectionUpdateType.always, logger); System.out.printf("changed = %s%n", changed); Grib.setDebugFlags(new DebugFlagsImpl()); }
@Category(NeedsRdaData.class) @Test public void testRdvamds084p4() throws IOException { Grib.setDebugFlags(new DebugFlagsImpl("Grib/debugGbxIndexOnly")); FeatureCollectionConfig config = new FeatureCollectionConfig("ds084.4", "test/ds084.4", FeatureCollectionType.GRIB2, "D:/work/rdavm/ds084.4/**/.*gbx9", null, null, null, "directory", null); boolean changed = GribCdmIndex.updateGribCollection(config, CollectionUpdateType.nocheck, logger); System.out.printf("changed = %s%n", changed); Grib.setDebugFlags(new DebugFlagsImpl()); }
@Ignore("B: not visible on spock") @Test public void testGsdHrrSurface() throws IOException { Grib.setDebugFlags(new DebugFlagsImpl("Grib/debugGbxIndexOnly")); FeatureCollectionConfig config = new FeatureCollectionConfig("GSD_HRRR_CONUS_3km_surface", "test/GSD_HRRR_CONUS_3km_surface", FeatureCollectionType.GRIB2, "B:/idd/GSD_HRRR_CONUS_3km_surface/.*gbx9", null, null, null, "file", null); config.gribConfig.setOption("timeUnit", "1 minute"); boolean changed = GribCdmIndex.updateGribCollection(config, CollectionUpdateType.always, logger); System.out.printf("changed = %s%n", changed); Grib.setDebugFlags(new DebugFlagsImpl()); }