Package ucar.unidata.geoloc.vertical
Class VerticalTransformImpl
- java.lang.Object
-
- ucar.unidata.geoloc.vertical.VerticalTransformImpl
-
- All Implemented Interfaces:
VerticalTransform
- Direct Known Subclasses:
AtmosLnPressure
,AtmosSigma
,HybridHeight
,HybridSigmaPressure
,OceanS
,OceanSG1
,OceanSG2
,OceanSigma
,VerticalTransformSubset
,VTfromExistingData
,WRFEta
public abstract class VerticalTransformImpl extends Object implements VerticalTransform
A transformation to a vertical reference coordinate system, such as height or pressure.
-
-
Constructor Summary
Constructors Constructor Description VerticalTransformImpl(Dimension timeDim)
Construct a VerticalCoordinate
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ArrayDouble.D3
getCoordinateArray(int timeIndex)
Get the 3D vertical coordinate array for this time step.abstract ArrayDouble.D1
getCoordinateArray1D(int timeIndex, int xIndex, int yIndex)
Get the 1D vertical coordinate array for this time step and pointprotected boolean
getParameterBooleanValue(List<Parameter> params, String name)
protected String
getParameterStringValue(List<Parameter> params, String name)
protected Dimension
getTimeDimension()
Get the time DimensionString
getUnitString()
Get the unit string for the vertical coordinate.boolean
isTimeDependent()
Get whether this coordinate is time dependent.protected Array
readArray(Variable v, int timeIndex)
Read the dataArray
from the variable, at the specified time index if applicable.VerticalTransform
subset(Range t_range, Range z_range, Range y_range, Range x_range)
Create a subset of this VerticalTransform.
-
-
-
Field Detail
-
units
protected String units
-
-
Constructor Detail
-
VerticalTransformImpl
public VerticalTransformImpl(Dimension timeDim)
Construct a VerticalCoordinate- Parameters:
timeDim
- time dimension
-
-
Method Detail
-
getCoordinateArray
public abstract ArrayDouble.D3 getCoordinateArray(int timeIndex) throws IOException, InvalidRangeException
Get the 3D vertical coordinate array for this time step.- Specified by:
getCoordinateArray
in interfaceVerticalTransform
- Parameters:
timeIndex
- the time index. Ignored if !isTimeDependent().- Returns:
- vertical coordinate array
- Throws:
InvalidRangeException
- _more_IOException
- problem reading the data
-
getCoordinateArray1D
public abstract ArrayDouble.D1 getCoordinateArray1D(int timeIndex, int xIndex, int yIndex) throws IOException, InvalidRangeException
Get the 1D vertical coordinate array for this time step and point- Specified by:
getCoordinateArray1D
in interfaceVerticalTransform
- Parameters:
timeIndex
- the time index. Ignored if !isTimeDependent().xIndex
- the x indexyIndex
- the y index- Returns:
- vertical coordinate array
- Throws:
IOException
- problem reading dataInvalidRangeException
- _more_
-
getUnitString
public String getUnitString()
Get the unit string for the vertical coordinate.- Specified by:
getUnitString
in interfaceVerticalTransform
- Returns:
- unit string
-
isTimeDependent
public boolean isTimeDependent()
Get whether this coordinate is time dependent.- Specified by:
isTimeDependent
in interfaceVerticalTransform
- Returns:
- true if time dependent
-
getTimeDimension
protected Dimension getTimeDimension()
Get the time Dimension- Returns:
- time Dimension
-
readArray
protected Array readArray(Variable v, int timeIndex) throws IOException, InvalidRangeException
Read the dataArray
from the variable, at the specified time index if applicable. If the variable does not have a time dimension, the data array will have the same rank as the Variable. If the variable has a time dimension, the data array will have rank-1.- Parameters:
v
- variable to readtimeIndex
- time index, ignored if !isTimeDependent()- Returns:
- Array from the variable at that time index
- Throws:
IOException
- problem reading dataInvalidRangeException
- _more_
-
subset
public VerticalTransform subset(Range t_range, Range z_range, Range y_range, Range x_range)
Create a subset of this VerticalTransform.- Specified by:
subset
in interfaceVerticalTransform
- Parameters:
t_range
- subset the time dimension, or null if you want all of itz_range
- subset the vertical dimension, or null if you want all of ity_range
- subset the y dimension, or null if you want all of itx_range
- subset the x dimension, or null if you want all of it- Returns:
- the subsetted VerticalTransform
-
getParameterStringValue
protected String getParameterStringValue(List<Parameter> params, String name)
-
-