Update version info for release v4.6.1 (#2122)
[WRF.git] / var / da / da_radiance / gsi_constants.f90
blob14e9a4309106b1fcdd664db5c4376c131f098846
1 module gsi_constants
2 !$$$ module documentation block
3 ! . . . .
4 ! module: constants
5 ! prgmmr: treadon org: np23 date: 2003-09-25
7 ! abstract: This module contains the definition of various constants
8 ! used in the gsi code
10 ! program history log:
11 ! 2003-09-25 treadon - original code
12 ! 2004-03-02 treadon - allow global and regional constants to differ
13 ! 2004-06-16 treadon - update documentation
14 ! 2004-10-28 treadon - replace parameter tiny=1.e-12 with tiny_r_kind
15 ! and tiny_single
16 ! 2004-11-16 treadon - add huge_single, huge_r_kind parameters
17 ! 2005-01-27 cucurull - add ione
19 ! Subroutines Included:
20 ! sub init_constants - compute derived constants, set regional/global constants
22 ! Variable Definitions:
23 ! see below
25 ! attributes:
26 ! language: f90
27 ! machine: ibm RS/6000 SP
29 !$$$
30 use gsi_kinds, only: r_single,r_kind,i_kind
31 implicit none
33 ! Declare constants
34 integer(i_kind) izero,ione
35 real(r_kind) rearth,grav,omega,rd,rv,cp,cv,cvap,cliq
36 real(r_kind) csol,hvap,hfus,psat,t0c,ttp,jcal,cp_mass
37 real(r_kind) fv,deg2rad,rad2deg,pi,tiny_r_kind,huge_r_kind
38 real(r_kind) ozcon,rozcon,tpwcon,rd_over_g,rd_over_cp,g_over_rd
39 real(r_kind) amsua_clw_d1,amsua_clw_d2,constoz,zero,one,two,four
40 real(r_kind) one_tenth,quarter,three,five
41 real(r_kind) rearth_equator,stndrd_atmos_ps
42 real(r_kind) semi_major_axis,semi_minor_axis,n_a,n_b
43 real(r_kind) eccentricity,grav_polar,grav_ratio
44 real(r_kind) grav_equator,earth_omega,grav_constant
45 real(r_kind) flattening,eccentricity_linear,somigliana
46 real(r_kind) dldt,dldti,hsub,psatk,tmix,xa,xai,xb,xbi
47 real(r_kind) eps,epsm1,omeps
48 real(r_kind) elocp,cpr,el2orc,cclimit,climit,epsq
49 real(r_kind) pcpeff0,pcpeff1,pcpeff2,pcpeff3,rcp,c0,delta
50 real(r_kind) h1000,factor1,factor2,rhcbot,rhctop,dx_max,dx_min,dx_inv
51 real(r_kind) h300,half,cmr,cws,ke2,row,rrow
52 real(r_single) zero_single,tiny_single,huge_single
55 ! Define constants common to global and regional applications
56 ! name value description units
57 ! ---- ----- ----------- -----
58 parameter(rearth_equator= 6.37813662e6_r_kind) ! equatorial earth radius (m)
59 parameter(omega = 7.2921e-5_r_kind) ! angular velocity of earth (1/s)
60 parameter(cp = 1.0046e+3_r_kind) ! specific heat of air @pressure (J/kg/K)
61 parameter(cvap = 1.8460e+3_r_kind) ! specific heat of h2o vapor (J/kg/K)
62 parameter(csol = 2.1060e+3_r_kind) ! specific heat of solid h2o (ice)(J/kg/K)
63 parameter(hvap = 2.5000e+6_r_kind) ! latent heat of h2o condensation (J/kg)
64 parameter(hfus = 3.3358e+5_r_kind) ! latent heat of h2o fusion (J/kg)
65 parameter(psat = 6.1078e+2_r_kind) ! pressure at h2o triple point (Pa)
66 parameter(t0c = 2.7315e+2_r_kind) ! temperature at zero celsius (K)
67 parameter(ttp = 2.7316e+2_r_kind) ! temperature at h2o triple point (K)
68 parameter(jcal = 4.1855e+0_r_kind) ! joules per calorie ()
69 parameter(stndrd_atmos_ps = 1013.25e2_r_kind) ! 1976 US standard atmosphere ps (Pa)
71 ! Numeric constants
72 parameter(izero = 0)
73 parameter(ione = 1)
74 parameter(zero_single = 0.0_r_single)
75 parameter(zero = 0.0_r_kind)
76 parameter(one_tenth = 0.10_r_kind)
77 parameter(quarter= 0.25_r_kind)
78 parameter(one = 1.0_r_kind)
79 parameter(two = 2.0_r_kind)
80 parameter(three = 3.0_r_kind)
81 parameter(four = 4.0_r_kind)
82 parameter(five = 5.0_r_kind)
84 ! Constants for gps refractivity
85 parameter(n_a=77.6_r_kind) !K/mb
86 parameter(n_b=3.73e+5_r_kind) !K^2/mb
88 ! Parameters below from WGS-84 model software inside GPS receivers.
89 parameter(semi_major_axis = 6378.1370e3_r_kind) ! (m)
90 parameter(semi_minor_axis = 6356.7523142e3_r_kind) ! (m)
91 parameter(grav_polar = 9.8321849378_r_kind) ! (m/s2)
92 parameter(grav_equator = 9.7803253359_r_kind) ! (m/s2)
93 parameter(earth_omega = 7.292115e-5_r_kind) ! (rad/s)
94 parameter(grav_constant = 3.986004418e14_r_kind) ! (m3/s2)
96 ! Derived geophysical constants
97 parameter(flattening = (semi_major_axis-semi_minor_axis)/semi_major_axis)!()
98 parameter(somigliana = &
99 (semi_minor_axis/semi_major_axis) * (grav_polar/grav_equator) - one)!()
100 parameter(grav_ratio = (earth_omega*earth_omega * &
101 semi_major_axis*semi_major_axis * semi_minor_axis) / grav_constant) !()
103 ! Derived thermodynamic constants
104 parameter ( dldti = cvap-csol )
105 parameter ( hsub = hvap+hfus )
106 parameter ( psatk = psat*0.001_r_kind )
107 parameter ( tmix = ttp-20._r_kind )
108 parameter ( elocp = hvap/cp )
109 parameter ( rcp = one/cp )
111 ! Constants used in GFS moist physics
112 parameter ( h300 = 300._r_kind )
113 parameter ( half = 0.5_r_kind )
114 parameter ( cclimit = 0.001_r_kind )
115 parameter ( climit = 1.e-20_r_kind)
116 parameter ( epsq = 2.e-12_r_kind )
117 parameter ( h1000 = 1000.0_r_kind)
118 parameter ( rhcbot=0.85_r_kind )
119 parameter ( rhctop=0.85_r_kind )
120 parameter ( dx_max=-8.8818363_r_kind )
121 parameter ( dx_min=-5.2574954_r_kind )
122 parameter ( dx_inv=one/(dx_max-dx_min) )
123 parameter ( c0=0.002_r_kind )
124 parameter ( delta=0.6077338_r_kind )
125 parameter ( pcpeff0=1.591_r_kind )
126 parameter ( pcpeff1=-0.639_r_kind )
127 parameter ( pcpeff2=0.0953_r_kind )
128 parameter ( pcpeff3=-0.00496_r_kind )
129 parameter ( cmr = one/0.0003_r_kind )
130 parameter ( cws = 0.025_r_kind )
131 parameter ( ke2 = 0.00002_r_kind )
132 parameter ( row = 1000._r_kind )
133 parameter ( rrow = one/row )
135 ! Constant used to process ozone
136 parameter ( constoz = 604229.0_r_kind)
138 ! Constants used in cloud liquid water correction for AMSU-A
139 ! brightness temperatures
140 parameter ( amsua_clw_d1 = 0.754_r_kind )
141 parameter ( amsua_clw_d2 = -2.265_r_kind )
143 contains
144 #include "init_constants_derived.inc"
145 ! Routine never used in wrfvar
146 ! #include "init_constants.inc"
148 end module gsi_constants