/** * Make a new VariableDS, delegate data reading to the original variable, but otherwise * dont take any info from it. This is used by NcML explicit mode. * * @param group the containing group; may not be null * @param parent parent Structure, may be null * @param shortName variable shortName, must be unique within the Group * @param orgVar the original Variable to wrap. The original Variable is not modified. * Must not be a Structure, use StructureDS instead. */ public VariableDS(Group group, Structure parent, String shortName, Variable orgVar) { super(null, group, parent, shortName); setDimensions(getDimensionsString()); // reset the dimensions if (orgVar instanceof Structure) throw new IllegalArgumentException("VariableDS must not wrap a Structure; name=" + orgVar.getFullName()); // dont share cache, iosp : all IO is delegated this.ncfile = null; this.spiObject = null; createNewCache(); this.orgVar = orgVar; this.orgDataType = orgVar.getDataType(); this.enhanceProxy = new EnhancementsImpl(this); }
/** * Make a new VariableDS, delegate data reading to the original variable, but otherwise * dont take any info from it. This is used by NcML explicit mode. * * @param group the containing group; may not be null * @param parent parent Structure, may be null * @param shortName variable shortName, must be unique within the Group * @param orgVar the original Variable to wrap. The original Variable is not modified. * Must not be a Structure, use StructureDS instead. */ public VariableDS(Group group, Structure parent, String shortName, Variable orgVar) { super(null, group, parent, shortName); setDimensions( getDimensionsString()); // reset the dimensions if (orgVar instanceof Structure) throw new IllegalArgumentException("VariableDS must not wrap a Structure; name="+orgVar.getFullName()); // dont share cache, iosp : all IO is delegated this.ncfile = null; this.spiObject = null; createNewCache(); this.orgVar = orgVar; this.orgDataType = orgVar.getDataType(); this.enhanceProxy = new EnhancementsImpl( this); this.scaleMissingProxy = new EnhanceScaleMissingImpl(); }
/** * Make a new VariableDS, delegate data reading to the original variable, but otherwise * dont take any info from it. This is used by NcML explicit mode. * * @param group the containing group; may not be null * @param parent parent Structure, may be null * @param shortName variable shortName, must be unique within the Group * @param orgVar the original Variable to wrap. The original Variable is not modified. * Must not be a Structure, use StructureDS instead. */ public VariableDS(Group group, Structure parent, String shortName, Variable orgVar) { //coverity[FORWARD_NULL] super(null, group, parent, shortName); setDimensions( getDimensionsString()); // reset the dimensions if (orgVar instanceof Structure) throw new IllegalArgumentException("VariableDS must not wrap a Structure; name="+orgVar.getFullName()); // dont share cache, iosp : all IO is delegated this.ncfile = null; this.spiObject = null; createNewCache(); this.orgVar = orgVar; this.orgDataType = orgVar.getDataType(); this.enhanceProxy = new EnhancementsImpl( this); this.scaleMissingProxy = new EnhanceScaleMissingImpl(); }
super(ds, group, parentStructure, shortName); setDataType(dataType); setDimensions(dims); this.orgDataType = dataType;
memberV.setDimensions( dimList.subList(2, dimList.size())); // remove first 2 dimensions memberV.enhance(enhanceScaleMissing);
super(orgVar); if (g != null) setParentGroup(g); // otherwise super() sets group; this affects the long name and the dimensions. setDimensions(getDimensionsString()); // reset the dimensions
memberV.setDimensions( dimList.subList(2, dimList.size())); // remove first 2 dimensions memberV.enhance(enhanceScaleMissing);
memberV.setDimensions(dims);
memberV.setDimensions( dimList.subList(2, dimList.size())); // remove first 2 dimensions memberV.enhance(enhanceScaleMissing);
memberV.setDimensions(dims);
memberV.setDimensions(dims);
super(orgVar); if (g != null) setParentGroup(g); // otherwise super() sets group; this affects the long name and the dimensions. setDimensions( getDimensionsString()); // reset the dimensions
super(orgVar); if (g != null) setParentGroup(g); // otherwise super() sets group; this affects the long name and the dimensions. setDimensions( getDimensionsString()); // reset the dimensions
protected void rebuildDataset() throws IOException { buildCoords(null); // reset dimension length Dimension aggDim = ncDataset.findDimension(dimName); // LOOK use group aggDim.setLength(getTotalCoords()); // reset coordinate var VariableDS joinAggCoord = (VariableDS) ncDataset.getRootGroup().findVariable(dimName); joinAggCoord.setDimensions(dimName); // reset its dimension joinAggCoord.invalidateCache(); // get rid of any cached data, since its now wrong // reset agg variables for (Variable aggVar : aggVars) { //aggVar.setDimensions(dimName); // reset its dimension aggVar.resetDimensions(); // reset its dimensions aggVar.invalidateCache(); // get rid of any cached data, since its now wrong } // reset the typical dataset, where non-agg variables live Dataset typicalDataset = getTypicalDataset(); for (Variable var : ncDataset.getRootGroup().getVariables()) { VariableDS varDS = (VariableDS) var; if (aggVars.contains(varDS) || dimName.equals(var.getShortName())) continue; DatasetProxyReader proxy = new DatasetProxyReader(typicalDataset); var.setProxyReader(proxy); } // reset cacheVars for (CacheVar cv : cacheList) { cv.reset(); } }
protected void rebuildDataset() throws IOException { buildCoords(null); // reset dimension length Dimension aggDim = ncDataset.findDimension(dimName); // LOOK use group aggDim.setLength(getTotalCoords()); // reset coordinate var VariableDS joinAggCoord = (VariableDS) ncDataset.getRootGroup().findVariable(dimName); joinAggCoord.setDimensions(dimName); // reset its dimension joinAggCoord.invalidateCache(); // get rid of any cached data, since its now wrong // reset agg variables for (Variable aggVar : aggVars) { //aggVar.setDimensions(dimName); // reset its dimension aggVar.resetDimensions(); // reset its dimensions aggVar.invalidateCache(); // get rid of any cached data, since its now wrong } // reset the typical dataset, where non-agg variables live Dataset typicalDataset = getTypicalDataset(); for (Variable var : ncDataset.getRootGroup().getVariables()) { VariableDS varDS = (VariableDS) var; if (aggVars.contains(varDS) || dimName.equals(var.getShortName())) continue; DatasetProxyReader proxy = new DatasetProxyReader(typicalDataset); var.setProxyReader(proxy); } // reset cacheVars for (CacheVar cv : cacheList) { cv.reset(); } }
joinAggCoord.setDimensions(dimName); // reset its dimension
dimList.add(0, timeDim); aggVar.setDimensions(dimList); aggVar.setProxyReader(proxyReader1D); aggVar.setSPobject( new Vstate1D(ugrid, timeInv));
v.setDimensions(gridset.makeDimensions(v.getDimensions()));