Skip to content

Update to MYNN-EDMF to add re-indexed arrays and temperature tendency change #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MPAS-v8.2.2-2.8
MPAS-v8.2.2-2.9

The Model for Prediction Across Scales (MPAS) is a collaborative project for
developing atmosphere, ocean, and other earth-system simulation components for
Expand Down
12 changes: 11 additions & 1 deletion src/core_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>

<registry model="mpas" core="atmosphere" core_abbrev="atm" version="8.2.2-2.8">
<registry model="mpas" core="atmosphere" core_abbrev="atm" version="8.2.2-2.9">

<!-- **************************************************************************************** -->
<!-- ************************************** Dimensions ************************************** -->
Expand Down Expand Up @@ -1137,6 +1137,8 @@
<var name="maxmf"/>
<var name="maxwidth"/>
<var name="ztop_plume"/>
<var name="excess_h"/>
<var name="excess_q"/>
<var name="hpbl"/>
<var name="cldfrac_cu"/>
<var name="refl10cm_cu"/>
Expand Down Expand Up @@ -3046,6 +3048,14 @@
description="Height of highest penetrating plume"
packages="bl_mynnedmf_in"/>

<var name="excess_h" type="real" dimensions="nCells Time" units="K"
description="Maximum excess heat added to plumes"
packages="bl_mynnedmf_in"/>

<var name="excess_q" type="real" dimensions="nCells Time" units="kg kg^{-1}"
description="Maximum excess moisture added to plumes"
packages="bl_mynnedmf_in"/>

<!-- MYJ PBL SCHEME: -->
<var name="chlowq" type="real" dimensions="nCells Time" units=""
description=""
Expand Down
23 changes: 17 additions & 6 deletions src/core_atmosphere/physics/mpas_atmphys_driver_pbl.F
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ subroutine allocate_pbl(configs)
if(.not.allocated(maxwidthbl_p) ) allocate(maxwidthbl_p(ims:ime,jms:jme) )
if(.not.allocated(maxmfbl_p) ) allocate(maxmfbl_p(ims:ime,jms:jme) )
if(.not.allocated(zbl_plume_p) ) allocate(zbl_plume_p(ims:ime,jms:jme) )

if(.not.allocated(excessh_p) ) allocate(excessh_p(ims:ime,jms:jme) )
if(.not.allocated(excessq_p) ) allocate(excessq_p(ims:ime,jms:jme) )

if(.not.allocated(cov_p) ) allocate(cov_p(ims:ime,kms:kme,jms:jme) )
if(.not.allocated(qke_p) ) allocate(qke_p(ims:ime,kms:kme,jms:jme) )
if(.not.allocated(qsq_p) ) allocate(qsq_p(ims:ime,kms:kme,jms:jme) )
Expand Down Expand Up @@ -371,7 +373,9 @@ subroutine deallocate_pbl(configs)
if(allocated(maxwidthbl_p) ) deallocate(maxwidthbl_p )
if(allocated(maxmfbl_p) ) deallocate(maxmfbl_p )
if(allocated(zbl_plume_p) ) deallocate(zbl_plume_p )

if(allocated(excessh_p) ) deallocate(excessh_p )
if(allocated(excessq_p) ) deallocate(excessq_p )

if(allocated(cov_p) ) deallocate(cov_p )
if(allocated(qke_p) ) deallocate(qke_p )
if(allocated(qsq_p) ) deallocate(qsq_p )
Expand Down Expand Up @@ -723,6 +727,8 @@ subroutine pbl_from_MPAS(configs,mesh,sfc_input,diag_physics,tend_physics,its,it
maxwidthbl_p(i,j) = 0._RKIND
maxmfbl_p(i,j) = 0._RKIND
zbl_plume_p(i,j) = 0._RKIND
excessh_p(i,j) = 0._RKIND
excessq_p(i,j) = 0._RKIND
enddo
enddo

Expand Down Expand Up @@ -826,7 +832,7 @@ subroutine pbl_to_MPAS(configs,diag_physics,tend_physics,its,ite)
real(kind=RKIND),dimension(:),pointer :: delta,wstar

!local pointers for MYNN scheme:
real(kind=RKIND),dimension(:),pointer :: maxmf,maxwidth,ztop_plume
real(kind=RKIND),dimension(:),pointer :: maxmf,maxwidth,ztop_plume,excess_h,excess_q
real(kind=RKIND),dimension(:,:),pointer:: cov,qke,qsq,tsq,sh3d,sm3d,tke_pbl,qke_adv,el_pbl,dqke,qbuoy, &
qdiss,qshear,qwt
real(kind=RKIND),dimension(:,:),pointer:: cldfrac_bl,qc_bl,qi_bl
Expand Down Expand Up @@ -992,6 +998,8 @@ subroutine pbl_to_MPAS(configs,diag_physics,tend_physics,its,ite)
call mpas_pool_get_array(diag_physics,'maxmf' ,maxmf )
call mpas_pool_get_array(diag_physics,'maxwidth' ,maxwidth )
call mpas_pool_get_array(diag_physics,'ztop_plume',ztop_plume)
call mpas_pool_get_array(diag_physics,'excess_h' ,excess_h )
call mpas_pool_get_array(diag_physics,'excess_q' ,excess_q )
call mpas_pool_get_array(diag_physics,'el_pbl' ,el_pbl )
call mpas_pool_get_array(diag_physics,'cov' ,cov )
call mpas_pool_get_array(diag_physics,'qke' ,qke )
Expand Down Expand Up @@ -1026,6 +1034,8 @@ subroutine pbl_to_MPAS(configs,diag_physics,tend_physics,its,ite)
maxmf(i) = maxmfbl_p(i,j)
maxwidth(i) = maxwidthbl_p(i,j)
ztop_plume(i) = zbl_plume_p(i,j)
excess_h(i) = excessh_p(i,j)
excess_q(i) = excessq_p(i,j)
enddo
enddo

Expand Down Expand Up @@ -1449,8 +1459,9 @@ subroutine driver_pbl(itimestep,configs,mesh,sfc_input,diag_physics,tend_physics
nc = nc_p , nifa = nifa_p , nwfa = nwfa_p , &
rthraten = rthraten_p , pblh = hpbl_p , kpbl = kpbl_p , &
cldfra_bl = cldfrabl_p , qc_bl = qcbl_p , qi_bl = qibl_p , &
maxwidth = maxwidthbl_p , maxmf = maxmfbl_p , &
ztop_plume = zbl_plume_p , dqke = dqke_p , qke_adv = qkeadv_p , &
maxwidth = maxwidthbl_p , maxmf = maxmfbl_p , ztop_plume = zbl_plume_p , &
excess_h = excessh_p , excess_q = excessq_p , &
qke = qke_p , qke_adv = qkeadv_p , &
tsq = tsq_p , qsq = qsq_p , cov = cov_p , &
el_pbl = elpbl_p , rublten = rublten_p , rvblten = rvblten_p , &
rthblten = rthblten_p , rqvblten = rqvblten_p , rqcblten = rqcblten_p , &
Expand All @@ -1460,7 +1471,7 @@ subroutine driver_pbl(itimestep,configs,mesh,sfc_input,diag_physics,tend_physics
edmf_thl = edmfthl_p , edmf_ent = edmfent_p , edmf_qc = edmfqc_p , &
sub_thl = subthl_p , sub_sqv = subqv_p , det_thl = detthl_p , &
det_sqv = detqv_p , exch_h = kzh_p , exch_m = kzm_p , &
qke = qke_p , qwt = qwt_p , qshear = qshear_p , &
dqke = dqke_p , qwt = qwt_p , qshear = qshear_p , &
qbuoy = qbuoy_p , qdiss = qdiss_p , sh3d = sh3d_p , &
sm3d = sm3d_p , spp_pbl = spp_pbl , pattern_spp = pattern_spp_pbl , &
do_restart = config_do_restart , &
Expand Down
6 changes: 4 additions & 2 deletions src/core_atmosphere/physics/mpas_atmphys_vars.F
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,10 @@ module mpas_atmphys_vars
real(kind=RKIND),dimension(:,:),allocatable:: &
maxwidthbl_p, &!max plume width [m]
maxmfbl_p, &!maximum mass flux for PBL shallow convection.
zbl_plume_p !height of highest penetrating plume [m]

zbl_plume_p, &!height of highest penetrating plume [m]
excessh_p, &!maximum heat excess applied to plumes [K]
excessq_p !maximum moisture excess applied to plumes [kg/kg]

real(kind=RKIND),dimension(:,:,:),allocatable:: &
dqke_p, &!
qbuoy_p, &!
Expand Down
2 changes: 1 addition & 1 deletion src/core_init_atmosphere/Registry.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<registry model="mpas" core="init_atmosphere" core_abbrev="init_atm" version="8.2.2-2.8">
<registry model="mpas" core="init_atmosphere" core_abbrev="init_atm" version="8.2.2-2.9">

<!-- **************************************************************************************** -->
<!-- ************************************** Dimensions ************************************** -->
Expand Down