1 !***********************************************************************
2 !* GNU Lesser General Public License
4 !* This file is part of the GFDL Flexible Modeling System (FMS).
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
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=18), public, parameter :: constants_version = 'FMSConstants: GFS '
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.1415926535897931_r8_kind !< Ratio of circle circumference
28 real(kind=RKIND), public, parameter :: PI = PI_8 !< Ratio of circle circumference
30 real(kind=RKIND), public, parameter :: RAD_TO_DEG = 180._r8_kind/PI_8 !< Degrees per radian [deg/rad]
31 real(kind=RKIND), public, parameter :: DEG_TO_RAD = PI_8/180._r8_kind !< Radians per degree [rad/deg]
32 real(kind=RKIND), public, parameter :: RADIAN = RAD_TO_DEG !< Equal to RAD_TO_DEG for backward
33 !! compatability. [rad/deg]
35 !--- Earth physical constants
36 real(kind=RKIND), public, parameter :: RADIUS = 6.3712E+6_r8_kind !< Radius of the Earth [m]
37 real(kind=RKIND), public, parameter :: OMEGA = 7.2921E-5_r8_kind !< Rotation rate of the Earth [1/s]
38 real(kind=r8_kind), public, parameter :: GRAV_8 = 9.80665_r8_kind !< Acceleration due to gravity
39 !! [m/s^2] (REAL(KIND=8))
40 real(kind=RKIND), public, parameter :: GRAV = GRAV_8 !< Acceleration due to gravity
42 real(kind=RKIND), public, parameter :: SECONDS_PER_DAY = 86400._r8_kind !< Seconds in a day [s]
43 real(kind=RKIND), public, parameter :: SECONDS_PER_HOUR = 3600._r8_kind !< Seconds in an hour [s]
44 real(kind=RKIND), public, parameter :: SECONDS_PER_MINUTE = 60._r8_kind !< Seconds in a minute [s]
46 !--- Various gas constants
47 real(kind=RKIND), public, parameter :: RDGAS = 287.05_r8_kind !< Gas constant for dry air [J/kg/deg]
48 real(kind=RKIND), public, parameter :: RVGAS = 461.50_r8_kind !< Gas constant for water vapor [J/kg/deg]
49 real(kind=RKIND), public, parameter :: HLV = 2.500E6_r8_kind !< Latent heat of evaporation [J/kg]
50 real(kind=RKIND), public, parameter :: HLF = 3.3358e5_r8_kind !< Latent heat of fusion [J/kg]
51 real(kind=RKIND), public, parameter :: HLS = HLV + HLF !< Latent heat of sublimation [J/kg]
52 real(kind=RKIND), public, parameter :: CP_AIR = 1004.6_r8_kind !< Specific heat capacity of dry air
53 !! at constant pressure [J/kg/deg]
54 real(kind=RKIND), public, parameter :: CP_VAPOR = 4.0_r8_kind*RVGAS !< Specific heat capacity of water vapor
55 !! at constant pressure [J/kg/deg]
56 real(kind=RKIND), public, parameter :: CP_OCEAN = 3989.24495292815_r8_kind !< Specific heat capacity taken
57 !! from McDougall (2002)
58 !! "Potential Enthalpy ..." [J/kg/deg]
59 real(kind=RKIND), public, parameter :: KAPPA = RDGAS/CP_AIR !< RDGAS / CP_AIR [dimensionless]
60 real(kind=RKIND), public, parameter :: DENS_H2O = 1000._r8_kind !< Density of liquid water [kg/m^3]
61 real(kind=RKIND), public, parameter :: RHOAIR = 1.292269_r8_kind !< Reference atmospheric density [kg/m^3]
62 real(kind=RKIND), public, parameter :: RHO0 = 1.035E3_r8_kind !< Average density of sea water [kg/m^3]
63 real(kind=RKIND), public, parameter :: RHO0R = 1.0_r8_kind/RHO0 !< Reciprocal of average density of
65 real(kind=RKIND), public, parameter :: RHO_CP = RHO0*CP_OCEAN !< (kg/m^3)*(cal/kg/deg C)(joules/cal) =
66 !! (joules/m^3/deg C) [J/m^3/deg]
67 real(kind=RKIND), public, parameter :: O2MIXRAT = 2.0953E-01_r8_kind !< Mixing ratio of molecular oxygen
68 !! in air [dimensionless]
69 real(kind=RKIND), public, parameter :: WTMAIR = 2.896440E+01_r8_kind !< Molecular weight of air [AMU]
70 real(kind=RKIND), public, parameter :: WTMH2O = WTMAIR*(RDGAS/RVGAS) !< Molecular weight of water [AMU]
71 real(kind=RKIND), public, parameter :: WTMOZONE = 47.99820_r8_kind !< Molecular weight of ozone [AMU]
72 real(kind=RKIND), public, parameter :: WTMC = 12.00000_r8_kind !< Molecular weight of carbon [AMU]
73 real(kind=RKIND), public, parameter :: WTMCO2 = 44.00995_r8_kind !< Molecular weight of carbon dioxide
75 real(kind=RKIND), public, parameter :: WTMCH4 = 16.0425_r8_kind !< Molecular weight of methane [AMU]
76 real(kind=RKIND), public, parameter :: WTMO2 = 31.9988_r8_kind !< Molecular weight of molecular
78 real(kind=RKIND), public, parameter :: WTMCFC11 = 137.3681_r8_kind !< Molecular weight of CFC-11
80 real(kind=RKIND), public, parameter :: WTMCFC12 = 120.9135_r8_kind !< Molecular weight of CFC-21
82 real(kind=RKIND), public, parameter :: WTMN = 14.0067_r8_kind !< Molecular weight of Nitrogen [AMU]
83 real(kind=RKIND), public, parameter :: DIFFAC = 1.660_r8_kind !< Diffusivity factor [dimensionless]
84 real(kind=RKIND), public, parameter :: ES0 = 1.0_r8_kind !< Humidity factor [dimensionless]
85 !! Controls the humidity content of
86 !! the atmosphere through
87 !! the Saturation Vapour Pressure
88 !! expression when using DO_SIMPLE
89 real(kind=RKIND), public, parameter :: CON_CLIQ = 4.1855E+3_r8_kind !< Specific heat H2O liq [J/kg/K]
90 real(kind=RKIND), public, parameter :: CON_CSOL = 2.1060E+3_r8_kind !< Specific heat H2O ice [J/kg/K]
92 !--- Pressure and Temperature constants
93 real(kind=RKIND), public, parameter :: PSTD = 1.013250E+06_r8_kind !< Mean sea level pressure [dynes/cm^2]
94 real(kind=RKIND), public, parameter :: PSTD_MKS = 101325.0_r8_kind !< Mean sea level pressure [N/m^2]
95 real(kind=RKIND), public, parameter :: KELVIN = 273.15_r8_kind !< Degrees Kelvin at zero Celsius [K]
96 real(kind=RKIND), public, parameter :: TFREEZE = 273.15_r8_kind !< Freezing temperature of fresh water [K]
97 real(kind=RKIND), public, parameter :: C2DBARS = 1.E-4_r8_kind !< Converts rho*g*z (in mks) to dbars:
98 !! 1dbar = 10^4 (kg/m^3)(m/s^2)m [dbars]
101 real(kind=RKIND), public, parameter :: STEFAN = 5.6734E-8_r8_kind !< Stefan-Boltzmann constant [W/m^2/deg^4]
102 real(kind=RKIND), public, parameter :: AVOGNO = 6.023000E+23_r8_kind !< Avogadro's number [atoms/mole]
103 real(kind=RKIND), public, parameter :: VONKARM = 0.40_r8_kind !< Von Karman constant [dimensionless]
105 !--- Miscellaneous constants
106 real(kind=RKIND), public, parameter :: ALOGMIN = -50.0_r8_kind !< Minimum value allowed as argument
107 !! to log function [N/A]
108 real(kind=RKIND), public, parameter :: EPSLN = 1.0E-40_r8_kind !< A small number to prevent divide by
109 !! zero exceptions [N/A]
110 real(kind=RKIND), public, parameter :: RADCON = ((1.0D+02*GRAV)/(1.0D+04*CP_AIR))*SECONDS_PER_DAY !< Factor to
111 !! convert flux divergence
112 !! to heating rate in degrees per day
113 !! [deg sec/(cm day)]
114 real(kind=RKIND), public, parameter :: RADCON_MKS = (GRAV/CP_AIR)*SECONDS_PER_DAY !< Factor to
115 !! convert flux divergence
116 !! to heating rate in degrees per day