37 subroutine crtm_ade_efr( geom,p,T,delp,sea_frac,q,ql,qi,ql_ade,qi_ade,ql_efr,qi_efr)
43 real(kind=kind_real),
intent(in) :: p(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
44 real(kind=kind_real),
intent(in) :: t(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
45 real(kind=kind_real),
intent(in) :: delp(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
46 real(kind=kind_real),
intent(in) :: sea_frac(geom%isc:geom%iec,geom%jsc:geom%jec)
47 real(kind=kind_real),
intent(in) :: q(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
48 real(kind=kind_real),
intent(in) :: ql(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
49 real(kind=kind_real),
intent(in) :: qi(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
51 real(kind=kind_real),
intent(out) :: ql_ade(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
52 real(kind=kind_real),
intent(out) :: qi_ade(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
53 real(kind=kind_real),
intent(out) :: ql_efr(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
54 real(kind=kind_real),
intent(out) :: qi_efr(geom%isc:geom%iec,geom%jsc:geom%jec,1:geom%npz)
57 integer :: isc,iec,jsc,jec,npz
59 logical,
allocatable :: seamask(:,:)
60 real(kind=kind_real) :: tem1, tem2, tem3, kgkg_to_kgm2
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
82 allocate(seamask(isc:iec,jsc:jec))
86 seamask(i,j) =
min(
max(0.0_kind_real,sea_frac(i,j)),1.0_kind_real) >= 0.99_kind_real
96 if (seamask(i,j))
then 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
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))
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))
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)
135 if (seamask(i,j))
then 137 tem2 = t(i,j,k) -
tice 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))
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
148 qi_efr(i,j,k) = (1250._kind_real/9.387_kind_real)*tem3**0.031_kind_real
158 ql_efr =
max(0.0_kind_real,ql_efr)
159 qi_efr =
max(0.0_kind_real,qi_efr)
175 real(kind=kind_real),
intent(in ) :: q (geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
176 real(kind=kind_real),
intent(out) :: qmr(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
179 real(kind=kind_real) :: c3(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
183 c3 = 1.0_kind_real / (1.0_kind_real - q)
184 qmr = 1000.0_kind_real * q * c3
196 real(kind=kind_real),
intent(in ) :: q (geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
197 real(kind=kind_real),
intent(in ) :: q_tl (geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
198 real(kind=kind_real),
intent(out) :: qmr_tl(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
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)
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)
220 real(kind=kind_real),
intent(in ) :: q (geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
221 real(kind=kind_real),
intent(inout) :: q_ad (geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
222 real(kind=kind_real),
intent(inout) :: qmr_ad(geom%isc:geom%iec,geom%jsc:geom%jec, 1:geom%npz)
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)
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
242 subroutine rh_to_q(geom,qsat,rh,q)
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)
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)
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)
287 subroutine q_to_rh(geom,qsat,q,rh)
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)
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)
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)
332 subroutine esinit(TABLESIZE,DEGSUBS,TMINTBL,TMAXTBL,ESTBLX)
336 integer,
intent(in) :: tablesize,degsubs
337 real(8),
intent(in) :: tmintbl,tmaxtbl
340 real(8),
dimension(TABLESIZE) :: estblx
343 real(8),
parameter :: zeroc = 273.16, tmix = -20.0
345 real(8),
dimension(TABLESIZE) :: estble, estblw
348 real(8) :: t, delta_t
350 delta_t = 1.0/degsubs
354 t = (i-1)*delta_t + tmintbl
365 if(t>=tmix .and. t<0.0)
then 366 estblx(i) = ( t/tmix )*( estble(i) - estblw(i) ) + estblw(i)
368 estblx(i) = estble(i)
383 real(8) :: TL, TMAXTBL
389 real(8),
parameter :: ZEROC = 273.16
390 real(8),
parameter :: TMINLQU = zeroc - 40.0
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
400 real(8) :: TX, EX, TI, TT
406 elseif(tx>tmaxtbl)
then 413 ex = (tt*(tt*(tt*(tt*(tt*(tt*b6+b5)+b4)+b3)+b2)+b1)+b0)
436 real(8),
parameter :: ZEROC = 273.16, tminstr = -95.0
437 real(8),
parameter :: TMINICE = zeroc + tminstr
439 real(8),
parameter :: TSTARR1 = -75.0, tstarr2 = -65.0, tstarr3 = -50.0, tstarr4 = -40.0
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
463 real(8) :: TX, TI, TT, W, EX
469 elseif(tx>zeroc )
then 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)
489 ex = (tt*(tt*(tt*(tt*(tt*(tt*bi6+bi5)+bi4)+bi3)+bi2)+bi1)+bi0)
500 subroutine dqsat(geom,temp,pmid,degsubs,tmintbl,tmaxtbl,tablesize,estblx,dqsi,qssi)
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)
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)
524 real(8),
parameter :: max_mixing_ratio = 1.0_8
528 real(8) :: tt, ti, dqq, qq, dd
530 real(8) :: temp8, pmid8, qssi8, dqsi8
538 do j=geom%jsc,geom%jec
539 do i=geom%isc,geom%iec
541 temp8 =
real(temp(i,j,k),8)
542 pmid8 =
real(pmid(i,j,k),8)
544 if (temp8<=tmintbl)
then 546 elseif(temp8>=tmaxtbl-.001_8)
then 552 tt = (ti - tmintbl)*
real(degsubs,8)+1.0_8
555 dqq = estblx(it+1) - estblx(it)
556 qq = (tt-
real(it,8))*dqq + estblx(it)
558 if (pmid8 <= qq)
then 559 qssi8 = max_mixing_ratio
562 dd = 1.0/(pmid8 - (1.0-esfac)*qq)
564 dqsi8 = (esfac*degsubs)*dqq*pmid8*(dd*dd)
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
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
subroutine, public rh_to_q(geom, qsat, rh, q)
subroutine, public q_to_rh_tl(geom, qsat, q, rh)