MONC
saturation.F90
Go to the documentation of this file.
1 
4  implicit none
5 
6  real(kind=DEFAULT_PRECISION), parameter :: &
7  tk0c = 273.15_default_precision, &! Temperature of freezing in Kelvin
8  qsa1 = 3.8_default_precision, &! Top in equation to calculate qsat
9  qsa2 = -17.2693882_default_precision, &! Constant in qsat equation
10  qsa3 = 35.86_default_precision, &! Constant in qsat equation
11  qsa4 = 6.109_default_precision ! Constant in qsat equation
12 
13  public qsaturation, dqwsatdt
14 contains
15 
21  real(kind=DEFAULT_PRECISION) function qsaturation(temperature, pressure)
22  real(kind=DEFAULT_PRECISION), intent(in) :: temperature, pressure
23 
24  qsaturation = qsa1/(pressure*exp(qsa2*(temperature - tk0c)/(temperature - qsa3)) - qsa4)
25  end function qsaturation
26 
32  real(kind=DEFAULT_PRECISION) function dqwsatdt(saturation_mixing_ratio, temperature)
33  real(kind=DEFAULT_PRECISION), intent(in) :: saturation_mixing_ratio, temperature
34 
35  dqwsatdt = -qsa2*(tk0c-qsa3)*(1.0_default_precision+qsa4*saturation_mixing_ratio/qsa1)*&
36  saturation_mixing_ratio*(temperature-qsa3)**(-2.0_default_precision)
37  end function dqwsatdt
38 end module saturation_mod
real(kind=default_precision) function, public dqwsatdt(saturation_mixing_ratio, temperature)
Calculated the rate of change with temperature of saturation mixing ratio over liquid water...
Definition: saturation.F90:33
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
Definition: datadefn.F90:17
Contains common definitions for the data and datatypes used by MONC.
Definition: datadefn.F90:2
Saturation physics functionality which is used throughout the code.
Definition: saturation.F90:2
real(kind=default_precision), parameter qsa4
Definition: saturation.F90:6
real(kind=default_precision), parameter tk0c
Definition: saturation.F90:6
real(kind=default_precision), parameter qsa3
Definition: saturation.F90:6
real(kind=default_precision), parameter qsa2
Definition: saturation.F90:6
real(kind=default_precision) function, public qsaturation(temperature, pressure)
Function to return the saturation mixing ratio over water based on tetans formular QS=3...
Definition: saturation.F90:22
real(kind=default_precision), parameter qsa1
Definition: saturation.F90:6