Skip to content

Commit 5066866

Browse files
committed
This commit add changes to the water loading term in the hydrostatic
equations used in the main physics interface to allow the use of mp_kessler microphysics - Kessler has 3 water species - qv, qc and qr, while other microphysics have 6 species qv, qc, qr, qi, qs and qg.
1 parent bc68e41 commit 5066866

1 file changed

Lines changed: 57 additions & 0 deletions

File tree

src/core_atmosphere/physics/mpas_atmphys_interface.F

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,13 @@ subroutine MPAS_to_physics(configs,mesh,state,time_lev,diag,diag_physics,its,ite
323323

324324
call mpas_pool_get_array(diag_physics,'plrad',plrad)
325325

326+
if( trim(microp_scheme) .ne. "mp_kessler") then
327+
326328
do j = jts, jte
327329
do k = kts, kte
328330
do i = its, ite
329331

332+
call mpas_log_write(" mp_wsm6 or thompson in physics interface ")
330333
!water vapor and moist arrays:
331334
qv_p(i,k,j) = max(0.,qv(k,i))
332335
qc_p(i,k,j) = max(0.,qc(k,i))
@@ -335,6 +338,36 @@ subroutine MPAS_to_physics(configs,mesh,state,time_lev,diag,diag_physics,its,ite
335338
qs_p(i,k,j) = max(0.,qs(k,i))
336339
qg_p(i,k,j) = max(0.,qg(k,i))
337340

341+
enddo
342+
enddo
343+
enddo
344+
345+
else
346+
347+
call mpas_log_write(" mp_kessler in physics interface ")
348+
349+
do j = jts, jte
350+
do k = kts, kte
351+
do i = its, ite
352+
353+
!water vapor and moist arrays:
354+
qv_p(i,k,j) = max(0.,qv(k,i))
355+
qc_p(i,k,j) = max(0.,qc(k,i))
356+
qr_p(i,k,j) = max(0.,qr(k,i))
357+
qi_p(i,k,j) = 0.0
358+
qs_p(i,k,j) = 0.0
359+
qg_p(i,k,j) = 0.0
360+
361+
enddo
362+
enddo
363+
enddo
364+
365+
end if
366+
367+
do j = jts, jte
368+
do k = kts, kte
369+
do i = its, ite
370+
338371
!arrays located at theta points:
339372
u_p(i,k,j) = u(k,i)
340373
v_p(i,k,j) = v(k,i)
@@ -948,6 +981,28 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te
948981
endif
949982

950983
!update surface pressure and calculates the surface pressure tendency:
984+
985+
if( trim(mp_scheme) .eq. "mp_kessler") then
986+
987+
do j = jts,jte
988+
do i = its,ite
989+
dz1 = zgrid(2,i)-zgrid(1,i)
990+
dz2 = zgrid(3,i)-zgrid(2,i)
991+
! rho1 = rho_zz(1,i) * zz(1,i) * (1. + qv_p(i,1,j))
992+
! rho2 = rho_zz(2,i) * zz(2,i) * (1. + qv_p(i,2,j))
993+
! Added full wtare loading term, WCS 20260427
994+
rho1 = rho_zz(1,i) * zz(1,i) * (1. + qv_p(i,1,j)+qc_p(i,1,j)+qr_p(i,1,j))
995+
rho2 = rho_zz(2,i) * zz(2,i) * (1. + qv_p(i,2,j)+qc_p(i,2,j)+qr_p(i,2,j))
996+
tend_sfc_pressure(i) = surface_pressure(i)
997+
surface_pressure(i) = pressure_p(1,i) + pressure_b(1,i) &
998+
+ 0.5*gravity*(zgrid(2,i)-zgrid(1,i)) &
999+
* (rho1 - 0.5*(rho2-rho1)*dz1/(dz1+dz2))
1000+
tend_sfc_pressure(i) = (surface_pressure(i)-tend_sfc_pressure(i)) / dt_dyn
1001+
enddo
1002+
enddo
1003+
1004+
else
1005+
9511006
do j = jts,jte
9521007
do i = its,ite
9531008
dz1 = zgrid(2,i)-zgrid(1,i)
@@ -965,6 +1020,8 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te
9651020
enddo
9661021
enddo
9671022

1023+
end if
1024+
9681025
!update cloud water species and aerosols as functions of cloud microphysics schemes:
9691026
mp_select: select case(trim(mp_scheme))
9701027
case("mp_thompson","mp_thompson_aerosols","mp_wsm6")

0 commit comments

Comments
 (0)