protected Array read(Variable mainv, CancelTask cancelTask) throws IOException { NetcdfFile ncd = null; try { ncd = acquireFile(cancelTask); if ((cancelTask != null) && cancelTask.isCancel()) return null; Variable v = findVariable(ncd, mainv); if ((mainv == null) || (v == null)) System.out.println("HEY (mainv == null)"); if (debugRead) System.out.printf("Agg.read %s from %s in %s%n", mainv.getNameAndDimensions(), v.getNameAndDimensions(), getLocation()); return v.read(); } finally { close( ncd); } }
protected Array read(Variable mainv, CancelTask cancelTask) throws IOException { NetcdfFile ncd = null; try { ncd = acquireFile(cancelTask); if ((cancelTask != null) && cancelTask.isCancel()) return null; Variable v = findVariable(ncd, mainv); if (debugRead) System.out.printf("Agg.read %s from %s in %s%n", mainv.getNameAndDimensions(), v.getNameAndDimensions(), getLocation()); return v.read(); } finally { close( ncd); } }
protected Array read(Variable mainv, CancelTask cancelTask) throws IOException { NetcdfFile ncd = null; try { ncd = acquireFile(cancelTask); if ((cancelTask != null) && cancelTask.isCancel()) return null; Variable v = findVariable(ncd, mainv); if (debugRead) System.out.printf("Agg.read %s from %s in %s%n", mainv.getNameAndDimensions(), v.getNameAndDimensions(), getLocation()); return v.read(); } finally { close( ncd); } }
/** * Read a section of the local Variable. * * @param mainv aggregated Variable * @param cancelTask let user cancel * @param section reletive to the local Variable * @return the complete Array for mainv * @throws IOException on I/O error * @throws InvalidRangeException on section error */ protected Array read(Variable mainv, CancelTask cancelTask, List<Range> section) throws IOException, InvalidRangeException { NetcdfFile ncd = null; try { ncd = acquireFile(cancelTask); if ((cancelTask != null) && cancelTask.isCancel()) return null; Variable v = findVariable(ncd, mainv); if (debugRead) { Section want = new Section(section); System.out.printf("Agg.read(%s) %s from %s in %s%n", want, mainv.getNameAndDimensions(), v.getNameAndDimensions(), getLocation()); } return v.read(section); } finally { close( ncd); } }
/** * Read a section of the local Variable. * * @param mainv aggregated Variable * @param cancelTask let user cancel * @param section reletive to the local Variable * @return the complete Array for mainv * @throws IOException on I/O error * @throws InvalidRangeException on section error */ protected Array read(Variable mainv, CancelTask cancelTask, List<Range> section) throws IOException, InvalidRangeException { NetcdfFile ncd = null; try { ncd = acquireFile(cancelTask); if ((cancelTask != null) && cancelTask.isCancel()) return null; Variable v = findVariable(ncd, mainv); if (debugRead) { Section want = new Section(section); System.out.printf("Agg.read(%s) %s from %s in %s%n", want, mainv.getNameAndDimensions(), v.getNameAndDimensions(), getLocation()); } return v.read(section); } finally { close( ncd); } }
/** * Read a section of the local Variable. * * @param mainv aggregated Variable * @param cancelTask let user cancel * @param section reletive to the local Variable * @return the complete Array for mainv * @throws IOException on I/O error * @throws InvalidRangeException on section error */ protected Array read(Variable mainv, CancelTask cancelTask, List<Range> section) throws IOException, InvalidRangeException { NetcdfFile ncd = null; try { ncd = acquireFile(cancelTask); if ((cancelTask != null) && cancelTask.isCancel()) return null; Variable v = findVariable(ncd, mainv); if (debugRead) { Section want = new Section(section); System.out.printf("Agg.read(%s) %s from %s in %s%n", want, mainv.getNameAndDimensions(), v.getNameAndDimensions(), getLocation()); } return v.read(section); } finally { close( ncd); } }