Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | Z |
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
FUNCTION OutBaroPressAt(Z) RESULT(LocalAirPressure)
! FUNCTION INFORMATION:
! AUTHOR Daeho Kang
! DATE WRITTEN August 2009
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Calculates local air barometric pressure at a given altitude.
! METHODOLOGY EMPLOYED:
! U.S. Standard Atmosphere1976, Part 1, Chapter 1.3, Equation 33b.
! REFERENCES:
! U.S. Standard Atmosphere1976, Part 1, Chapter 1.3, Equation 33b.
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), INTENT(IN) :: Z ! Height above ground (m)
REAL(r64) :: LocalAirPressure ! Return result for function (Pa)
! FNCTION PARAMETER DEFINITIONS:
REAL(r64), PARAMETER :: StdGravity = 9.80665d0 ! The acceleration of gravity at the sea level (m/s2)
REAL(r64), PARAMETER :: AirMolarMass = 0.028964d0 ! Molar mass of Earth's air (kg/mol)
REAL(r64), PARAMETER :: GasConstant = 8.31432d0 ! Molar gas constant (J/Mol-K)
REAL(r64), PARAMETER :: TempGradient = -0.0065d0 ! Molecular-scale temperature gradient (K/m)
REAL(r64), PARAMETER :: GeopotentialH = 0.0d0 ! Geopotential height (zero within 11km from the sea level) (m)
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) :: BaseTemp ! Base temperature at Z
BaseTemp = OutDryBulbTempAt(Z) + KelvinConv
IF (Z <= 0.0d0) THEN
LocalAirPressure = 0.0d0
ELSE IF (SiteTempGradient == 0.0d0) THEN
LocalAirPressure = OutBaroPress
ELSE
LocalAirPressure = StdBaroPress * (BaseTemp / (BaseTemp + TempGradient * (Z - GeopotentialH)))** &
((StdGravity * AirMolarMass) / (GasConstant * TempGradient))
END IF
RETURN
END FUNCTION OutBaroPressAt