ucar.nc2
Class StructurePseudo

java.lang.Object
  extended by ucar.nc2.Variable
      extended by ucar.nc2.Structure
          extended by ucar.nc2.StructurePseudo
All Implemented Interfaces:
java.lang.Comparable<VariableSimpleIF>, VariableIF, VariableSimpleIF

public class StructurePseudo
extends Structure

Make a collection of variables with the same outer dimension into a fake Structure. Its fake because the variables are not stored contiguously.

  so
   var1(dim, other);
   var2(dim, other);
   var3(dim, other);
 becomes
   struct {
     var1(other);
     var2(other);
     var3(other);
   } name(dim);
 

Author:
caron

Nested Class Summary
 
Nested classes/interfaces inherited from class ucar.nc2.Structure
Structure.Iterator
 
Nested classes/interfaces inherited from class ucar.nc2.Variable
Variable.Cache
 
Field Summary
 
Fields inherited from class ucar.nc2.Structure
isSubset, memberHash, members
 
Fields inherited from class ucar.nc2.Variable
attributes, cache, dataType, debugCaching, defaultSizeToCache, dimensions, elementSize, group, hashCode, isMetadata, isVariableLength, ncfile, parent, postReader, preReader, shape, shapeAsSection, shortName, sizeToCache, spiObject
 
Constructor Summary
StructurePseudo(NetcdfFile ncfile, Group group, java.lang.String shortName, Dimension dim)
          Make a Structure out of all Variables with the named dimension as their outermost dimension.
StructurePseudo(NetcdfFile ncfile, Group group, java.lang.String shortName, java.util.List<Variable> vars, Dimension dim)
          Make a Structure out of named Variables, each has the same named outermost dimension.
 
Method Summary
protected  Array _read()
           
protected  Array _read(Section section)
           
 
Methods inherited from class ucar.nc2.Structure
addMemberVariable, calcElementSize, calcStructureSize, copy, findVariable, getElementSize, getNameAndAttributes, getStructureIterator, getStructureIterator, getVariableNames, getVariables, isCaching, isSubset, makeStructureMembers, readStructure, readStructure, readStructure, removeMemberVariable, replaceMemberVariable, select, select, setCaching, setImmutable, setMemberVariables, setParentGroup, writeCDL
 
Methods inherited from class ucar.nc2.Variable
addAttribute, compareTo, createNewCache, equals, extraInfo, findAttribute, findAttributeIgnoreCase, findDimensionIndex, getAttributes, getDataType, getDescription, getDimension, getDimensions, getDimensionsAll, getDimensionsString, getName, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameAndDimensions, getNameEscaped, getParentGroup, getParentStructure, getRanges, getRank, getScalarData, getShape, getShapeAsSection, getShortName, getSize, getSizeToCache, getSPobject, getUnitsString, hasCachedData, hashCode, invalidateCache, isCoordinateVariable, isImmutable, isMemberOfStructure, isMetadata, isScalar, isUnknownLength, isUnlimited, isUnsigned, isVariableLength, lookupEnumString, read, read, read, read, read, readScalarByte, readScalarDouble, readScalarFloat, readScalarInt, readScalarLong, readScalarShort, readScalarString, remove, removeAttribute, resetDimensions, resetShape, section, section, setCachedData, setDataType, setDimension, setDimensions, setDimensions, setDimensionsAnonymous, setElementSize, setEnumTypedef, setIsScalar, setName, setParentStructure, setSizeToCache, setSPobject, slice, toString, toStringDebug
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StructurePseudo

public StructurePseudo(NetcdfFile ncfile,
                       Group group,
                       java.lang.String shortName,
                       Dimension dim)
Make a Structure out of all Variables with the named dimension as their outermost dimension.

Parameters:
ncfile - part of this file
group - part of this group
shortName - short name of this Structure
dim - the existing dimension

StructurePseudo

public StructurePseudo(NetcdfFile ncfile,
                       Group group,
                       java.lang.String shortName,
                       java.util.List<Variable> vars,
                       Dimension dim)
Make a Structure out of named Variables, each has the same named outermost dimension.

Parameters:
ncfile - part of this file
group - part of this group
shortName - short name of this Structure
vars - limited to these variables. all must have dim as outer dimension.
dim - the existing dimension
Method Detail

_read

protected Array _read()
               throws java.io.IOException
Overrides:
_read in class Variable
Throws:
java.io.IOException

_read

protected Array _read(Section section)
               throws java.io.IOException,
                      InvalidRangeException
Overrides:
_read in class Variable
Throws:
java.io.IOException
InvalidRangeException