feat: emc mixedmode support (#997)
[FMS.git] / constants4 / gfdl_constantsR4.h
blobe0bd9573ba466e7fc5e2bca731088aa5ed68047d
1 !***********************************************************************
2 !* GNU Lesser General Public License
3 !*
4 !* This file is part of the GFDL Flexible Modeling System (FMS).
5 !*
6 !* FMS is free software: you can redistribute it and/or modify it under
7 !* the terms of the GNU Lesser General Public License as published by
8 !* the Free Software Foundation, either version 3 of the License, or (at
9 !* your option) any later version.
11 !* FMS is distributed in the hope that it will be useful, but WITHOUT
12 !* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 !* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 !* for more details.
16 !* You should have received a copy of the GNU Lesser General Public
17 !* License along with FMS. If not, see <http://www.gnu.org/licenses/>.
18 !***********************************************************************
20 character(len=20), public, parameter :: constantsR4_version = 'FMSConstantsR4: GFDL'
22 !--- temporary definition for backwards compatibility
23 real(kind=RKIND), public, parameter :: small_fac = 1._r8_kind
25 !--- Spherical coordinate conversion constants
26 real(kind=r8_kind), public, parameter :: PI_8 = 3.14159265358979323846_r8_kind !< Ratio of circle circumference to diameter [N/A]
27 real(kind=RKIND), public, parameter :: PI = PI_8 !< Ratio of circle circumference to diameter [N/A]
28 real(kind=RKIND), public, parameter :: RAD_TO_DEG = 180._r8_kind/PI_8 !< Degrees per radian [deg/rad]
29 real(kind=RKIND), public, parameter :: DEG_TO_RAD = PI_8/180._r8_kind !< Radians per degree [rad/deg]
30 real(kind=RKIND), public, parameter :: RADIAN = RAD_TO_DEG !< Equal to RAD_TO_DEG for backward compatability. [rad/deg]
32 !--- Earth physical constants
33 real(kind=RKIND), public, parameter :: RADIUS = 6371.0E+3_r8_kind !< Radius of the Earth [m]
34 real(kind=RKIND), public, parameter :: OMEGA = 7.292E-5_r8_kind !< Rotation rate of the Earth [1/s]
35 real(kind=RKIND), public, parameter :: GRAV = 9.80_r8_kind !< Acceleration due to gravity [m/s^2]
36 real(kind=RKIND), public, parameter :: SECONDS_PER_DAY = 86400._r8_kind !< Seconds in a day [s]
37 real(kind=RKIND), public, parameter :: SECONDS_PER_HOUR = 3600._r8_kind !< Seconds in an hour [s]
38 real(kind=RKIND), public, parameter :: SECONDS_PER_MINUTE = 60._r8_kind !< Seconds in a minute [s]
40 !--- Various gas constants
41 real(kind=RKIND), public, parameter :: RDGAS = 287.04_r8_kind !< Gas constant for dry air [J/kg/deg]
42 real(kind=RKIND), public, parameter :: RVGAS = 461.50_r8_kind !< Gas constant for water vapor [J/kg/deg]
43 real(kind=RKIND), public, parameter :: HLV = 2.500E6_r8_kind !< Latent heat of evaporation [J/kg]
44 real(kind=RKIND), public, parameter :: HLF = 3.34E5_r8_kind !< Latent heat of fusion [J/kg]
45 real(kind=RKIND), public, parameter :: HLS = HLV + HLF !< Latent heat of sublimation [J/kg]
46 real(kind=RKIND), public, parameter :: KAPPA = 2.0_r8_kind/7.0_r8_kind !< RDGAS / CP_AIR [dimensionless]
47 real(kind=RKIND), public, parameter :: CP_AIR = RDGAS/KAPPA !< Specific heat capacity of dry air
48 !! at constant pressure [J/kg/deg]
49 real(kind=RKIND), public, parameter :: CP_VAPOR = 4.0_r8_kind*RVGAS !< Specific heat capacity of water vapor
50 !! at constant pressure [J/kg/deg]
51 real(kind=RKIND), public, parameter :: CP_OCEAN = 3989.24495292815_r8_kind !< Specific heat capacity taken from McDougall (2002)
52 !! "Potential Enthalpy ..." [J/kg/deg]
53 real(kind=RKIND), public, parameter :: DENS_H2O = 1000._r8_kind !< Density of liquid water [kg/m^3]
54 real(kind=RKIND), public, parameter :: RHOAIR = 1.292269_r8_kind !< Reference atmospheric density [kg/m^3]
55 real(kind=RKIND), public, parameter :: RHO0 = 1.035E3_r8_kind !< Average density of sea water [kg/m^3]
56 real(kind=RKIND), public, parameter :: RHO0R = 1.0_r8_kind/RHO0 !< Reciprocal of average density of sea water [m^3/kg]
57 real(kind=RKIND), public, parameter :: RHO_CP = RHO0*CP_OCEAN !< (kg/m^3)*(cal/kg/deg C)(joules/cal) =
58 !! (joules/m^3/deg C) [J/m^3/deg]
59 real(kind=RKIND), public, parameter :: O2MIXRAT = 2.0953E-01_r8_kind !< Mixing ratio of molecular oxygen in air [dimensionless]
60 real(kind=RKIND), public, parameter :: WTMAIR = 2.896440E+01_r8_kind !< Molecular weight of air [AMU]
61 real(kind=RKIND), public, parameter :: WTMH2O = WTMAIR*(RDGAS/RVGAS) !< Molecular weight of water [AMU]
62 real(kind=RKIND), public, parameter :: WTMOZONE = 47.99820_r8_kind !< Molecular weight of ozone [AMU]
63 real(kind=RKIND), public, parameter :: WTMC = 12.00000_r8_kind !< Molecular weight of carbon [AMU]
64 real(kind=RKIND), public, parameter :: WTMCO2 = 44.00995_r8_kind !< Molecular weight of carbon dioxide [AMU]
65 real(kind=RKIND), public, parameter :: WTMCH4 = 16.0425_r8_kind !< Molecular weight of methane [AMU]
66 real(kind=RKIND), public, parameter :: WTMO2 = 31.9988_r8_kind !< Molecular weight of molecular oxygen [AMU]
67 real(kind=RKIND), public, parameter :: WTMCFC11 = 137.3681_r8_kind !< Molecular weight of CFC-11 (CCl3F) [AMU]
68 real(kind=RKIND), public, parameter :: WTMCFC12 = 120.9135_r8_kind !< Molecular weight of CFC-21 (CCl2F2) [AMU]
69 real(kind=RKIND), public, parameter :: WTMN = 14.0067_r8_kind !< Molecular weight of Nitrogen [AMU]
70 real(kind=RKIND), public, parameter :: DIFFAC = 1.660_r8_kind !< Diffusivity factor [dimensionless]
71 real(kind=RKIND), public, parameter :: ES0 = 1.0_r8_kind !< Humidity factor [dimensionless]
72 !! Controls the humidity content of the atmosphere through
73 !! the Saturation Vapour Pressure expression
74 !! when using DO_SIMPLE
76 !--- Pressure and Temperature constants
77 real(kind=RKIND), public, parameter :: PSTD = 1.013250E+06_r8_kind !< Mean sea level pressure [dynes/cm^2]
78 real(kind=RKIND), public, parameter :: PSTD_MKS = 101325.0_r8_kind !< Mean sea level pressure [N/m^2]
79 real(kind=RKIND), public, parameter :: KELVIN = 273.15_r8_kind !< Degrees Kelvin at zero Celsius [K]
80 real(kind=RKIND), public, parameter :: TFREEZE = 273.16_r8_kind !< Freezing temperature of fresh water [K]
81 real(kind=RKIND), public, parameter :: C2DBARS = 1.E-4_r8_kind !< Converts rho*g*z (in mks) to dbars:
82 !! 1dbar = 10^4 (kg/m^3)(m/s^2)m [dbars]
84 !--- Named constants
85 real(kind=RKIND), public, parameter :: STEFAN = 5.6734E-8_r8_kind !< Stefan-Boltzmann constant [W/m^2/deg^4]
86 real(kind=RKIND), public, parameter :: AVOGNO = 6.023000E+23_r8_kind !< Avogadro's number [atoms/mole]
87 real(kind=RKIND), public, parameter :: VONKARM = 0.40_r8_kind !< Von Karman constant [dimensionless]
89 !--- Miscellaneous constants
90 real(kind=RKIND), public, parameter :: ALOGMIN = -50.0_r8_kind !< Minimum value allowed as argument to log function [N/A]
91 real(kind=RKIND), public, parameter :: EPSLN = 1.0E-40_r8_kind !< A small number to prevent divide by zero exceptions [N/A]
92 real(kind=RKIND), public, parameter :: RADCON = ((1.0E+02*GRAV)/(1.0D+04*CP_AIR))*SECONDS_PER_DAY !< Factor to convert flux divergence
93 !! to heating rate in degrees per day
94 !! [deg sec/(cm day)]
95 real(kind=RKIND), public, parameter :: RADCON_MKS = (GRAV/CP_AIR)*SECONDS_PER_DAY !< Factor to convert flux divergence
96 !! to heating rate in degrees per day
97 !! [deg sec/(m day)]