Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=r64), | intent(in) | :: | pb | |||
real(kind=r64), | intent(in) | :: | tdb | |||
real(kind=r64), | intent(in) | :: | dw | |||
character(len=*), | intent(in), | optional | :: | calledfrom |
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.
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 PsyRhoAirFnPbTdbW(pb,tdb,dw,calledfrom) result(rhoair)
! FUNCTION INFORMATION:
! AUTHOR G. S. Wright
! DATE WRITTEN June 2, 1994
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function provides density of air as a function of barometric
! pressure, dry bulb temperature, and humidity ratio.
! METHODOLOGY EMPLOYED:
! ideal gas law
! universal gas const for air 287 J/(kg K)
! air/water molecular mass ratio 28.9645/18.01534
! REFERENCES:
! Wylan & Sontag, Fundamentals of Classical Thermodynamics.
! ASHRAE handbook 1985 Fundamentals, Ch. 6, eqn. (6),(26)
! USE STATEMENTS:
USE General, ONLY: RoundSigDigits
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
REAL(r64), intent(in) :: pb ! barometric pressure (Pascals)
REAL(r64), intent(in) :: tdb ! dry bulb temperature (Celsius)
REAL(r64), intent(in) :: dw ! humidity ratio (kgWater/kgDryAir)
character(len=*), intent(in), optional :: calledfrom ! routine this function was called from (error messages) !unused1208
REAL(r64) :: rhoair ! result=> density of air
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
REAL(r64) w ! humidity ratio
w=MAX(dw,1.0d-5)
rhoair = pb/(287.d0*(tdb+KelvinConv)*(1.d0+1.6077687d0*w))
if (rhoair < 0.0d0) then
CALL ShowSevereError('PsyRhoAirFnPbTdbW: RhoAir (Density of Air) is calculated <= 0 ['// &
trim(RoundSigDigits(rhoair,5))//'].')
CALL ShowContinueError('pb =['//trim(RoundSigDigits(pb,2))//'], tdb=['//trim(RoundSigDigits(tdb,2))// &
'], w=['//trim(RoundSigDigits(dw,7))//'].')
if (present(calledfrom)) then
CALL ShowContinueErrorTimeStamp(' Routine='//trim(calledfrom)//',')
else
CALL ShowContinueErrorTimeStamp(' Routine=Unknown,')
endif
CALL ShowFatalError('Program terminates due to preceding condition.')
endif
return
end function PsyRhoAirFnPbTdbW