FV3 Bundle
moisture_variables_mod.f90
Go to the documentation of this file.
1 ! (C) Copyright 2018 UCAR
2 !
3 ! This software is licensed under the terms of the Apache Licence Version 2.0
4 ! which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
5 
6 !> Variable transforms on moisture variables for fv3-jedi
7 !> Daniel Holdaway, NASA/JCSDA
8 
10 
14 
15 implicit none
16 private
17 
18 public crtm_ade_efr
19 public crtm_mixratio
20 public crtm_mixratio_tl
21 public crtm_mixratio_ad
22 public rh_to_q
23 public rh_to_q_tl
24 public rh_to_q_ad
25 public q_to_rh
26 public q_to_rh_tl
27 public q_to_rh_ad
28 public esinit
29 public dqsat
30 
31 contains
32 
33 !>----------------------------------------------------------------------------
34 !> Compute cloud area density and effective radius for the crtm --------------
35 !>----------------------------------------------------------------------------
36 
37 subroutine crtm_ade_efr( geom,p,T,delp,sea_frac,q,ql,qi,ql_ade,qi_ade,ql_efr,qi_efr)
38 
39 implicit none
40 
41 !Arguments
42 type(fv3jedi_geom) , intent(in) :: geom
43 real(kind=kind_real), intent(in) :: p(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Pressure | Pa
44 real(kind=kind_real), intent(in) :: t(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Temperature | K
45 real(kind=kind_real), intent(in) :: delp(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Layer thickness | Pa
46 real(kind=kind_real), intent(in) :: sea_frac(geom%isc:geom%iec,geom%jsc:geom%jec) !Sea fraction | 1
47 real(kind=kind_real), intent(in) :: q(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Specific humidity | kg/kg
48 real(kind=kind_real), intent(in) :: ql(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Mixing ratio of cloud liquid water | kg/kg
49 real(kind=kind_real), intent(in) :: qi(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Mixing ratio of cloud ice water | kg/kg
50 
51 real(kind=kind_real), intent(out) :: ql_ade(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz) !area density for cloud liquid water | kg/m^2
52 real(kind=kind_real), intent(out) :: qi_ade(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz) !area density for cloud ice water | kg/m^2
53 real(kind=kind_real), intent(out) :: ql_efr(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz) !efr for cloud liquid water | microns
54 real(kind=kind_real), intent(out) :: qi_efr(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz) !efr for cloud ice | microns
55 
56 !Locals
57 integer :: isc,iec,jsc,jec,npz
58 integer :: i,j,k
59 logical, allocatable :: seamask(:,:)
60 real(kind=kind_real) :: tem1, tem2, tem3, kgkg_to_kgm2
61 
62 
63 ! Grid convenience
64 ! ----------------
65 isc = geom%isc
66 iec = geom%iec
67 jsc = geom%jsc
68 jec = geom%jec
69 npz = geom%npz
70 
71 
72 ! Set outputs to zero
73 ! -------------------
74 ql_ade = 0.0_kind_real
75 qi_ade = 0.0_kind_real
76 ql_efr = 0.0_kind_real
77 qi_efr = 0.0_kind_real
78 
79 
80 ! Sea mask
81 ! --------
82 allocate(seamask(isc:iec,jsc:jec))
83 seamask = .false.
84 do j = jsc,jec
85  do i = isc,iec
86  seamask(i,j) = min(max(0.0_kind_real,sea_frac(i,j)),1.0_kind_real) >= 0.99_kind_real
87  enddo
88 enddo
89 
90 
91 ! Convert clouds from kg/kg into kg/m^2
92 ! -------------------------------------
93 do k = 1,npz
94  do j = jsc,jec
95  do i = isc,iec
96  if (seamask(i,j)) then
97 
98  kgkg_to_kgm2 = delp(i,j,k) / grav
99  ql_ade(i,j,k) = max(ql(i,j,k),0.0_kind_real) * kgkg_to_kgm2
100  qi_ade(i,j,k) = max(qi(i,j,k),0.0_kind_real) * kgkg_to_kgm2
101 
102  if (t(i,j,k) - tice > -20.0_kind_real) then
103  ql_ade(i,j,k) = max(1.001_kind_real*1.0e-6_kind_real,ql_ade(i,j,k))
104  endif
105 
106  if (t(i,j,k) < tice) then
107  qi_ade(i,j,k) = max(1.001_kind_real*1.0e-6_kind_real,qi_ade(i,j,k))
108  endif
109 
110  endif
111  enddo
112  enddo
113 enddo
114 
115 ! Cloud liquid water effective radius
116 ! -----------------------------------
117 do k = 1,npz
118  do j = jsc,jec
119  do i = isc,iec
120  if (seamask(i,j)) then
121  tem1 = max(0.0_kind_real,(tice-t(i,j,k))*0.05_kind_real)
122  ql_efr(i,j,k) = 5.0_kind_real + 5.0_kind_real * min(1.0_kind_real, tem1)
123  endif
124  enddo
125  enddo
126 enddo
127 
128 
129 ! Cloud ice water effective radius
130 ! ---------------------------------
131 do k = 1,npz
132  do j = jsc,jec
133  do i = isc,iec
134 
135  if (seamask(i,j)) then
136 
137  tem2 = t(i,j,k) - tice
138  tem1 = grav/rdry
139  tem3 = tem1 * qi_ade(i,j,k) * (p(i,j,k)/delp(i,j,k))/t(i,j,k) * (1.0_kind_real + zvir * q(i,j,k))
140 
141  if (tem2 < -50.0_kind_real ) then
142  qi_efr(i,j,k) = (1250._kind_real/9.917_kind_real)*tem3**0.109_kind_real
143  elseif (tem2 < -40.0_kind_real ) then
144  qi_efr(i,j,k) = (1250._kind_real/9.337_kind_real)*tem3**0.08_kind_real
145  elseif (tem2 < -30.0_kind_real ) then
146  qi_efr(i,j,k) = (1250._kind_real/9.208_kind_real)*tem3**0.055_kind_real
147  else
148  qi_efr(i,j,k) = (1250._kind_real/9.387_kind_real)*tem3**0.031_kind_real
149  endif
150 
151  endif
152 
153  enddo
154  enddo
155 enddo
156 
157 
158 ql_efr = max(0.0_kind_real,ql_efr)
159 qi_efr = max(0.0_kind_real,qi_efr)
160 
161 deallocate(seamask)
162 
163 end subroutine crtm_ade_efr
164 
165 !----------------------------------------------------------------------------
166 ! Compute mixing ratio from specific humidity -------------------------------
167 !----------------------------------------------------------------------------
168 
169 subroutine crtm_mixratio(geom,q,qmr)
171 implicit none
172 
173 !Arguments
174 type(fv3jedi_geom) , intent(in ) :: geom
175 real(kind=kind_real), intent(in ) :: q (geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Specific humidity | kg/kg
176 real(kind=kind_real), intent(out) :: qmr(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Mixing ratio | 1
177 
178 !Locals
179 real(kind=kind_real) :: c3(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
180 
181 ! Convert specific humidity
182 ! -------------------------
183 c3 = 1.0_kind_real / (1.0_kind_real - q)
184 qmr = 1000.0_kind_real * q * c3
185 
186 end subroutine crtm_mixratio
187 
188 !----------------------------------------------------------------------------
189 
190 subroutine crtm_mixratio_tl(geom,q,q_tl,qmr_tl)
192 implicit none
193 
194 !Arguments
195 type(fv3jedi_geom) , intent(in ) :: geom
196 real(kind=kind_real), intent(in ) :: q (geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Specific humidity | kg/kg
197 real(kind=kind_real), intent(in ) :: q_tl (geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Specific humidity | kg/kg
198 real(kind=kind_real), intent(out) :: qmr_tl(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Mixing ratio | 1
199 
200 !Locals
201 real(kind=kind_real) :: c3 (geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
202 real(kind=kind_real) :: c3_tl(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
203 
204 ! Convert specific humidity
205 ! -------------------------
206 c3 = 1.0_kind_real / (1.0_kind_real - q)
207 c3_tl = -((-q_tl)/(1.0_kind_real-q)**2)
208 qmr_tl = 1000.0_kind_real*(q_tl*c3+q*c3_tl)
209 
210 end subroutine crtm_mixratio_tl
211 
212 !----------------------------------------------------------------------------
213 
214 subroutine crtm_mixratio_ad(geom,q,q_ad,qmr_ad)
216 implicit none
217 
218 !Arguments
219 type(fv3jedi_geom) , intent(in ) :: geom
220 real(kind=kind_real), intent(in ) :: q (geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Specific humidity | kg/kg
221 real(kind=kind_real), intent(inout) :: q_ad (geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Specific humidity | kg/kg
222 real(kind=kind_real), intent(inout) :: qmr_ad(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz) !Mixing ratio | 1
223 
224 !Locals
225 real(kind=kind_real) :: c3 (geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
226 real(kind=kind_real) :: c3_ad(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
227 
228 ! Convert specific humidity
229 ! -------------------------
230 c3 = 1.0_kind_real/(1.0_kind_real-q)
231 c3_ad = 1000.0_kind_real*q*qmr_ad
232 q_ad = q_ad + c3_ad/(1.0_kind_real-q)**2 + 1000.0_kind_real*c3*qmr_ad
233 qmr_ad = 0.0_8
234 
235 end subroutine crtm_mixratio_ad
236 
237 
238 !----------------------------------------------------------------------------
239 ! Relative to specific humidity ---------------------------------------------
240 !----------------------------------------------------------------------------
241 
242 subroutine rh_to_q(geom,qsat,rh,q)
244  implicit none
245  type(fv3jedi_geom), intent(in) :: geom
246  real(kind=kind_real), intent(in) :: qsat(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
247  real(kind=kind_real), intent(inout) :: q(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
248  real(kind=kind_real), intent(inout) :: rh(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
249 
250  q = rh * qsat
251 
252 end subroutine rh_to_q
253 
254 !----------------------------------------------------------------------------
255 
256 subroutine rh_to_q_tl(geom,qsat,rh,q)
258  implicit none
259  type(fv3jedi_geom), intent(in) :: geom
260  real(kind=kind_real), intent(in) :: qsat(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
261  real(kind=kind_real), intent(inout) :: q(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
262  real(kind=kind_real), intent(inout) :: rh(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
263 
264  q = rh * qsat
265 
266 end subroutine rh_to_q_tl
267 
268 !----------------------------------------------------------------------------
269 
270 subroutine rh_to_q_ad(geom,qsat,rh,q)
272  implicit none
273  type(fv3jedi_geom), intent(in) :: geom
274  real(kind=kind_real), intent(in) :: qsat(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
275  real(kind=kind_real), intent(inout) :: q(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
276  real(kind=kind_real), intent(inout) :: rh(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
277 
278  rh = rh + q * qsat
279 
280 end subroutine rh_to_q_ad
281 
282 
283 !----------------------------------------------------------------------------
284 ! Specific to relative humidity ---------------------------------------------
285 !----------------------------------------------------------------------------
286 
287 subroutine q_to_rh(geom,qsat,q,rh)
289  implicit none
290  type(fv3jedi_geom), intent(in) :: geom
291  real(kind=kind_real), intent(in) :: qsat(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
292  real(kind=kind_real), intent(in) :: q(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
293  real(kind=kind_real), intent(inout) :: rh(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
294 
295  rh = q / qsat
296 
297 end subroutine q_to_rh
298 
299 !----------------------------------------------------------------------------
300 
301 subroutine q_to_rh_tl(geom,qsat,q,rh)
303  implicit none
304  type(fv3jedi_geom), intent(in) :: geom
305  real(kind=kind_real), intent(in) :: qsat(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
306  real(kind=kind_real), intent(in) :: q(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
307  real(kind=kind_real), intent(inout) :: rh(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
308 
309  rh = q / qsat
310 
311 end subroutine q_to_rh_tl
312 
313 !----------------------------------------------------------------------------
314 
315 subroutine q_to_rh_ad(geom,qsat,q,rh)
317  implicit none
318  type(fv3jedi_geom), intent(in) :: geom
319  real(kind=kind_real), intent(in) :: qsat(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
320  real(kind=kind_real), intent(inout) :: q(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
321  real(kind=kind_real), intent(inout) :: rh(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
322 
323  q = rh / qsat
324 
325 end subroutine q_to_rh_ad
326 
327 
328 !----------------------------------------------------------------------------
329 ! Utilities -----------------------------------------------------------------
330 !----------------------------------------------------------------------------
331 
332 subroutine esinit(TABLESIZE,DEGSUBS,TMINTBL,TMAXTBL,ESTBLX)
334  IMPLICIT NONE
335 
336  integer, intent(in) :: tablesize,degsubs
337  real(8), intent(in) :: tmintbl,tmaxtbl
338 
339  !OUTPUT
340  real(8), dimension(TABLESIZE) :: estblx
341 
342  !LOCALS
343  real(8), parameter :: zeroc = 273.16, tmix = -20.0
344 
345  real(8), dimension(TABLESIZE) :: estble, estblw
346 
347  integer :: i
348  real(8) :: t, delta_t
349 
350  delta_t = 1.0/degsubs
351 
352  do i=1,tablesize
353 
354  t = (i-1)*delta_t + tmintbl
355 
356  if(t>zeroc) then
357  call qsatlqu0(estble(i),t,tmaxtbl)
358  else
359  call qsatice0(estble(i),t)
360  end if
361 
362  call qsatlqu0(estblw(i),t,tmaxtbl)
363 
364  t = t-zeroc
365  if(t>=tmix .and. t<0.0) then
366  estblx(i) = ( t/tmix )*( estble(i) - estblw(i) ) + estblw(i)
367  else
368  estblx(i) = estble(i)
369  end if
370 
371  end do
372 
373  end subroutine esinit
374 
375 !----------------------------------------------------------------------------
376 
377 subroutine qsatlqu0(QS,TL,TMAXTBL)
378 !SUPERSATURATED AS LIQUID
379 
380  IMPLICIT NONE
381 
382  !INPUTS
383  real(8) :: TL, TMAXTBL
384 
385  !OUTPUTS
386  real(8) :: QS
387 
388  !LOCALS
389  real(8), parameter :: ZEROC = 273.16
390  real(8), parameter :: TMINLQU = zeroc - 40.0
391 
392  real(8), parameter :: B6 = 6.136820929e-11*100.0
393  real(8), parameter :: B5 = 2.034080948e-8 *100.0
394  real(8), parameter :: B4 = 3.031240396e-6 *100.0
395  real(8), parameter :: B3 = 2.650648471e-4 *100.0
396  real(8), parameter :: B2 = 1.428945805e-2 *100.0
397  real(8), parameter :: B1 = 4.436518521e-1 *100.0
398  real(8), parameter :: B0 = 6.107799961e+0 *100.0
399 
400  real(8) :: TX, EX, TI, TT
401 
402  tx = tl
403 
404  if (tx<tminlqu) then
405  ti = tminlqu
406  elseif(tx>tmaxtbl) then
407  ti = tmaxtbl
408  else
409  ti = tx
410  end if
411 
412  tt = ti-zeroc !Starr polynomial fit
413  ex = (tt*(tt*(tt*(tt*(tt*(tt*b6+b5)+b4)+b3)+b2)+b1)+b0)
414 
415  tl = tx
416  qs = ex
417 
418  return
419 
420 end subroutine qsatlqu0
421 
422 !----------------------------------------------------------------------------
423 
424 subroutine qsatice0(QS,TL)
425 !SUPERSATURATED AS ICE
426 
427  IMPLICIT NONE
428 
429  !INPUTS
430  real(8) :: TL
431 
432  !OUTPUTS
433  real(8) :: QS
434 
435  !LOCALS
436  real(8), parameter :: ZEROC = 273.16, tminstr = -95.0
437  real(8), parameter :: TMINICE = zeroc + tminstr
438 
439  real(8), parameter :: TSTARR1 = -75.0, tstarr2 = -65.0, tstarr3 = -50.0, tstarr4 = -40.0
440 
441  real(8), parameter :: BI6= 1.838826904e-10*100.0
442  real(8), parameter :: BI5= 4.838803174e-8 *100.0
443  real(8), parameter :: BI4= 5.824720280e-6 *100.0
444  real(8), parameter :: BI3= 4.176223716e-4 *100.0
445  real(8), parameter :: BI2= 1.886013408e-2 *100.0
446  real(8), parameter :: BI1= 5.034698970e-1 *100.0
447  real(8), parameter :: BI0= 6.109177956e+0 *100.0
448  real(8), parameter :: S16= 0.516000335e-11*100.0
449  real(8), parameter :: S15= 0.276961083e-8 *100.0
450  real(8), parameter :: S14= 0.623439266e-6 *100.0
451  real(8), parameter :: S13= 0.754129933e-4 *100.0
452  real(8), parameter :: S12= 0.517609116e-2 *100.0
453  real(8), parameter :: S11= 0.191372282e+0 *100.0
454  real(8), parameter :: S10= 0.298152339e+1 *100.0
455  real(8), parameter :: S26= 0.314296723e-10*100.0
456  real(8), parameter :: S25= 0.132243858e-7 *100.0
457  real(8), parameter :: S24= 0.236279781e-5 *100.0
458  real(8), parameter :: S23= 0.230325039e-3 *100.0
459  real(8), parameter :: S22= 0.129690326e-1 *100.0
460  real(8), parameter :: S21= 0.401390832e+0 *100.0
461  real(8), parameter :: S20= 0.535098336e+1 *100.0
462 
463  real(8) :: TX, TI, TT, W, EX
464 
465  tx = tl
466 
467  if (tx<tminice) then
468  ti = tminice
469  elseif(tx>zeroc ) then
470  ti = zeroc
471  else
472  ti = tx
473  end if
474 
475  tt = ti - zeroc
476  if (tt < tstarr1 ) then
477  ex = (tt*(tt*(tt*(tt*(tt*(tt*s16+s15)+s14)+s13)+s12)+s11)+s10)
478  elseif(tt >= tstarr1 .and. tt < tstarr2) then
479  w = (tstarr2 - tt)/(tstarr2-tstarr1)
480  ex = w *(tt*(tt*(tt*(tt*(tt*(tt*s16+s15)+s14)+s13)+s12)+s11)+s10) &
481  + (1.-w)*(tt*(tt*(tt*(tt*(tt*(tt*s26+s25)+s24)+s23)+s22)+s21)+s20)
482  elseif(tt >= tstarr2 .and. tt < tstarr3) then
483  ex = (tt*(tt*(tt*(tt*(tt*(tt*s26+s25)+s24)+s23)+s22)+s21)+s20)
484  elseif(tt >= tstarr3 .and. tt < tstarr4) then
485  w = (tstarr4 - tt)/(tstarr4-tstarr3)
486  ex = w *(tt*(tt*(tt*(tt*(tt*(tt*s26+s25)+s24)+s23)+s22)+s21)+s20) &
487  + (1.-w)*(tt*(tt*(tt*(tt*(tt*(tt*bi6+bi5)+bi4)+bi3)+bi2)+bi1)+bi0)
488  else
489  ex = (tt*(tt*(tt*(tt*(tt*(tt*bi6+bi5)+bi4)+bi3)+bi2)+bi1)+bi0)
490  endif
491 
492  qs = ex
493 
494  return
495 
496 end subroutine qsatice0
497 
498 !----------------------------------------------------------------------------
499 
500 subroutine dqsat(geom,temp,pmid,degsubs,tmintbl,tmaxtbl,tablesize,estblx,dqsi,qssi)
502 !computes saturation vapour pressure qssi and gradient w.r.t temperature dqsi.
503 !inputs are temperature and plo (pressure at t-levels)
504 !vales are computed from look-up talbe (piecewise linear)
505 
506  use fv3jedi_constants_mod, only: h2omw, airmw
507 
508  implicit none
509 
510  !inputs
511  type(fv3jedi_geom), intent(in) :: geom
512  integer, intent(in) :: degsubs
513  real(8), intent(in) :: tmintbl, tmaxtbl
514  integer, intent(in) :: tablesize
515  real(kind=kind_real), intent(in) :: temp(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
516  real(kind=kind_real), intent(in) :: pmid(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
517  real(8), intent(in) :: estblx(tablesize)
518 
519  !outputs
520  real(kind=kind_real), intent(inout) :: dqsi(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
521  real(kind=kind_real), intent(inout) :: qssi(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
522 
523  !locals
524  real(8), parameter :: max_mixing_ratio = 1.0_8
525  real(8) :: esfac
526 
527  integer :: i, j, k
528  real(8) :: tt, ti, dqq, qq, dd
529  integer :: it
530  real(8) :: temp8, pmid8, qssi8, dqsi8
531 
532  dqsi = 0.0_kind_real
533  qssi = 0.0_kind_real
534 
535  esfac = real(h2omw,8)/real(airmw,8)
536 
537  do k=1,geom%npz
538  do j=geom%jsc,geom%jec
539  do i=geom%isc,geom%iec
540 
541  temp8 = real(temp(i,j,k),8)
542  pmid8 = real(pmid(i,j,k),8)
543 
544  if (temp8<=tmintbl) then
545  ti = tmintbl
546  elseif(temp8>=tmaxtbl-.001_8) then
547  ti = tmaxtbl-.001_8
548  else
549  ti = temp8
550  end if
551 
552  tt = (ti - tmintbl)*real(degsubs,8)+1.0_8
553  it = int(tt)
554 
555  dqq = estblx(it+1) - estblx(it)
556  qq = (tt-real(it,8))*dqq + estblx(it)
557 
558  if (pmid8 <= qq) then
559  qssi8 = max_mixing_ratio
560  dqsi8 = 0.0
561  else
562  dd = 1.0/(pmid8 - (1.0-esfac)*qq)
563  qssi8 = esfac*qq*dd
564  dqsi8 = (esfac*degsubs)*dqq*pmid8*(dd*dd)
565  end if
566 
567  dqsi(i,j,k) = real(dqsi8,kind_real)
568  qssi(i,j,k) = real(qssi8,kind_real)
569 
570  end do
571  end do
572  end do
573 
574 end subroutine dqsat
575 
576 !----------------------------------------------------------------------------
577 
578 end module moisture_vt_mod
real(kind=kind_real), parameter, public tice
subroutine, public q_to_rh(geom, qsat, q, rh)
real(kind=kind_real), parameter, public airmw
subroutine qsatice0(QS, TL)
real(kind=kind_real), parameter, public rdry
real(kind=kind_real), parameter, public grav
subroutine, public crtm_mixratio(geom, q, qmr)
real(kind=kind_real), parameter, public h2omw
Fortran derived type to hold geometry data for the FV3JEDI model.
Variable transforms on moisture variables for fv3-jedi Daniel Holdaway, NASA/JCSDA.
subroutine, public crtm_ade_efr(geom, p, T, delp, sea_frac, q, ql, qi, ql_ade, qi_ade, ql_efr, qi_efr)
Compute cloud area density and effective radius for the crtm -----------—
subroutine, public crtm_mixratio_ad(geom, q, q_ad, qmr_ad)
subroutine, public rh_to_q_tl(geom, qsat, rh, q)
subroutine qsatlqu0(QS, TL, TMAXTBL)
subroutine, public rh_to_q_ad(geom, qsat, rh, q)
subroutine, public dqsat(geom, temp, pmid, degsubs, tmintbl, tmaxtbl, tablesize, estblx, dqsi, qssi)
Fortran module handling geometry for the FV3 model.
real(kind=kind_real), parameter, public zvir
#define max(a, b)
Definition: mosaic_util.h:33
subroutine, public q_to_rh_ad(geom, qsat, q, rh)
subroutine, public crtm_mixratio_tl(geom, q, q_tl, qmr_tl)
subroutine, public esinit(TABLESIZE, DEGSUBS, TMINTBL, TMAXTBL, ESTBLX)
integer, parameter, public kind_real
#define min(a, b)
Definition: mosaic_util.h:32
subroutine, public rh_to_q(geom, qsat, rh, q)
subroutine, public q_to_rh_tl(geom, qsat, q, rh)