11 real(kind_real),
parameter ::
cpf_a0 = 1.58123e-6_kind_real
12 real(kind_real),
parameter ::
cpf_a1 = -2.9331e-8_kind_real
13 real(kind_real),
parameter ::
cpf_a2 = 1.1043e-10_kind_real
14 real(kind_real),
parameter ::
cpf_b0 = 5.707e-6_kind_real
15 real(kind_real),
parameter ::
cpf_b1 = -2.051e-8_kind_real
16 real(kind_real),
parameter ::
cpf_c0 = 1.9898e-4_kind_real
17 real(kind_real),
parameter ::
cpf_c1 = -2.376e-6_kind_real
18 real(kind_real),
parameter ::
cpf_d = 1.83e-11_kind_real
19 real(kind_real),
parameter ::
cpf_e = -0.765e-8_kind_real
21 real(kind_real),
parameter ::
psv_a = 1.2378847e-5_kind_real
22 real(kind_real),
parameter ::
psv_b = -1.9121316e-2_kind_real
23 real(kind_real),
parameter ::
psv_c = 33.93711047_kind_real
24 real(kind_real),
parameter ::
psv_d = -6.3431645e+3_kind_real
26 real(kind_real),
parameter ::
ef_alpha = 1.00062_kind_real
27 real(kind_real),
parameter ::
ef_beta = 3.14e-8_kind_real
28 real(kind_real),
parameter ::
ef_gamma = 5.6e-7_kind_real
35 subroutine geop_height(geom,prs,prsi,T,q,phis,use_compress,gph)
39 real(kind_real),
intent(in ) :: prs(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
40 real(kind_real),
intent(in ) :: prsi(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz+1)
41 real(kind_real),
intent(in ) :: phis(geom%isc:geom%iec,geom%jsc:geom%jec)
42 real(kind_real),
intent(in ) :: t(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
43 real(kind_real),
intent(in ) :: q(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
44 real(kind_real),
intent(out) :: gph(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
47 real(kind_real) :: tv(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
48 real(kind_real) :: qmr(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
49 logical :: use_compress
50 integer :: isc,iec,jsc,jec,npz,i,j,k
51 real(kind=kind_real) :: tkk,tvk,tc, qmk,pak,dpk,dz
52 real(kind=kind_real) :: prs_sv, prs_v
53 real(kind=kind_real) :: ehn_fct,x_v,cmpr
63 qmr(isc:iec,jsc:jec,:) = q(isc:iec,jsc:jec,:)/(1.0 - q(isc:iec,jsc:jec,:))
64 tv(isc:iec,jsc:jec,:) = t(isc:iec,jsc:jec,:)*(1.0 +
zvir*qmr(isc:iec,jsc:jec,:))
66 if (use_compress)
then 72 do k = geom%npz, 1, -1
73 if ( k == geom%npz)
then 76 pak = exp(0.5_kind_real*(log(prsi(i,j,k+1))+log(prs(i,j,k))))
77 dpk = prsi(i,j,k+1)/prs(i,j,k)
79 tkk = 0.5_kind_real * ( t(i,j,k+1) + t(i,j,k) )
80 tvk = 0.5_kind_real * (tv(i,j,k+1) + tv(i,j,k) )
81 pak = exp(0.5_kind_real*(log(prs(i,j,k+1))+log(prs(i,j,k))))
82 dpk = prs(i,j,k+1)/prs(i,j,k)
90 x_v = prs_v/prs_sv * ehn_fct * prs_sv/pak
95 dz =
rdry/
grav * tvk * cmpr * log(dpk)
96 if ( k == geom%npz)
then 97 gph(i,j,k) = phis(i,j)/
grav + dz
99 gph(i,j,k) = gph(i,j,k+1) + dz
112 dz =
rdry/
grav * tv(i,j,k) * log(prsi(i,j,k+1)/prs(i,j,k))
113 gph(i,j,k) = phis(i,j)/
grav + dz
115 do k = geom%npz-1, 1, -1
116 dz =
rdry/
grav * 0.5_kind_real * (tv(i,j,k+1)+tv(i,j,k)) * log(prs(i,j,k+1)/prs(i,j,k))
117 gph(i,j,k) = gph(i,j,k+1) + dz
132 real(kind_real),
intent(in ) :: prs(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
133 real(kind_real),
intent(in ) :: prsi(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz+1)
134 real(kind_real),
intent(in ) :: phis(geom%isc:geom%iec,geom%jsc:geom%jec)
135 real(kind_real),
intent(in ) :: t(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
136 real(kind_real),
intent(in ) :: q(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
137 real(kind_real),
intent(out) :: gphi(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz+1)
140 real(kind_real) :: tv(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
141 real(kind_real) :: qmr(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
142 logical :: use_compress
144 integer :: isc,iec,jsc,jec,npz,i,j,k
145 real(kind=kind_real) :: tkk,tvk,tc, qmk,pak,dpk,dz
146 real(kind=kind_real) :: prs_sv, prs_v
147 real(kind=kind_real) :: ehn_fct,x_v,cmpr
155 qmr(isc:iec,jsc:jec,:) = q(isc:iec,jsc:jec,:)/(1.0 - q(isc:iec,jsc:jec,:))
156 tv(isc:iec,jsc:jec,:) = t(isc:iec,jsc:jec,:)*(1.0 +
zvir*qmr(isc:iec,jsc:jec,:))
158 if (use_compress)
then 164 gphi(i,j,geom%npz+1) = phis(i,j)/
grav 165 do k = geom%npz, 1, -1
167 pak = exp(0.5_kind_real*(log(prsi(i,j,k+1))+log(prs(i,j,k))))
168 dpk = prsi(i,j,k+1)/prs(i,j,k)
170 pak = exp(0.5_kind_real*(log(prsi(i,j,k+1))+log(prsi(i,j,k))))
171 dpk = prsi(i,j,k+1)/prsi(i,j,k)
179 prs_v = qmk* pak/(1.0+qmk*
rdry/
rvap)
180 x_v = prs_v/prs_sv * ehn_fct * prs_sv/pak
186 dz =
rdry/
grav * tvk * cmpr * log(dpk)
187 gphi(i,j,k) = gphi(i,j,k+1) + dz
197 gphi(i,j, geom%npz+1) = phis(i,j)/
grav 199 do k = geom%npz, 1, -1
201 dz =
rdry/
grav * tv(i,j,k) * log(prsi(i,j,k+1)/prs(i,j,k))
203 dz =
rdry/
grav * tv(i,j,k) * log(prsi(i,j,k+1)/prsi(i,j,k))
205 gphi(i,j,k) = gphi(i,j,k+1) + dz
real(kind=kind_real), parameter, public tice
real(kind_real), parameter psv_b
real(kind_real), parameter cpf_b0
real(kind=kind_real), parameter, public rdry
Fortran derived type to hold geometry data for the FV3JEDI model.
real(kind_real), parameter cpf_d
real(kind=kind_real), parameter, public rvap
subroutine, public geop_height_levels(geom, prs, prsi, T, q, phis, use_compress, gphi)
real(kind_real), parameter cpf_a2
real(kind_real), parameter cpf_a0
real(kind_real), parameter ef_alpha
real(kind_real), parameter cpf_e
subroutine, public geop_height(geom, prs, prsi, T, q, phis, use_compress, gph)
real(kind_real), parameter psv_c
real(kind_real), parameter psv_d
real(kind_real), parameter cpf_c1
real, parameter, public grav
Acceleration due to gravity [m/s^2].
real(kind_real), parameter ef_beta
real(kind_real), parameter ef_gamma
Fortran module handling geometry for the FV3 model.
real(kind_real), parameter psv_a
real(kind=kind_real), parameter, public zvir
integer, parameter, public kind_real
real(kind_real), parameter cpf_c0
real(kind_real), parameter cpf_a1
real(kind_real), parameter cpf_b1