Skip to content
Snippets Groups Projects
Commit 90ab77b0 authored by Evgeny Mortikov's avatar Evgeny Mortikov
Browse files

minor update

parent 70b879e2
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,8 @@ module obl_common_phys
!< @brief common physical parameters and constants
! --------------------------------------------------------------------------------
! directives list
! --------------------------------------------------------------------------------
implicit none
private
......@@ -22,23 +24,35 @@ module obl_common_phys
real, public, parameter :: R_v = 461.0 !< water vapor gas constant [J / (K * kg)]
! --------------------------------------------------------------------------------
contains
! --------------------------------------------------------------------------------
subroutine get_specific_humidity(Q, e, P, R_d, R_v)
real, intent(out) :: Q
!> @brief calculate specific humidity
! --------------------------------------------------------------------------------
real, intent(out) :: Q !< specific humidity [kg/kg]
real, intent(in) :: e, P, R_d, R_v
real, intent(in) :: e, P !< vapor pressure & pressure [*]
real, intent(in) :: R_d, R_v
real :: gamma
! --------------------------------------------------------------------------------
gamma = R_d / R_v
Q = gamma * e / (p - (1.0 - gamma) * e)
end subroutine
! --------------------------------------------------------------------------------
subroutine get_water_saturation_vapor_pressure_in_kPa(e, TinK)
real, intent(out) :: e
!> @brief water saturation vapor pressure [Alduchov & Eskridge, 1996. J. Appl. Meteor. 35. 601-609]
!> @brief *: see also [Ambaum, 2020. Q.J.R.Met.Soc. 146(733). 4252-4258]
!> @brief *: moist air corrections are neglected currently
! --------------------------------------------------------------------------------
real, intent(out) :: e !< vapor pressure, [kPa]
real, intent(in) :: TinK
real :: TinC
! --------------------------------------------------------------------------------
TinC = TinK - zero_celsius
e = 0.61094 * exp((17.625 * TinC) / (TinC + 243.04))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment