if (aggVars.contains(varDS) || dimName.equals(var.getShortName())) continue; DatasetProxyReader proxy = new DatasetProxyReader(typicalDataset); var.setProxyReader(proxy);
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(); } }
protected void setDatasetAcquireProxy(Dataset typicalDataset, NetcdfDataset newds) throws IOException { DatasetProxyReader proxy = new DatasetProxyReader(typicalDataset); setDatasetAcquireProxy( proxy, newds.getRootGroup()); }
protected void setDatasetAcquireProxy(Dataset typicalDataset, NetcdfDataset newds) throws IOException { DatasetProxyReader proxy = new DatasetProxyReader(typicalDataset); setDatasetAcquireProxy( proxy, newds.getRootGroup()); }
/** * All non-agg variables use a proxy to acquire the file before reading. * If the variable is caching, read data into cache now. * If not caching, VariableEnhanced.setProxyReader() is called. * * @param typicalDataset read from a "typical dataset" * @param newds containing dataset * @throws IOException on i/o error */ protected void setDatasetAcquireProxy(Dataset typicalDataset, NetcdfDataset newds) throws IOException { DatasetProxyReader proxy = new DatasetProxyReader(typicalDataset); setDatasetAcquireProxy( proxy, newds.getRootGroup()); }