Package ucar.visad.quantities
Class GeopotentialAltitude
java.lang.Object
ucar.visad.quantities.Quantity
ucar.visad.quantities.ScalarQuantity
ucar.visad.quantities.GeopotentialAltitude
Provides support for the quantity of geopotential altitude.
- Version:
- $Id: GeopotentialAltitude.java,v 1.15 2006/10/09 14:49:16 dmurray Exp $
- Author:
- Steven R. Emmerson
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Provides support for coordinate system transformations between geopotential altitude and altitude. -
Method Summary
Modifier and TypeMethodDescriptionstatic Data
fromAltitude
(Data altitude) Converts altitude to geopotential altitude.static Data
fromAltitude
(Data altitude, Real gravity) Converts altitude to geopotential altitude based on a value for gravity.static Unit
Gets the geopotential meter unit.static Unit
getGeopotentialUnit
(Unit altUnit) Returns the standard geopotential altitude unit corresponding to an altitude unit.static Unit
getGeopotentialUnit
(Unit altUnit, Real gravity) Returns the geopotential altitude unit corresponding to an altitude unit and gravity.static RealTupleType
Obtains the RealTupleType associated with this class.static RealType
Obtains the RealType associated with this class.static double[]
toAltitude
(double[] geoAlts, Unit geoUnit, Real gravity, double[] altitudes, Unit altUnit) Converts from geopotential altitude to altitude.static double[]
toAltitude
(double[] geoAlts, Unit geoUnit, Real gravity, double[] altitudes, Unit altUnit, boolean copy) Converts from geopotential altitude to altitude.static float[]
toAltitude
(float[] geoAlts, Unit geoUnit, Real gravity, float[] altitudes, Unit altUnit) Converts from geopotential altitude to altitude.static float[]
toAltitude
(float[] geoAlts, Unit geoUnit, Real gravity, float[] altitudes, Unit altUnit, boolean copy) Converts from geopotential altitude to altitude.static Data
toAltitude
(Data geopotentialAltitude) Converts from geopotential altitude to altitude.static Data
toAltitude
(Data geopotentialAltitude, Real gravity) Converts from geopotential altitude to altitude.static double[]
toGeopotentialAltitude
(double[] altitudes, Unit altUnit, Real gravity, double[] geoAlts, Unit geoUnit) Converts from altitude to geopotential altitude.static double[]
toGeopotentialAltitude
(double[] altitudes, Unit altUnit, Real gravity, double[] geoAlts, Unit geoUnit, boolean copy) Converts from altitude to geopotential altitude.static float[]
toGeopotentialAltitude
(float[] altitudes, Unit altUnit, Real gravity, float[] geoAlts, Unit geoUnit) Converts from altitude to geopotential altitude.static float[]
toGeopotentialAltitude
(float[] altitudes, Unit altUnit, Real gravity, float[] geoAlts, Unit geoUnit, boolean copy) Converts from altitude to geopotential altitude.Methods inherited from class ucar.visad.quantities.ScalarQuantity
getRealType, getRealType, realType
Methods inherited from class ucar.visad.quantities.Quantity
realTupleType, setRealTupleType
-
Method Details
-
getGeopotentialMeter
Gets the geopotential meter unit.- Returns:
- A geopotential meter unit.
- Throws:
VisADException
- Couldn't create necessary VisAD object.
-
getRealType
Obtains the RealType associated with this class.- Returns:
- The RealType associated with this class.
- Throws:
VisADException
- Couldn't perform necessary VisAD operation.
-
getRealTupleType
Obtains the RealTupleType associated with this class.- Returns:
- The RealTupleType associated with this class.
- Throws:
VisADException
- Couldn't perform necessary VisAD operation.
-
fromAltitude
Converts altitude to geopotential altitude.- Parameters:
altitude
- The altitude data object.- Returns:
- The equivalent geopotential altitude data object.
- Throws:
VisADException
- if a core VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
fromAltitude
Converts altitude to geopotential altitude based on a value for gravity.- Parameters:
altitude
- The altitude data object.gravity
- The value for gravity.- Returns:
- The equivalent geopotential altitude data object.
- Throws:
VisADException
- if a core VisAD failure occurs.RemoteException
- if a Java RMI failure occurs.
-
toAltitude
public static Data toAltitude(Data geopotentialAltitude, Real gravity) throws VisADException, RemoteException Converts from geopotential altitude to altitude.- Parameters:
geopotentialAltitude
- Geopotential altitude.gravity
- Gravity.- Returns:
- Altitude. The type of the object will be that of the arguments after standard promotion.
- Throws:
VisADException
- Couldn't create necessary VisAD object.RemoteException
- Java RMI failure.- See Also:
-
toAltitude
Converts from geopotential altitude to altitude.- Parameters:
geopotentialAltitude
- Geopotential altitude.- Returns:
- Altitude. The type of the object will be that of the arguments after standard promotion.
- Throws:
VisADException
- Couldn't create necessary VisAD object.RemoteException
- Java RMI failure.- See Also:
-
toAltitude
public static double[] toAltitude(double[] geoAlts, Unit geoUnit, Real gravity, double[] altitudes, Unit altUnit) throws VisADException, RemoteException Converts from geopotential altitude to altitude.- Parameters:
geoAlts
- Geopotential altitudes in units ofgeoUnit
.geoUnit
- The unit of geopotential altitude.gravity
- Gravity.altitudes
- Altitudes in units ofaltUnit
. Its length shall be at leastgeoAlts.length
. It may be the same array asgeoAlts
.altUnit
- The unit of altitude.- Returns:
altitudes
(as a convenience).- Throws:
VisADException
- Couldn't create necessary VisAD object.RemoteException
- Java RMI failure.
-
toAltitude
public static double[] toAltitude(double[] geoAlts, Unit geoUnit, Real gravity, double[] altitudes, Unit altUnit, boolean copy) throws VisADException, RemoteException Converts from geopotential altitude to altitude.- Parameters:
geoAlts
- Geopotential altitudes in units ofgeoUnit
.geoUnit
- The unit of geopotential altitude.gravity
- Gravity.altitudes
- Altitudes in units ofaltUnit
. Its length shall be at leastgeoAlts.length
. It may be the same array asgeoAlts
.altUnit
- The unit of altitude.copy
- if true, a new copy of the array will be made- Returns:
altitudes
(as a convenience).- Throws:
VisADException
- Couldn't create necessary VisAD object.RemoteException
- Java RMI failure.
-
toAltitude
public static float[] toAltitude(float[] geoAlts, Unit geoUnit, Real gravity, float[] altitudes, Unit altUnit) throws VisADException, RemoteException Converts from geopotential altitude to altitude.- Parameters:
geoAlts
- Geopotential altitudes in units ofgeoUnit
.geoUnit
- The unit of geopotential altitude.gravity
- Gravity.altitudes
- Altitudes in units ofaltUnit
. Its length shall be at leastgeoAlts.length
. It may be the same array asgeoAlts
.altUnit
- The unit of altitude.- Returns:
altitudes
(as a convenience).- Throws:
VisADException
- Couldn't create necessary VisAD object.RemoteException
- Java RMI failure.
-
toAltitude
public static float[] toAltitude(float[] geoAlts, Unit geoUnit, Real gravity, float[] altitudes, Unit altUnit, boolean copy) throws VisADException, RemoteException Converts from geopotential altitude to altitude.- Parameters:
geoAlts
- Geopotential altitudes in units ofgeoUnit
.geoUnit
- The unit of geopotential altitude.gravity
- Gravity.altitudes
- Altitudes in units ofaltUnit
. Its length shall be at leastgeoAlts.length
. It may be the same array asgeoAlts
.altUnit
- The unit of altitude.copy
- if true, a new copy of the array will be made- Returns:
altitudes
(as a convenience).- Throws:
VisADException
- Couldn't create necessary VisAD object.RemoteException
- Java RMI failure.
-
toGeopotentialAltitude
public static double[] toGeopotentialAltitude(double[] altitudes, Unit altUnit, Real gravity, double[] geoAlts, Unit geoUnit) throws VisADException, RemoteException Converts from altitude to geopotential altitude.- Parameters:
altitudes
- Altitudes in units ofaltUnit
.altUnit
- The unit of altitude.gravity
- Gravity.geoAlts
- Geopotential altitudes in units ofgeoUnit
. Its length shall be at leastaltitudes.length
. It may be the same array asaltitudes
.geoUnit
- The unit of geopotential altitude.- Returns:
geoAlts
(as a convenience).- Throws:
VisADException
- Couldn't create necessary VisAD object.RemoteException
- Java RMI failure.
-
toGeopotentialAltitude
public static double[] toGeopotentialAltitude(double[] altitudes, Unit altUnit, Real gravity, double[] geoAlts, Unit geoUnit, boolean copy) throws VisADException, RemoteException Converts from altitude to geopotential altitude.- Parameters:
altitudes
- Altitudes in units ofaltUnit
.altUnit
- The unit of altitude.gravity
- Gravity.geoAlts
- Geopotential altitudes in units ofgeoUnit
. Its length shall be at leastaltitudes.length
. It may be the same array asaltitudes
.geoUnit
- The unit of geopotential altitude.copy
- if true, a new copy of the array will be made- Returns:
geoAlts
(as a convenience).- Throws:
VisADException
- Couldn't create necessary VisAD object.RemoteException
- Java RMI failure.
-
toGeopotentialAltitude
public static float[] toGeopotentialAltitude(float[] altitudes, Unit altUnit, Real gravity, float[] geoAlts, Unit geoUnit) throws VisADException, RemoteException Converts from altitude to geopotential altitude.- Parameters:
altitudes
- Altitudes in units ofaltUnit
.altUnit
- The unit of altitude.gravity
- Gravity.geoAlts
- Geopotential altitudes in units ofgeoUnit
. Its length shall be at leastaltitudes.length
. It may be the same array asaltitudes
.geoUnit
- The unit of geopotential altitude.- Returns:
geoAlts
(as a convenience).- Throws:
VisADException
- Couldn't create necessary VisAD object.RemoteException
- Java RMI failure.
-
toGeopotentialAltitude
public static float[] toGeopotentialAltitude(float[] altitudes, Unit altUnit, Real gravity, float[] geoAlts, Unit geoUnit, boolean copy) throws VisADException, RemoteException Converts from altitude to geopotential altitude.- Parameters:
altitudes
- Altitudes in units ofaltUnit
.altUnit
- The unit of altitude.gravity
- Gravity.geoAlts
- Geopotential altitudes in units ofgeoUnit
. Its length shall be at leastaltitudes.length
. It may be the same array asaltitudes
.geoUnit
- The unit of geopotential altitude.copy
- if true, a new copy of the array will be made- Returns:
geoAlts
(as a convenience).- Throws:
VisADException
- Couldn't create necessary VisAD object.RemoteException
- Java RMI failure.
-
getGeopotentialUnit
Returns the standard geopotential altitude unit corresponding to an altitude unit.- Parameters:
altUnit
- A unit of altitude (e.g. m)- Returns:
- The standard geopotential altitude unit
corresponding to
altUnit
(e.g. gpm). - Throws:
VisADException
- VisAD failure.
-
getGeopotentialUnit
public static Unit getGeopotentialUnit(Unit altUnit, Real gravity) throws UnitException, TypeException, RemoteException, VisADException Returns the geopotential altitude unit corresponding to an altitude unit and gravity.- Parameters:
altUnit
- A unit of altitude (e.g. meter).gravity
- The value of gravity.- Returns:
- The geopotential altitude unit corresponding
to
altUnit
(e.g. geopotential meter). - Throws:
UnitException
- Altitude unit not a unit of length.TypeException
-gravity
isn't gravity.VisADException
- VisAD failure.RemoteException
- Java RMI failure.
-