/** * DO NOT USE DIRECTLY. public by accident. * recalc any enhancement info */ public void enhance(Set<NetcdfDataset.Enhance> mode) { for (Variable v : getVariables()) { VariableEnhanced ve = (VariableEnhanced) v; ve.enhance(mode); } }
/** * DO NOT USE DIRECTLY. public by accident. * recalc any enhancement info */ public void enhance(Set<NetcdfDataset.Enhance> mode) { for (Variable v : getVariables()) { VariableEnhanced ve = (VariableEnhanced) v; ve.enhance(mode); } }
/** * DO NOT USE DIRECTLY. public by accident. * recalc any enhancement info */ public void enhance(Set<NetcdfDataset.Enhance> mode) { for (Variable v : getVariables()) { VariableEnhanced ve = (VariableEnhanced) v; ve.enhance(mode); } }
private VariableEnhanced findVariableFromOrgName(String orgName) { for (Variable vTop : getVariables()) { Variable v = vTop; while (v instanceof VariableEnhanced) { VariableEnhanced ve = (VariableEnhanced) v; if ((ve.getOriginalName() != null) && (ve.getOriginalName().equals(orgName))) return (VariableEnhanced) vTop; v = ve.getOriginalVariable(); } } return null; }
private VariableEnhanced findVariableFromOrgName(String orgName) { for (Variable vTop : getVariables()) { Variable v = vTop; while (v instanceof VariableEnhanced) { VariableEnhanced ve = (VariableEnhanced) v; if ((ve.getOriginalName() != null) && (ve.getOriginalName().equals(orgName))) return (VariableEnhanced) vTop; v = ve.getOriginalVariable(); } } return null; }
private VariableEnhanced findVariableFromOrgName(String orgName) { for (Variable vTop : getVariables()) { Variable v = vTop; while (v instanceof VariableEnhanced) { VariableEnhanced ve = (VariableEnhanced) v; if ((ve.getOriginalName() != null) && (ve.getOriginalName().equals(orgName))) return (VariableEnhanced) vTop; v = ve.getOriginalVariable(); } } return null; }
private boolean convertNeeded(StructureMembers smData) { for (Variable v : getVariables()) { if (v instanceof VariableDS) { VariableDS vds = (VariableDS) v; if (vds.needConvert()) return true; } else if (v instanceof StructureDS) { StructureDS nested = (StructureDS) v; if (nested.convertNeeded(null)) return true; } // a variable with no data in the underlying smData if ((smData != null) && !varHasData(v, smData)) return true; } return false; }
private boolean convertNeeded(StructureMembers smData) { for (Variable v : getVariables()) { if (v instanceof VariableDS) { VariableDS vds = (VariableDS) v; if (vds.needConvert()) return true; } else if (v instanceof StructureDS) { StructureDS nested = (StructureDS) v; if (nested.convertNeeded(null)) return true; } // a variable with no data in the underlying smData if ((smData != null) && !varHasData(v, smData)) return true; } return false; }
private boolean convertNeeded(StructureMembers smData) { for (Variable v : getVariables()) { if (v instanceof VariableDS) { VariableDS vds = (VariableDS) v; if (vds.needConvert()) return true; } else if (v instanceof StructureDS) { StructureDS nested = (StructureDS) v; if (nested.convertNeeded(null)) return true; } // a variable with no data in the underlying smData if ((smData != null) && !varHasData(v, smData)) return true; } return false; }
private void constructCoordinateSystems(NetcdfDataset ds, VariableEnhanced v, Formatter parseInfo) { if (v instanceof StructureDS) { StructureDS s = (StructureDS) v; List<Variable> members = s.getVariables(); for (Variable nested : members) { // LOOK flatten here ?? constructCoordinateSystems(ds, (VariableEnhanced) nested, parseInfo); } } else { // see if it has a GridCS // LOOK: should add geogrid it multiple times if there are multiple geoCS ?? GridCoordSys gcs = null; List<CoordinateSystem> csys = v.getCoordinateSystems(); for (CoordinateSystem cs : csys) { GridCoordSys gcsTry = GridCoordSys.makeGridCoordSys(parseInfo, cs, v); if (gcsTry != null) { gcs = gcsTry; if (gcsTry.isProductSet()) break; } } if (gcs != null) addGeoGrid((VariableDS) v, gcs, parseInfo); } }
private void constructCoordinateSystems(NetcdfDataset ds, VariableEnhanced v, Formatter parseInfo) { if (v instanceof StructureDS) { StructureDS s = (StructureDS) v; List<Variable> members = s.getVariables(); for (Variable nested : members) { // LOOK flatten here ?? constructCoordinateSystems(ds, (VariableEnhanced) nested, parseInfo); } } else { // see if it has a GridCS // LOOK: should add geogrid it multiple times if there are multiple geoCS ?? GridCoordSys gcs = null; List<CoordinateSystem> csys = v.getCoordinateSystems(); for (CoordinateSystem cs : csys) { GridCoordSys gcsTry = GridCoordSys.makeGridCoordSys(parseInfo, cs, v); if (gcsTry != null) { gcs = gcsTry; if (gcsTry.isProductSet()) break; } } if (gcs != null) addGeoGrid((VariableDS) v, gcs, parseInfo); } }
private void constructCoordinateSystems(NetcdfDataset ds, VariableEnhanced v, Formatter parseInfo) { if (v instanceof StructureDS) { StructureDS s = (StructureDS) v; List<Variable> members = s.getVariables(); for (Variable nested : members) { // LOOK flatten here ?? constructCoordinateSystems(ds, (VariableEnhanced) nested, parseInfo); } } else { // see if it has a GridCS // LOOK: should add geogrid it multiple times if there are multiple geoCS ?? GridCoordSys gcs = null; List<CoordinateSystem> csys = v.getCoordinateSystems(); for (CoordinateSystem cs : csys) { GridCoordSys gcsTry = GridCoordSys.makeGridCoordSys(parseInfo, cs, v); if (gcsTry != null) { gcs = gcsTry; if (gcsTry.isProductSet()) break; } } if (gcs != null) addGeoGrid((VariableDS) v, gcs, parseInfo); } }
TableMultidimInnerPsuedo(NetcdfDataset ds, TableConfig config) { super(ds, config); assert config.outerName != null; assert config.innerName != null; this.inner = ds.findDimension(config.innerName); this.outer = ds.findDimension(config.outerName); sm = new StructureMembers(config.name); for (Variable v : struct.getVariables()) { int rank = v.getRank(); int[] shape = new int[rank - 1]; System.arraycopy(v.getShape(), 1, shape, 0, rank - 1); sm.addMember(v.getShortName(), v.getDescription(), v.getUnitsString(), v.getDataType(), shape); } }
TableMultidimInnerPsuedo(NetcdfDataset ds, TableConfig config) { super(ds, config); assert config.outerName != null; assert config.innerName != null; this.inner = ds.findDimension(config.innerName); this.outer = ds.findDimension(config.outerName); sm = new StructureMembers(config.name); for (Variable v : struct.getVariables()) { int rank = v.getRank(); int[] shape = new int[rank - 1]; System.arraycopy(v.getShape(), 1, shape, 0, rank - 1); sm.addMember(v.getShortName(), v.getDescription(), v.getUnitsString(), v.getDataType(), shape); } replaceDataVars(sm); }
for (Variable v : struct.getVariables()) {
for (Variable v : struct.getVariables()) {
TableMultidimInnerPsuedo3D(NetcdfDataset ds, TableConfig config) { super(ds, config); assert config.dimName != null; assert config.outerName != null; // middle assert config.innerName != null; this.dim = ds.findDimension(config.dimName); this.middle = ds.findDimension(config.outerName); this.inner = ds.findDimension(config.innerName); sm = new StructureMembers(config.name); for (Variable v : struct.getVariables()) { int rank = v.getRank(); int[] shape = new int[rank - 1]; System.arraycopy(v.getShape(), 1, shape, 0, rank - 1); sm.addMember(v.getShortName(), v.getDescription(), v.getUnitsString(), v.getDataType(), shape); } }
TableMultidimInnerPsuedo(NetcdfDataset ds, TableConfig config) { super(ds, config); assert config.outerName != null; assert config.innerName != null; this.inner = ds.findDimension(config.innerName); this.outer = ds.findDimension(config.outerName); sm = new StructureMembers(config.name); for (Variable v : struct.getVariables()) { int rank = v.getRank(); int[] shape = new int[rank - 1]; System.arraycopy(v.getShape(), 1, shape, 0, rank - 1); sm.addMember(v.getShortName(), v.getDescription(), v.getUnitsString(), v.getDataType(), shape); } replaceDataVars(sm); }
TableMultidimInnerPsuedo3D(NetcdfDataset ds, TableConfig config) { super(ds, config); assert config.dimName != null; assert config.outerName != null; // middle assert config.innerName != null; this.dim = ds.findDimension(config.dimName); this.middle = ds.findDimension(config.outerName); this.inner = ds.findDimension(config.innerName); sm = new StructureMembers(config.name); for (Variable v : struct.getVariables()) { int rank = v.getRank(); int[] shape = new int[rank - 1]; System.arraycopy(v.getShape(), 1, shape, 0, rank - 1); sm.addMember(v.getShortName(), v.getDescription(), v.getUnitsString(), v.getDataType(), shape); } replaceDataVars(sm); }
TableMultidimInnerPsuedo3D(NetcdfDataset ds, TableConfig config) { super(ds, config); assert config.dimName != null; assert config.outerName != null; // middle assert config.innerName != null; this.dim = ds.findDimension(config.dimName); this.middle = ds.findDimension(config.outerName); this.inner = ds.findDimension(config.innerName); sm = new StructureMembers(config.name); for (Variable v : struct.getVariables()) { int rank = v.getRank(); int[] shape = new int[rank - 1]; System.arraycopy(v.getShape(), 1, shape, 0, rank - 1); sm.addMember(v.getShortName(), v.getDescription(), v.getUnitsString(), v.getDataType(), shape); } replaceDataVars(sm); }