@Override public int doAct(String filename) throws IOException { Path filePath = Paths.get(filename); String fileName = filePath.getFileName().toString(); int fail =0; int fail2 = 0; if (!(skipFileGrib1.contains(fileName) || skipFileGrib2.contains(fileName))) { ucar.nc2.util.Counters fileCounters = counterCurrent.makeSubCounters(); GribCoordsMatchGbx helper = new GribCoordsMatchGbx(filename, fileCounters); fail = helper.readGridDataset(); fail2 = helper.readCoverageDataset(); if (showFileCounters) logger.debug("fileCounters= {}", fileCounters); counterCurrent.addTo(fileCounters); } else { logger.warn("Skipping file {}", filename); } return fail + fail2; }
@Test public void readGrib1Files() throws Exception { counterCurrent = countersAll.makeSubCounters(); int fail = readAllDir(TestDir.cdmUnitTestDir + "formats/grib1", null, false); logger.debug("readGrib1Files = {}", counterCurrent); countersAll.addTo(counterCurrent); Assert.assertEquals(0, fail); }
@Test public void readGrib2Files() throws Exception { counterCurrent = countersAll.makeSubCounters(); int fail = readAllDir(TestDir.cdmUnitTestDir + "formats/grib2", null, false); logger.debug("readGrib2Files = {}", counterCurrent); countersAll.addTo(counterCurrent); Assert.assertEquals(0, fail); }
@Test public void readNcepFiles() throws Exception { counterCurrent = countersAll.makeSubCounters(); int fail = readAllDir(TestDir.cdmUnitTestDir + "tds/ncep", null, true); logger.debug("readNcepFiles = {}", counterCurrent); countersAll.addTo(counterCurrent); Assert.assertEquals(0, fail); }
@Test public void readFnmocFiles() throws Exception { counterCurrent = countersAll.makeSubCounters(); int fail = readAllDir(TestDir.cdmUnitTestDir + "tds/fnmoc", null, true); logger.debug("readFnmocFiles = {}", counterCurrent); countersAll.addTo(counterCurrent); Assert.assertEquals(0, fail); }