@Override public Array reallyRead(Variable client, Section section, CancelTask cancelTask) throws IOException, InvalidRangeException { Section orgSection = new Section(section.getRanges()); for (int dim : dims) orgSection.insertRange(dim, Range.ONE); // lowest first Array data = orgClient._read( orgSection); for (int i=dims.size()-1; i>=0; i--) data = data.reduce( dims.get(i)); // highest first return data; } }
@Override public Array reallyRead(Variable client, Section section, CancelTask cancelTask) throws IOException, InvalidRangeException { Section orgSection = new Section(section.getRanges()); for (int dim : dims) orgSection.insertRange(dim, Range.ONE); // lowest first Array data = orgClient._read( orgSection); for (int i=dims.size()-1; i>=0; i--) data = data.reduce( dims.get(i)); // highest first return data; } }
@Override public Array reallyRead(Variable client, Section section, CancelTask cancelTask) throws IOException, InvalidRangeException { Section orgSection = new Section(section.getRanges()); orgSection.insertRange(sliceDim, slice.getRange(sliceDim)); Array data = orgClient._read( orgSection); data = data.reduce( sliceDim); return data; }
@Override public Array reallyRead(Variable client, Section section, CancelTask cancelTask) throws IOException, InvalidRangeException { Section orgSection = new Section(section.getRanges()); orgSection.insertRange(sliceDim, slice.getRange(sliceDim)); Array data = orgClient._read( orgSection); data = data.reduce( sliceDim); return data; }
@Override public Array reallyRead(Variable client, Section section, CancelTask cancelTask) throws IOException, InvalidRangeException { Section orgSection = new Section(section.getRanges()); orgSection.insertRange(sliceDim, slice.getRange(sliceDim)); Array data = orgClient._read( orgSection); data = data.reduce( sliceDim); return data; }
private Array read(TimeInventory.Instance timeInstance, String fullNameEsc, List<Range> innerSection, HashMap<String, NetcdfDataset> openFilesRead) throws IOException, InvalidRangeException { NetcdfFile ncfile = open(timeInstance.getDatasetLocation(), openFilesRead); if (ncfile == null) return null; // file might be deleted ?? Variable v = ncfile.findVariable(fullNameEsc); if (v == null) return null; // v could be missing, return missing data i think // assume time is first dimension LOOK: out of-order; ensemble; section different ?? Range timeRange = new Range(timeInstance.getDatasetIndex(), timeInstance.getDatasetIndex()); Section s = new Section(innerSection); s.insertRange(0, timeRange); return v.read(s); }
private Array read(TimeInventory.Instance timeInstance, String fullNameEsc, List<Range> innerSection, HashMap<String, NetcdfDataset> openFilesRead) throws IOException, InvalidRangeException { NetcdfFile ncfile = open(timeInstance.getDatasetLocation(), openFilesRead); if (ncfile == null) return null; // file might be deleted ?? Variable v = ncfile.findVariable(fullNameEsc); if (v == null) return null; // v could be missing, return missing data i think // assume time is first dimension LOOK: out of-order; ensemble; section different ?? Range timeRange = new Range(timeInstance.getDatasetIndex(), timeInstance.getDatasetIndex()); Section s = new Section(innerSection); s.insertRange(0, timeRange); return v.read(s); }
private Array read(TimeInventory.Instance timeInstance, String fullNameEsc, List<Range> innerSection, HashMap<String, NetcdfDataset> openFilesRead) throws IOException, InvalidRangeException { NetcdfFile ncfile = open(timeInstance.getDatasetLocation(), openFilesRead); if (ncfile == null) return null; // file might be deleted ?? Variable v = ncfile.findVariable(fullNameEsc); if (v == null) return null; // v could be missing, return missing data i think // assume time is first dimension LOOK: out of-order; ensemble; section different ?? Range timeRange = new Range(timeInstance.getDatasetIndex(), timeInstance.getDatasetIndex()); Section s = new Section(innerSection); s.insertRange(0, timeRange); return v.read(s); }