/** * recalc enhancement info * * @param mode how to enhance * @throws java.io.IOException on error */ public void enhance(Set<Enhance> mode) throws IOException { enhance(this, mode, null); }
/** * recalc enhancement info * * @param mode how to enhance * @throws java.io.IOException on error */ public void enhance(Set<Enhance> mode) throws IOException { enhance(this, mode, null); }
/** * recalc enhancement info - use default enhance mode * * @return the CoordSysBuilder used, for debugging. do not modify or retain a reference * @throws java.io.IOException on error */ public CoordSysBuilderIF enhance() throws IOException { return enhance(this, defaultEnhanceMode, null); }
/** * recalc enhancement info - use default enhance mode * * @return the CoordSysBuilder used, for debugging. do not modify or retain a reference * @throws java.io.IOException on error */ public CoordSysBuilderIF enhance() throws IOException { return enhance(this, defaultEnhanceMode, null); }
/** * recalc enhancement info * * @param mode how to enhance * @throws java.io.IOException on error */ public void enhance(Set<Enhance> mode) throws IOException { enhance(this, mode, null); }
/** * recalc enhancement info - use default enhance mode * * @return the CoordSysBuilder used, for debugging. do not modify or retain a reference * @throws java.io.IOException on error */ public CoordSysBuilderIF enhance() throws IOException { return enhance(this, defaultEnhanceMode, null); }
public NetcdfDatasetInfo( String location) throws IOException { ds = NetcdfDataset.openDataset(location, false, null); builder = ds.enhance(); }
public NetcdfDatasetInfo( String location) throws IOException { ds = NetcdfDataset.openDataset(location, false, null); builder = ds.enhance(); }
public NetcdfDatasetInfo( String location) throws IOException { ds = NetcdfDataset.openDataset(location, false, null); builder = ds.enhance(); }
public NetcdfDatasetInfo( NetcdfDataset ds) throws IOException { File loc = new File(ds.getLocation()); if (loc.exists()) { this.ds = NetcdfDataset.openDataset(ds.getLocation(), false, null); // fresh enhancement builder = this.ds.enhance(); } else { // Aggregation, fc may not exist this.ds = ds; // LOOK what can we do thats better ? builder = ds.enhance(); } }
public NetcdfDatasetInfo( NetcdfDataset ds) throws IOException { File loc = new File(ds.getLocation()); if (loc.exists()) { this.ds = NetcdfDataset.openDataset(ds.getLocation(), false, null); // fresh enhancement builder = this.ds.enhance(); } else { // Aggregation, fc may not exist this.ds = ds; // LOOK what can we do thats better ? builder = ds.enhance(); } }
public NetcdfDatasetInfo( NetcdfDataset ds) throws IOException { File loc = new File(ds.getLocation()); if (loc.exists()) { this.ds = NetcdfDataset.openDataset(ds.getLocation(), false, null); // fresh enhancement builder = this.ds.enhance(); } else { // Aggregation, fc may not exist this.ds = ds; // LOOK what can we do thats better ? builder = ds.enhance(); } }
public NetcdfFile acquireFile(CancelTask cancelTask) throws IOException { if (debugOpenFile) System.out.println(" try to acquire " + cacheLocation); long start = System.currentTimeMillis(); NetcdfFile ncfile = NetcdfDataset.acquireFile(reader, null, cacheLocation, -1, cancelTask, spiObject); // must merge NcML before enhancing if (mergeNcml != null) ncfile = NcMLReader.mergeNcML(ncfile, mergeNcml); // create new dataset if (enhance == null || enhance.isEmpty()) { if (debugOpenFile) System.out.println(" acquire (no enhance) " + cacheLocation + " took " + (System.currentTimeMillis() - start)); return ncfile; } // must enhance NetcdfDataset ds; if (ncfile instanceof NetcdfDataset) { ds = (NetcdfDataset) ncfile; ds.enhance(enhance); // enhance "in place", ie modify the NetcdfDataset } else { ds = new NetcdfDataset(ncfile, enhance); // enhance when wrapping } if (debugOpenFile) System.out.println(" acquire (enhance) " + cacheLocation + " took " + (System.currentTimeMillis() - start)); return ds; }
/** * Create a GridDataset from a NetcdfDataset. * * @param ds underlying NetcdfDataset, will do Enhance.CoordSystems if not already done. * @param parseInfo put parse info here, may be null * @throws java.io.IOException on read error */ public GridDataset(NetcdfDataset ds, Formatter parseInfo) throws IOException { this.ds = ds; // ds.enhance(EnumSet.of(NetcdfDataset.Enhance.CoordSystems)); Set<Enhance> enhance = ds.getEnhanceMode(); if(enhance == null || enhance.isEmpty()) enhance = NetcdfDataset.getDefaultEnhanceMode(); ds.enhance(enhance); // look for geoGrids if (parseInfo != null) parseInfo.format("GridDataset look for GeoGrids\n"); List<Variable> vars = ds.getVariables(); for (Variable var : vars) { VariableEnhanced varDS = (VariableEnhanced) var; constructCoordinateSystems(ds, varDS, parseInfo); } }
/** * Transform a NetcdfFile into a NetcdfDataset, optionally enhance it. * You must not use the original NetcdfFile after this call. * * @param ncfile NetcdfFile to transform, do not use independently after this. * @param mode set of enhance modes. If null, then none * @throws java.io.IOException on read error */ public NetcdfDataset(NetcdfFile ncfile, Set<Enhance> mode) throws IOException { super(ncfile); this.orgFile = ncfile; this.spi = null; // has a orgFile, not an iosp convertGroup(getRootGroup(), ncfile.getRootGroup()); finish(); // build global lists enhance(this, mode, null); }
/** * Transform a NetcdfFile into a NetcdfDataset, optionally enhance it. * You must not use the original NetcdfFile after this call. * * @param ncfile NetcdfFile to transform, do not use independently after this. * @param mode set of enhance modes. If null, then none * @throws java.io.IOException on read error */ public NetcdfDataset(NetcdfFile ncfile, Set<Enhance> mode) throws IOException { super(ncfile); this.orgFile = ncfile; this.spi = null; // has a orgFile, not an iosp convertGroup(getRootGroup(), ncfile.getRootGroup()); finish(); // build global lists enhance(this, mode, null); }
/** * Transform a NetcdfFile into a NetcdfDataset, optionally enhance it. * You must not use the original NetcdfFile after this call. * * @param ncfile NetcdfFile to transform, do not use independently after this. * @param mode set of enhance modes. If null, then none * @throws java.io.IOException on read error */ public NetcdfDataset(NetcdfFile ncfile, Set<Enhance> mode) throws IOException { super(ncfile); this.orgFile = ncfile; this.spi = null; // has a orgFile, not an iosp convertGroup(getRootGroup(), ncfile.getRootGroup()); finish(); // build global lists enhance(this, mode, null); }
private boolean _sync() throws IOException { if (!datasetManager.scan(true)) return false; // nothing changed LOOK what about grib extention ?? cacheDirty = true; makeDatasets(null); // rebuild the metadata rebuildDataset(); ncDataset.finish(); if (ncDataset.getEnhanceMode().contains(NetcdfDataset.Enhance.CoordSystems)) { // force recreation of the coordinate systems ncDataset.clearCoordinateSystems(); ncDataset.enhance(ncDataset.getEnhanceMode()); ncDataset.finish(); } return true; }
private boolean _sync() throws IOException { if (!datasetManager.scan(true)) return false; // nothing changed LOOK what about grib extention ?? cacheDirty = true; closeDatasets(); makeDatasets(null); // rebuild the metadata rebuildDataset(); ncDataset.finish(); if (ncDataset.getEnhanceMode().contains(NetcdfDataset.Enhance.CoordSystems)) { // force recreation of the coordinate systems ncDataset.clearCoordinateSystems(); ncDataset.enhance(ncDataset.getEnhanceMode()); ncDataset.finish(); } return true; }
private boolean _sync() throws IOException { if (!datasetManager.scan(true)) return false; // nothing changed LOOK what about grib extention ?? cacheDirty = true; closeDatasets(); makeDatasets(null); // rebuild the metadata rebuildDataset(); ncDataset.finish(); if (ncDataset.getEnhanceMode().contains(NetcdfDataset.Enhance.CoordSystems)) { // force recreation of the coordinate systems ncDataset.clearCoordinateSystems(); ncDataset.enhance(ncDataset.getEnhanceMode()); ncDataset.finish(); } return true; }