ucar.nc2.dt.trajectory
Class MultiTrajectoryObsDataset
java.lang.Object
ucar.nc2.dt.TypedDatasetImpl
ucar.nc2.dt.trajectory.MultiTrajectoryObsDataset
- All Implemented Interfaces:
- TrajectoryObsDataset, TypedDataset
- Direct Known Subclasses:
- Float10TrajectoryObsDataset
public abstract class MultiTrajectoryObsDataset
- extends TypedDatasetImpl
- implements TrajectoryObsDataset
Superclass for for implementations of TrajectoryObsDataset using a
NetcdfFile underneath that contains multiple trajectories. The file
must have two coordinate variables one over time and one over the multiple
trajectories, the time dimension may be UNLIMITED (if time is not UNLIMITED,
there must be no UNLIMITED dimension). The file must also have a latitude
variable, a longitude variable, and an elevation variable each over the
time and trajectory dimension. All other trajectory variables must be on
the time and trajectory dimension with other dimensions as needed.
For instance:
traj( traj) - convertable to -> String
time( time) - convertable to -> double
lat( time, traj) - convertable to -> double
lon( time, traj) - convertable to -> double
elev( time, traj) - convertable to -> double
var1( time, traj[, dim#]*)
...
varM( time, traj[, dim#]*)
- Since:
- 13 May 2005 16:12 -0600
- Author:
- edavis
| Methods inherited from class ucar.nc2.dt.TypedDatasetImpl |
close, findGlobalAttributeIgnoreCase, getBoundingBox, getDataVariable, getDataVariables, getDescription, getEndDate, getGlobalAttributes, getLocationURI, getNetcdfFile, getStartDate, getTitle, removeDataVariable, setDescription, setLocationURI, setTitle |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface ucar.nc2.dt.TypedDataset |
close, findGlobalAttributeIgnoreCase, getBoundingBox, getDataVariable, getDataVariables, getDescription, getEndDate, getGlobalAttributes, getLocationURI, getNetcdfFile, getStartDate, getTitle |
trajDim
protected Dimension trajDim
trajVar
protected Variable trajVar
timeDim
protected Dimension timeDim
timeVar
protected Variable timeVar
recordVar
protected Structure recordVar
latVar
protected Variable latVar
lonVar
protected Variable lonVar
elevVar
protected Variable elevVar
timeVarUnitsString
protected java.lang.String timeVarUnitsString
elevVarUnitsConversionFactor
protected double elevVarUnitsConversionFactor
trajectoryIds
protected java.util.List trajectoryIds
trajectories
protected java.util.List trajectories
trajectoriesMap
protected java.util.HashMap trajectoriesMap
trajectoryNumPoint
protected int trajectoryNumPoint
trajectoryVarsMap
protected java.util.HashMap trajectoryVarsMap
meterUnit
protected static SimpleUnit meterUnit
MultiTrajectoryObsDataset
public MultiTrajectoryObsDataset()
MultiTrajectoryObsDataset
public MultiTrajectoryObsDataset(NetcdfFile ncfile)
setTrajectoryInfo
public void setTrajectoryInfo(Dimension trajDim,
Variable trajVar,
Dimension timeDim,
Variable timeVar,
Variable latVar,
Variable lonVar,
Variable elevVar)
throws java.io.IOException
- Setup needed for all MultiTrajectoryObsDatatypes.
Units of time varible must be udunits time units.
Units of latitude variable must be convertible to "degrees_north" by udunits.
Units of longitude variable must be convertible to "degrees_east" by udunits.
Units of altitude variable must be convertible to "meters" by udunits.
- Throws:
java.lang.IllegalArgumentException - if units of time, latitude, longitude, or altitude variables are not as required.
java.io.IOException
getMetersConversionFactor
protected static double getMetersConversionFactor(java.lang.String unitsString)
throws java.lang.Exception
- Throws:
java.lang.Exception
syncExtend
public boolean syncExtend()
- Description copied from interface:
TrajectoryObsDataset
- Syncronize with the underlying dataset if it has been extended in a way
that is compatible with the existing structural metadata (for instance,
if the unlimited dimension has grown). Return true if syncronization was
needed and sucessful. Otherwise, return false.
NOTE: For now, assuming growth of the unlimited dimension only allowed change.
To get range for new extent only, use getRange( oldNumPoints + 1, newNumPoints, 1)
- Specified by:
syncExtend in interface TrajectoryObsDataset
- Returns:
- true if syncronization was needed and sucessful, otherwise false.
setStartDate
protected void setStartDate()
- Specified by:
setStartDate in class TypedDatasetImpl
setEndDate
protected void setEndDate()
- Specified by:
setEndDate in class TypedDatasetImpl
setBoundingBox
protected void setBoundingBox()
- Specified by:
setBoundingBox in class TypedDatasetImpl
getTrajectoryIds
public java.util.List getTrajectoryIds()
- Description copied from interface:
TrajectoryObsDataset
- Get a list of String IDs for the available trajectories.
- Specified by:
getTrajectoryIds in interface TrajectoryObsDataset
getTrajectories
public java.util.List getTrajectories()
- Description copied from interface:
TrajectoryObsDataset
- Get trajectories contained in this dataset.
- Specified by:
getTrajectories in interface TrajectoryObsDataset
- Returns:
- List of type TrajectoryObsDatatype.
getTrajectory
public TrajectoryObsDatatype getTrajectory(java.lang.String trajectoryId)
- Description copied from interface:
TrajectoryObsDataset
- Get the named trajectory
- Specified by:
getTrajectory in interface TrajectoryObsDataset
getDetailInfo
public java.lang.String getDetailInfo()
- Specified by:
getDetailInfo in interface TypedDataset- Overrides:
getDetailInfo in class TypedDatasetImpl
- Returns:
- debug / underlying implementation details