From 34921a8580dbbc79cfcedfdb7093f441324852f1 Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Fri, 9 Jan 2026 00:34:37 +0000 Subject: [PATCH 01/15] initial connection to TEMPO microphysics --- src/core_atmosphere/Externals.cfg | 7 +++++++ src/core_atmosphere/physics/Makefile | 6 +++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/core_atmosphere/Externals.cfg b/src/core_atmosphere/Externals.cfg index 84dc47d1d8..1dd261ca47 100644 --- a/src/core_atmosphere/Externals.cfg +++ b/src/core_atmosphere/Externals.cfg @@ -12,5 +12,12 @@ repo_url = https://github.com/NOAA-GSL/UGWP.git tag = MPAS_20241223 required = True +[GSL_MP] +local_path = ./physics_noaa/TEMPO +protocol = git +repo_url = https://github.com/AndersJensen-NOAA/TEMPO.git +tag = v3.0.0_b +required = True + [externals_description] schema_version = 1.0.0 diff --git a/src/core_atmosphere/physics/Makefile b/src/core_atmosphere/physics/Makefile index 75eec25931..18352d7603 100644 --- a/src/core_atmosphere/physics/Makefile +++ b/src/core_atmosphere/physics/Makefile @@ -6,7 +6,7 @@ endif all: ./../tools/manage_externals/checkout_externals --externals ./../Externals.cfg - $(MAKE) lookup_tables core_physics_init core_physics_mmm core_UGWP core_physics_wrf core_physics_noahmp core_physics + $(MAKE) lookup_tables core_physics_init core_physics_mmm core_UGWP core_physics_wrf core_physics_noahmp core_physics core_TEMPO dummy: echo "****** compiling physics ******" @@ -63,6 +63,9 @@ core_physics_mmm: core_physics_init core_UGWP: core_physics_init (cd physics_noaa/UGWP; $(MAKE) all) +core_TEMPO: core_physics_init + (cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas) + core_physics_wrf: core_physics_init core_physics_mmm core_UGWP (cd physics_wrf; $(MAKE) all COREDEF="$(COREDEF)") @@ -254,6 +257,7 @@ clean: ( cd physics_noahmp/src; $(MAKE) clean ) ( cd physics_noahmp/utility; $(MAKE) clean ) ( if [ -d physics_noaa/UGWP ]; then cd physics_noaa/UGWP; $(MAKE) clean; fi ) + ( if [ -d physics_noaa/TEMPO ]; then cd physics_noaa/TEMPO; $(MAKE) -f Makefile.mpas clean; fi ) @# Certain systems with intel compilers generate *.i files @# This removes them during the clean process $(RM) *.i From 894e86abe340829b06a0c4625db5a7e3a355cd23 Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Fri, 9 Jan 2026 00:52:57 +0000 Subject: [PATCH 02/15] update tempo tag in externals --- src/core_atmosphere/Externals.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/Externals.cfg b/src/core_atmosphere/Externals.cfg index 1dd261ca47..748da8e229 100644 --- a/src/core_atmosphere/Externals.cfg +++ b/src/core_atmosphere/Externals.cfg @@ -16,7 +16,7 @@ required = True local_path = ./physics_noaa/TEMPO protocol = git repo_url = https://github.com/AndersJensen-NOAA/TEMPO.git -tag = v3.0.0_b +tag = v3.0.0_c required = True [externals_description] From 97f8af743f770003dfd24e8533ce3473344ed1be Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Fri, 16 Jan 2026 14:25:00 +0000 Subject: [PATCH 03/15] - updates TEMPO tag - adds TEMPO registry - adds include flags and module use statements to connect tempo to microphysics driver --- src/core_atmosphere/Externals.cfg | 4 ++-- src/core_atmosphere/physics/Makefile | 6 +++--- src/core_atmosphere/physics/Registry_tempo.xml | 17 +++++++++++++++++ .../physics/mpas_atmphys_driver_microphysics.F | 3 +++ 4 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 src/core_atmosphere/physics/Registry_tempo.xml diff --git a/src/core_atmosphere/Externals.cfg b/src/core_atmosphere/Externals.cfg index 748da8e229..b3f1f3db26 100644 --- a/src/core_atmosphere/Externals.cfg +++ b/src/core_atmosphere/Externals.cfg @@ -12,11 +12,11 @@ repo_url = https://github.com/NOAA-GSL/UGWP.git tag = MPAS_20241223 required = True -[GSL_MP] +[TEMPO_MP] local_path = ./physics_noaa/TEMPO protocol = git repo_url = https://github.com/AndersJensen-NOAA/TEMPO.git -tag = v3.0.0_c +tag = v3.0.0_g required = True [externals_description] diff --git a/src/core_atmosphere/physics/Makefile b/src/core_atmosphere/physics/Makefile index 18352d7603..f5ec4c3175 100644 --- a/src/core_atmosphere/physics/Makefile +++ b/src/core_atmosphere/physics/Makefile @@ -6,7 +6,7 @@ endif all: ./../tools/manage_externals/checkout_externals --externals ./../Externals.cfg - $(MAKE) lookup_tables core_physics_init core_physics_mmm core_UGWP core_physics_wrf core_physics_noahmp core_physics core_TEMPO + $(MAKE) lookup_tables core_physics_init core_physics_mmm core_UGWP core_TEMPO core_physics_wrf core_physics_noahmp core_physics dummy: echo "****** compiling physics ******" @@ -266,7 +266,7 @@ clean: $(RM) $@ $*.mod ifeq "$(GEN_F90)" "true" $(CPP) $(CPPFLAGS) $(COREDEF) $(HYDROSTATIC) $(CPPINCLUDES) $< > $*.f90 - $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I./physics_mmm -I./physics_wrf -I./physics_noahmp -I./physics_noahmp/utility -I./physics_noahmp/drivers/mpas -I./physics_noahmp/src -I.. -I../../framework -I../../external/esmf_time_f90 + $(FC) $(FFLAGS) -c $*.f90 $(FCINCLUDES) -I./physics_mmm -I./physics_wrf -I./physics_noaa/TEMPO -I./physics_noahmp -I./physics_noahmp/utility -I./physics_noahmp/drivers/mpas -I./physics_noahmp/src -I.. -I../../framework -I../../external/esmf_time_f90 else - $(FC) $(CPPFLAGS) $(COREDEF) $(HYDROSATIC) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./physics_mmm -I./physics_wrf -I./physics_noahmp -I./physics_noahmp/utility -I./physics_noahmp/drivers/mpas -I./physics_noahmp/src -I./physics_noaa/UGWP -I.. -I../../framework -I../../external/esmf_time_f90 + $(FC) $(CPPFLAGS) $(COREDEF) $(HYDROSATIC) $(FFLAGS) -c $*.F $(CPPINCLUDES) $(FCINCLUDES) -I./physics_mmm -I./physics_wrf -I./physics_noaa/TEMPO -I./physics_noahmp -I./physics_noahmp/utility -I./physics_noahmp/drivers/mpas -I./physics_noahmp/src -I./physics_noaa/UGWP -I.. -I../../framework -I../../external/esmf_time_f90 endif diff --git a/src/core_atmosphere/physics/Registry_tempo.xml b/src/core_atmosphere/physics/Registry_tempo.xml new file mode 100644 index 0000000000..604c3a57b6 --- /dev/null +++ b/src/core_atmosphere/physics/Registry_tempo.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + diff --git a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F index bbc78b8ed2..c16c44b2ce 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F +++ b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F @@ -22,6 +22,9 @@ module mpas_atmphys_driver_microphysics use module_mp_wsm6,only: wsm6 use mp_wsm6,only: mp_wsm6_init,refl10cm_wsm6 + use module_mp_tempo_cfgs,only: ty_tempo_cfgs + use module_mp_tempo_driver,only: tempo_init, tempo_driver, & + ty_tempo_driver_diags, tempo_aerosol_surface_emissions implicit none private From 3835c657fd43917b77a7e51f2fcc9e93815c42a2 Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Tue, 20 Jan 2026 23:35:28 +0000 Subject: [PATCH 04/15] - adds tempo microphysics to list of available microphysics options - adds substepping to tempo microphysics when dt > 90s - adds tempo and aerosolaware options to interface --- src/core_atmosphere/Externals.cfg | 2 +- .../physics/mpas_atmphys_control.F | 1 + .../mpas_atmphys_driver_microphysics.F | 2 +- .../physics/mpas_atmphys_interface.F | 217 +++++++++++++++++- .../physics/mpas_atmphys_manager.F | 4 +- 5 files changed, 219 insertions(+), 7 deletions(-) diff --git a/src/core_atmosphere/Externals.cfg b/src/core_atmosphere/Externals.cfg index b3f1f3db26..004706ab05 100644 --- a/src/core_atmosphere/Externals.cfg +++ b/src/core_atmosphere/Externals.cfg @@ -16,7 +16,7 @@ required = True local_path = ./physics_noaa/TEMPO protocol = git repo_url = https://github.com/AndersJensen-NOAA/TEMPO.git -tag = v3.0.0_g +tag = v3.0.0_h required = True [externals_description] diff --git a/src/core_atmosphere/physics/mpas_atmphys_control.F b/src/core_atmosphere/physics/mpas_atmphys_control.F index b3162019e5..d27a6cb89f 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_control.F +++ b/src/core_atmosphere/physics/mpas_atmphys_control.F @@ -177,6 +177,7 @@ subroutine physics_namelist_check(configs) config_microp_scheme .eq. 'mp_kessler' .or. & config_microp_scheme .eq. 'mp_thompson' .or. & config_microp_scheme .eq. 'mp_thompson_aerosols' .or. & + config_microp_scheme .eq. 'mp_tempo' .or. & config_microp_scheme .eq. 'mp_wsm6')) then write(mpas_err_message,'(A,A20)') 'illegal value for config_microp_scheme:', & diff --git a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F index c16c44b2ce..2a349e30f7 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F +++ b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F @@ -23,7 +23,7 @@ module mpas_atmphys_driver_microphysics use mp_wsm6,only: mp_wsm6_init,refl10cm_wsm6 use module_mp_tempo_cfgs,only: ty_tempo_cfgs - use module_mp_tempo_driver,only: tempo_init, tempo_driver, & + use module_mp_tempo_driver,only: tempo_init, tempo_run, & ty_tempo_driver_diags, tempo_aerosol_surface_emissions implicit none diff --git a/src/core_atmosphere/physics/mpas_atmphys_interface.F b/src/core_atmosphere/physics/mpas_atmphys_interface.F index 71e46dfcd2..203ab01e64 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_interface.F +++ b/src/core_atmosphere/physics/mpas_atmphys_interface.F @@ -78,11 +78,13 @@ subroutine allocate_forall_physics(configs) !local pointers: character(len=StrKIND),pointer:: microp_scheme,pbl_scheme + logical,pointer:: config_tempo_aerosolaware !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) call mpas_pool_get_config(configs,'config_pbl_scheme' ,pbl_scheme ) + call mpas_pool_get_config(configs,'config_tempo_aerosolaware', config_tempo_aerosolaware) if(.not.allocated(psfc_p) ) allocate(psfc_p(ims:ime,jms:jme) ) if(.not.allocated(ptop_p) ) allocate(ptop_p(ims:ime,jms:jme) ) @@ -120,6 +122,13 @@ subroutine allocate_forall_physics(configs) if(.not.allocated(nifa_p)) allocate(nifa_p(ims:ime,kms:kme,jms:jme)) if(.not.allocated(nwfa_p)) allocate(nwfa_p(ims:ime,kms:kme,jms:jme)) + case("mp_tempo") + if(config_tempo_aerosolaware) then + if(.not.allocated(nc_p)) allocate(nc_p(ims:ime,kms:kme,jms:jme)) + if(.not.allocated(nifa_p)) allocate(nifa_p(ims:ime,kms:kme,jms:jme)) + if(.not.allocated(nwfa_p)) allocate(nwfa_p(ims:ime,kms:kme,jms:jme)) + endif + case default end select microp_select @@ -153,11 +162,13 @@ subroutine deallocate_forall_physics(configs) !local pointers: character(len=StrKIND),pointer:: microp_scheme,pbl_scheme + logical,pointer:: config_tempo_aerosolaware !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) call mpas_pool_get_config(configs,'config_pbl_scheme' ,pbl_scheme ) + call mpas_pool_get_config(configs,'config_tempo_aerosolaware', config_tempo_aerosolaware) if(allocated(psfc_p) ) deallocate(psfc_p ) if(allocated(ptop_p) ) deallocate(ptop_p ) @@ -195,6 +206,13 @@ subroutine deallocate_forall_physics(configs) if(allocated(nifa_p)) deallocate(nifa_p) if(allocated(nwfa_p)) deallocate(nwfa_p) + case("mp_tempo") + if(config_tempo_aerosolaware) then + if(allocated(nc_p)) deallocate(nc_p) + if(allocated(nifa_p)) deallocate(nifa_p) + if(allocated(nwfa_p)) deallocate(nwfa_p) + endif + case default end select microp_select @@ -236,6 +254,7 @@ subroutine MPAS_to_physics(configs,mesh,state,time_lev,diag,diag_physics,its,ite !local pointers: character(len=StrKIND),pointer:: microp_scheme,pbl_scheme + logical,pointer:: config_tempo_aerosolaware integer,pointer:: index_qv,index_qc,index_qr,index_qi,index_qs,index_qg integer,pointer:: index_nc,index_ni,index_nifa,index_nwfa @@ -270,6 +289,7 @@ subroutine MPAS_to_physics(configs,mesh,state,time_lev,diag,diag_physics,its,ite !initialization: call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) call mpas_pool_get_config(configs,'config_pbl_scheme' ,pbl_scheme ) + call mpas_pool_get_config(configs,'config_tempo_aerosolaware', config_tempo_aerosolaware) call mpas_pool_get_array(mesh,'latCell',latCell) call mpas_pool_get_array(mesh,'lonCell',lonCell) @@ -358,6 +378,28 @@ subroutine MPAS_to_physics(configs,mesh,state,time_lev,diag,diag_physics,its,ite enddo enddo + case("mp_tempo") + if(config_tempo_aerosolaware) then + nullify(nc) + nullify(nifa) + nullify(nwfa) + call mpas_pool_get_dimension(state,'index_nc',index_nc) + call mpas_pool_get_dimension(state,'index_nifa',index_nifa) + call mpas_pool_get_dimension(state,'index_nwfa',index_nwfa) + nc => scalars(index_nc,:,:) + nifa => scalars(index_nifa,:,:) + nwfa => scalars(index_nwfa,:,:) + do j = jts,jte + do k = kts,kte + do i = its,ite + nc_p(i,k,j) = max(0.,nc(k,i)) + nifa_p(i,k,j) = max(0.,nifa(k,i)) + nwfa_p(i,k,j) = max(0.,nwfa(k,i)) + enddo + enddo + enddo + endif + case default end select microp_select @@ -566,6 +608,7 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, character(len=StrKIND),pointer:: mp_scheme integer,pointer:: index_qv,index_qc,index_qr,index_qi,index_qs,index_qg integer,pointer:: index_nc,index_ni,index_nr,index_nifa,index_nwfa + logical,pointer:: config_tempo_aerosolaware real(kind=RKIND),dimension(:),pointer :: nifa2d,nwfa2d,nt_c,mu_c real(kind=RKIND),dimension(:,:),pointer :: zgrid,w real(kind=RKIND),dimension(:,:),pointer :: zz,exner,pressure_b @@ -584,6 +627,7 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_microp_scheme',mp_scheme) + call mpas_pool_get_config(configs,'config_tempo_aerosolaware', config_tempo_aerosolaware) call mpas_pool_get_array(mesh,'zgrid',zgrid) call mpas_pool_get_array(mesh,'zz' ,zz ) @@ -657,6 +701,32 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, enddo enddo + case("mp_tempo") + call mpas_pool_get_dimension(state,'index_qi',index_qi) + call mpas_pool_get_dimension(state,'index_qs',index_qs) + call mpas_pool_get_dimension(state,'index_qg',index_qg) + qi => scalars(index_qi,:,:) + qs => scalars(index_qs,:,:) + qg => scalars(index_qg,:,:) + + call mpas_pool_get_array(diag_physics,'re_cloud',re_cloud) + call mpas_pool_get_array(diag_physics,'re_ice' ,re_ice ) + call mpas_pool_get_array(diag_physics,'re_snow' ,re_snow ) + + do j = jts, jte + do k = kts, kte + do i = its, ite + qi_p(i,k,j) = qi(k,i) + qs_p(i,k,j) = qs(k,i) + qg_p(i,k,j) = qg(k,i) + + recloud_p(i,k,j) = re_cloud(k,i) + reice_p(i,k,j) = re_ice(k,i) + resnow_p(i,k,j) = re_snow(k,i) + enddo + enddo + enddo + mp2_select: select case(trim(mp_scheme)) case("mp_thompson","mp_thompson_aerosols") call mpas_pool_get_dimension(state,'index_ni',index_ni) @@ -679,6 +749,20 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, enddo enddo + case("mp_tempo") + call mpas_pool_get_dimension(state,'index_ni',index_ni) + call mpas_pool_get_dimension(state,'index_nr',index_nr) + ni => scalars(index_ni,:,:) + nr => scalars(index_nr,:,:) + do j = jts,jte + do k = kts, kte + do i = its, ite + ni_p(i,k,j) = ni(k,i) + nr_p(i,k,j) = nr(k,i) + enddo + enddo + enddo + mp3_select: select case(trim(mp_scheme)) case("mp_thompson_aerosols") call mpas_pool_get_dimension(state,'index_nc' ,index_nc ) @@ -704,6 +788,32 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, enddo enddo + case("mp_tempo") + if(config_tempo_aerosolaware) then + call mpas_pool_get_dimension(state,'index_nc' ,index_nc ) + call mpas_pool_get_dimension(state,'index_nifa',index_nifa) + call mpas_pool_get_dimension(state,'index_nwfa',index_nwfa) + nc => scalars(index_nc,:,:) + nifa => scalars(index_nifa,:,:) + nwfa => scalars(index_nwfa,:,:) + + call mpas_pool_get_array(diag_physics,'nifa2d',nifa2d) + call mpas_pool_get_array(diag_physics,'nwfa2d',nwfa2d) + do j = jts,jte + do i = its,ite + nifa2d_p(i,j) = nifa2d(i) + nwfa2d_p(i,j) = nwfa2d(i) + enddo + do k = kts, kte + do i = its, ite + nc_p(i,k,j) = nc(k,i) + nifa_p(i,k,j) = nifa(k,i) + nwfa_p(i,k,j) = nwfa(k,i) + enddo + enddo + enddo + endif + case default end select mp3_select @@ -715,7 +825,7 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, !begin calculation of cloud microphysics tendencies: mp_tend_select: select case(trim(mp_scheme)) - case("mp_thompson","mp_thompson_aerosols","mp_wsm6") + case("mp_thompson","mp_thompson_aerosols","mp_wsm6","mp_tempo") call mpas_pool_get_array(tend_physics,'rthmpten',rthmpten) call mpas_pool_get_array(tend_physics,'rqvmpten',rqvmpten) call mpas_pool_get_array(tend_physics,'rqcmpten',rqcmpten) @@ -737,7 +847,7 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, enddo mp2_tend_select: select case(trim(mp_scheme)) - case("mp_thompson","mp_thompson_aerosols") + case("mp_thompson","mp_thompson_aerosols","mp_tempo") call mpas_pool_get_array(tend_physics,'rnimpten',rnimpten) call mpas_pool_get_array(tend_physics,'rnrmpten',rnrmpten) @@ -761,6 +871,20 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, rnwfampten(k,i) = nwfa(k,i) enddo enddo + case("mp_tempo") + if(config_tempo_aerosolaware) then + call mpas_pool_get_array(tend_physics,'rncmpten',rncmpten) + call mpas_pool_get_array(tend_physics,'rnifampten',rnifampten) + call mpas_pool_get_array(tend_physics,'rnwfampten',rnwfampten) + + do k = kts,kte + do i = its,ite + rncmpten(k,i) = nc(k,i) + rnifampten(k,i) = nifa(k,i) + rnwfampten(k,i) = nwfa(k,i) + enddo + enddo + endif case default end select mp3_tend_select @@ -796,6 +920,7 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te character(len=StrKIND),pointer:: mp_scheme integer,pointer:: index_qv,index_qc,index_qr,index_qi,index_qs,index_qg integer,pointer:: index_nc,index_ni,index_nr,index_nifa,index_nwfa + logical,pointer:: config_tempo_aerosolaware real(kind=RKIND),dimension(:),pointer :: surface_pressure,tend_sfc_pressure real(kind=RKIND),dimension(:),pointer :: nifa2d,nwfa2d real(kind=RKIND),dimension(:,:),pointer :: zgrid @@ -819,6 +944,7 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_microp_scheme',mp_scheme) + call mpas_pool_get_config(configs,'config_tempo_aerosolaware', config_tempo_aerosolaware) call mpas_pool_get_array(mesh,'zz' ,zz ) call mpas_pool_get_array(mesh,'zgrid',zgrid) @@ -932,6 +1058,33 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te enddo enddo + case("mp_tempo") + call mpas_pool_get_dimension(state,'index_qi',index_qi) + call mpas_pool_get_dimension(state,'index_qs',index_qs) + call mpas_pool_get_dimension(state,'index_qg',index_qg) + qi => scalars(index_qi,:,:) + qs => scalars(index_qs,:,:) + qg => scalars(index_qg,:,:) + + call mpas_pool_get_array(diag_physics,'re_cloud',re_cloud) + call mpas_pool_get_array(diag_physics,'re_ice' ,re_ice ) + call mpas_pool_get_array(diag_physics,'re_snow' ,re_snow ) + call mpas_pool_get_array(diag_physics,'refl10cm',refl10cm) + + do j = jts,jte + do k = kts,kte + do i = its,ite + qi(k,i) = qi_p(i,k,j) + qs(k,i) = qs_p(i,k,j) + qg(k,i) = qg_p(i,k,j) + + re_cloud(k,i) = recloud_p(i,k,j) + re_ice(k,i) = reice_p(i,k,j) + re_snow(k,i) = resnow_p(i,k,j) + enddo + enddo + enddo + mp2_select: select case(trim(mp_scheme)) case("mp_thompson","mp_thompson_aerosols") call mpas_pool_get_dimension(state,'index_ni',index_ni) @@ -948,6 +1101,21 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te enddo enddo + case("mp_tempo") + call mpas_pool_get_dimension(state,'index_ni',index_ni) + call mpas_pool_get_dimension(state,'index_nr',index_nr) + ni => scalars(index_ni,:,:) + nr => scalars(index_nr,:,:) + + do j = jts,jte + do k = kts,kte + do i = its,ite + ni(k,i) = ni_p(i,k,j) + nr(k,i) = nr_p(i,k,j) + enddo + enddo + enddo + mp3_select: select case(trim(mp_scheme)) case("mp_thompson_aerosols") call mpas_pool_get_dimension(state,'index_nc' ,index_nc ) @@ -973,6 +1141,32 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te enddo enddo + case("mp_tempo") + if(config_tempo_aerosolaware) then + call mpas_pool_get_dimension(state,'index_nc' ,index_nc ) + call mpas_pool_get_dimension(state,'index_nifa',index_nifa) + call mpas_pool_get_dimension(state,'index_nwfa',index_nwfa) + nc => scalars(index_nc,:,:) + nifa => scalars(index_nifa,:,:) + nwfa => scalars(index_nwfa,:,:) + + call mpas_pool_get_array(diag_physics,'nifa2d',nifa2d) + call mpas_pool_get_array(diag_physics,'nwfa2d',nwfa2d) + do j = jts,jte + do i = its,ite + nifa2d(i) = nifa2d_p(i,j) + nwfa2d(i) = nwfa2d_p(i,j) + enddo + do k = kts, kte + do i = its, ite + nc(k,i) = nc_p(i,k,j) + nifa(k,i) = nifa_p(i,k,j) + nwfa(k,i) = nwfa_p(i,k,j) + enddo + enddo + enddo + endif + case default end select mp3_select @@ -984,7 +1178,7 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te !end calculation of cloud microphysics tendencies: mp_tend_select: select case(trim(mp_scheme)) - case("mp_thompson","mp_thompson_aerosols","mp_wsm6") + case("mp_thompson","mp_thompson_aerosols","mp_wsm6","mp_tempo") call mpas_pool_get_array(tend_physics,'rthmpten',rthmpten) call mpas_pool_get_array(tend_physics,'rqvmpten',rqvmpten) call mpas_pool_get_array(tend_physics,'rqcmpten',rqcmpten) @@ -1006,7 +1200,7 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te enddo mp2_tend_select: select case(trim(mp_scheme)) - case("mp_thompson","mp_thompson_aerosols") + case("mp_thompson","mp_thompson_aerosols","mp_tempo") call mpas_pool_get_array(tend_physics,'rnimpten',rnimpten) call mpas_pool_get_array(tend_physics,'rnrmpten',rnrmpten) @@ -1031,6 +1225,21 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te enddo enddo + case("mp_tempo") + if(config_tempo_aerosolaware) then + call mpas_pool_get_array(tend_physics,'rncmpten',rncmpten) + call mpas_pool_get_array(tend_physics,'rnifampten',rnifampten) + call mpas_pool_get_array(tend_physics,'rnwfampten',rnwfampten) + + do k = kts,kte + do i = its,ite + rncmpten(k,i) = (nc(k,i)-rncmpten(k,i))/dt_dyn + rnifampten(k,i) = (nifa(k,i)-rnifampten(k,i))/dt_dyn + rnwfampten(k,i) = (nwfa(k,i)-rnwfampten(k,i))/dt_dyn + enddo + enddo + endif + case default end select mp3_tend_select diff --git a/src/core_atmosphere/physics/mpas_atmphys_manager.F b/src/core_atmosphere/physics/mpas_atmphys_manager.F index 2057148725..57158aa1f8 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_manager.F +++ b/src/core_atmosphere/physics/mpas_atmphys_manager.F @@ -686,7 +686,8 @@ subroutine physics_run_init(configs,mesh,state,clock,stream_manager) dt_microp = dt_dyn n_microp = 1 if(trim(config_microp_scheme)=='mp_thompson' .or. & - trim(config_microp_scheme)=='mp_thompson_aerosols') then + trim(config_microp_scheme)=='mp_thompson_aerosols' .or. & + trim(config_microp_scheme)=='mp_tempo') then dt_microp = 90._RKIND n_microp = max(nint(dt_dyn/dt_microp),1) dt_microp = dt_dyn / n_microp @@ -750,6 +751,7 @@ subroutine physics_run_init(configs,mesh,state,clock,stream_manager) if(config_microp_re) then if(trim(config_microp_scheme)=='mp_thompson' .or. & trim(config_microp_scheme)=='mp_thompson_aerosols' .or. & + trim(config_microp_scheme)=='mp_tempo' .or. & trim(config_microp_scheme)=='mp_wsm6') then if(trim(config_radt_lw_scheme)=='rrtmg_lw' .and. trim(config_radt_sw_scheme)=='rrtmg_sw') then has_reqc = 1 From 9c08bb3870fe17316ef6a252227e74c4d271d40f Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Wed, 21 Jan 2026 16:52:56 +0000 Subject: [PATCH 05/15] - adds aerosol initialization for tempo - adds initialization routines for tempo with aerosolaware option --- .../mpas_atmphys_driver_microphysics.F | 78 ++++++++- .../physics/mpas_atmphys_init_microphysics.F | 158 +++++++++++++++++- 2 files changed, 233 insertions(+), 3 deletions(-) diff --git a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F index 2a349e30f7..af2abcd436 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F +++ b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F @@ -92,7 +92,7 @@ module mpas_atmphys_driver_microphysics !--- initialization option for WSM6 from WRF version 3.8.1. this option could also be set as a namelist parameter. integer,parameter:: hail_opt = 0 - + type(ty_tempo_cfgs) tempo_cfgs contains @@ -106,10 +106,12 @@ subroutine allocate_microphysics(configs) !local pointers: character(len=StrKIND),pointer:: microp_scheme + logical,pointer:: config_tempo_aerosolaware !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) + call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware) !sounding variables: if(.not.allocated(rho_p) ) allocate(rho_p(ims:ime,kms:kme,jms:jme) ) @@ -152,6 +154,24 @@ subroutine allocate_microphysics(configs) if(.not.allocated(rainprod_p)) allocate(rainprod_p(ims:ime,kms:kme,jms:jme)) if(.not.allocated(evapprod_p)) allocate(evapprod_p(ims:ime,kms:kme,jms:jme)) + case ("mp_tempo") + !mass mixing ratios: + if(.not.allocated(qi_p)) allocate(qi_p(ims:ime,kms:kme,jms:jme)) + if(.not.allocated(qs_p)) allocate(qs_p(ims:ime,kms:kme,jms:jme)) + if(.not.allocated(qg_p)) allocate(qg_p(ims:ime,kms:kme,jms:jme)) + + !surface precipitation: + if(.not.allocated(sr_p) ) allocate(sr_p(ims:ime,jms:jme) ) + if(.not.allocated(snownc_p) ) allocate(snownc_p(ims:ime,jms:jme) ) + if(.not.allocated(snowncv_p) ) allocate(snowncv_p(ims:ime,jms:jme) ) + if(.not.allocated(graupelnc_p) ) allocate(graupelnc_p(ims:ime,jms:jme) ) + if(.not.allocated(graupelncv_p)) allocate(graupelncv_p(ims:ime,jms:jme)) + + !cloud water,cloud ice,and snow effective radii: + if(.not.allocated(recloud_p)) allocate(recloud_p(ims:ime,kms:kme,jms:jme)) + if(.not.allocated(reice_p) ) allocate(reice_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(resnow_p) ) allocate(resnow_p(ims:ime,kms:kme,jms:jme) ) + microp2_select: select case(trim(microp_scheme)) case("mp_thompson","mp_thompson_aerosols") if(.not.allocated(ntc_p)) allocate(ntc_p(ims:ime,jms:jme)) @@ -159,6 +179,10 @@ subroutine allocate_microphysics(configs) if(.not.allocated(ni_p) ) allocate(ni_p(ims:ime,kms:kme,jms:jme)) if(.not.allocated(nr_p) ) allocate(nr_p(ims:ime,kms:kme,jms:jme)) + case("mp_tempo") + if(.not.allocated(ni_p) ) allocate(ni_p(ims:ime,kms:kme,jms:jme)) + if(.not.allocated(nr_p) ) allocate(nr_p(ims:ime,kms:kme,jms:jme)) + microp3_select: select case(trim(microp_scheme)) case("mp_thompson_aerosols") if(.not.allocated(nifa2d_p)) allocate(nifa2d_p(ims:ime,jms:jme)) @@ -167,6 +191,15 @@ subroutine allocate_microphysics(configs) if(.not.allocated(nifa_p) ) allocate(nifa_p(ims:ime,kms:kme,jms:jme)) if(.not.allocated(nwfa_p) ) allocate(nwfa_p(ims:ime,kms:kme,jms:jme)) + case("mp_tempo") + if(config_tempo_aerosolaware) then + if(.not.allocated(nifa2d_p)) allocate(nifa2d_p(ims:ime,jms:jme)) + if(.not.allocated(nwfa2d_p)) allocate(nwfa2d_p(ims:ime,jms:jme)) + if(.not.allocated(nc_p) ) allocate(nc_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(nifa_p) ) allocate(nifa_p(ims:ime,kms:kme,jms:jme)) + if(.not.allocated(nwfa_p) ) allocate(nwfa_p(ims:ime,kms:kme,jms:jme)) + endif + case default end select microp3_select @@ -187,10 +220,12 @@ subroutine deallocate_microphysics(configs) !local pointers: character(len=StrKIND),pointer:: microp_scheme + logical,pointer:: config_tempo_aerosolaware !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) + call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware) !sounding variables: if(allocated(rho_p) ) deallocate(rho_p ) @@ -233,6 +268,24 @@ subroutine deallocate_microphysics(configs) if(allocated(rainprod_p)) deallocate(rainprod_p) if(allocated(evapprod_p)) deallocate(evapprod_p) + case ("mp_tempo") + !mass mixing ratios: + if(allocated(qi_p)) deallocate(qi_p) + if(allocated(qs_p)) deallocate(qs_p) + if(allocated(qg_p)) deallocate(qg_p) + + !surface precipitation: + if(allocated(sr_p) ) deallocate(sr_p ) + if(allocated(snownc_p) ) deallocate(snownc_p ) + if(allocated(snowncv_p) ) deallocate(snowncv_p ) + if(allocated(graupelnc_p) ) deallocate(graupelnc_p ) + if(allocated(graupelncv_p)) deallocate(graupelncv_p) + + !cloud water,cloud ice,and snow effective radii: + if(allocated(recloud_p)) deallocate(recloud_p) + if(allocated(reice_p) ) deallocate(reice_p ) + if(allocated(resnow_p) ) deallocate(resnow_p ) + microp2_select: select case(trim(microp_scheme)) case("mp_thompson","mp_thompson_aerosols") if(allocated(ntc_p)) deallocate(ntc_p) @@ -240,6 +293,10 @@ subroutine deallocate_microphysics(configs) if(allocated(ni_p) ) deallocate(ni_p ) if(allocated(nr_p) ) deallocate(nr_p ) + case("mp_tempo") + if(allocated(ni_p) ) deallocate(ni_p ) + if(allocated(nr_p) ) deallocate(nr_p ) + microp3_select: select case(trim(microp_scheme)) case("mp_thompson_aerosols") if(allocated(nifa2d_p)) deallocate(nifa2d_p) @@ -248,6 +305,15 @@ subroutine deallocate_microphysics(configs) if(allocated(nifa_p) ) deallocate(nifa_p ) if(allocated(nwfa_p) ) deallocate(nwfa_p ) + case("mp_tempo") + if(config_tempo_aerosolaware) then + if(allocated(nifa2d_p)) deallocate(nifa2d_p) + if(allocated(nwfa2d_p)) deallocate(nwfa2d_p) + if(allocated(nc_p) ) deallocate(nc_p ) + if(allocated(nifa_p) ) deallocate(nifa_p ) + if(allocated(nwfa_p) ) deallocate(nwfa_p ) + endif + case default end select microp3_select @@ -277,6 +343,7 @@ subroutine init_microphysics(dminfo,configs,mesh,state,time_lev,sfc_input,diag_p !local pointer: logical,pointer:: do_restart character(len=StrKIND),pointer:: microp_scheme + logical,pointer:: config_tempo_aerosolaware !CCPP-compliant flags: character(len=StrKIND):: errmsg @@ -292,15 +359,24 @@ subroutine init_microphysics(dminfo,configs,mesh,state,time_lev,sfc_input,diag_p call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) call mpas_pool_get_config(configs,'config_do_restart' ,do_restart ) + call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware) microp_select: select case(trim(microp_scheme)) case("mp_thompson","mp_thompson_aerosols") call thompson_init(l_mp_tables) call init_thompson_clouddroplets_forMPAS(mesh,sfc_input,diag_physics) + case("mp_tempo") + call tempo_init(aerosolaware_flag=config_tempo_aerosolaware, & + tempo_cfgs=tempo_cfgs) + microp2_select: select case(trim(microp_scheme)) case("mp_thompson_aerosols") call init_thompson_aerosols_forMPAS(do_restart,dminfo,mesh,state,time_lev,diag_physics) + case("mp_tempo") + if(config_tempo_aerosolaware) then + call init_tempo_aerosols_forMPAS(do_restart,dminfo,mesh,state,time_lev,diag_physics) + endif case default end select microp2_select diff --git a/src/core_atmosphere/physics/mpas_atmphys_init_microphysics.F b/src/core_atmosphere/physics/mpas_atmphys_init_microphysics.F index f2a75d6c90..dfc4536b61 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_init_microphysics.F +++ b/src/core_atmosphere/physics/mpas_atmphys_init_microphysics.F @@ -17,11 +17,12 @@ module mpas_atmphys_init_microphysics use mpas_atmphys_utilities use module_mp_thompson, only: is_aerosol_aware,naCCN0,naCCN1,naIN0,naIN1,ntb_arc,ntb_arw,ntb_art,ntb_arr, & ntb_ark,tnccn_act - + use module_mp_tempo_params, only: aero_max, nwfa_default implicit none private public:: init_thompson_clouddroplets_forMPAS, & - init_thompson_aerosols_forMPAS + init_thompson_aerosols_forMPAS, & + init_tempo_aerosols_forMPAS !MPAS main initialization of the Thompson parameterization of cloud microphysics with nucleation of cloud !droplets based on distributions of CCNs and INs (aerosol-aware parameterization). @@ -252,6 +253,159 @@ subroutine init_thompson_aerosols_forMPAS(do_restart,dminfo,mesh,state,time_lev, end subroutine init_thompson_aerosols_forMPAS +!================================================================================================================= + subroutine init_tempo_aerosols_forMPAS(do_restart,dminfo,mesh,state,time_lev,diag_physics) +!================================================================================================================= + +!input variables: + type(dm_info),intent(in):: dminfo + type(mpas_pool_type),intent(in):: mesh + logical,intent(in):: do_restart + integer,intent(in):: time_lev + +!inout variables: + type(mpas_pool_type),intent(inout):: diag_physics + type(mpas_pool_type),intent(inout):: state + +!local variables and pointers: + integer,pointer:: nCellsSolve,nVertLevels + integer,pointer:: index_nifa,index_nwfa + + real(kind=RKIND),dimension(:),pointer :: areaCell + real(kind=RKIND),dimension(:),pointer :: nifa2d,nwfa2d + real(kind=RKIND),dimension(:,:),pointer :: zgrid,zz + real(kind=RKIND),dimension(:,:),pointer :: rho_zz,nifa,nwfa + real(kind=RKIND),dimension(:,:,:),pointer:: scalars + + character(len=StrKIND):: mess + + integer:: iCell, k + + real(kind=RKIND):: max_test + real(kind=RKIND):: deltaz + real(kind=RKIND):: h_01 + real(kind=RKIND):: niIN3,niCCN3 + real(kind=RKIND):: nifa_max,nifa_min,global_nifa_max,global_nifa_min + real(kind=RKIND):: nwfa_max,nwfa_min,global_nwfa_max,global_nwfa_min + real(kind=RKIND),dimension(:,:),allocatable:: hgt + +!----------------------------------------------------------------------------------------------------------------- + +!... if do_restart is true, then we do not need to check the initialization of nwfa, nifa, and nwfa2d. If false, +! then, we proceed with the initialization: + if(do_restart) return + + call mpas_pool_get_dimension(mesh,'nCellsSolve',nCellsSolve) + call mpas_pool_get_dimension(mesh,'nVertLevels',nVertLevels) + + call mpas_pool_get_array(mesh,'areaCell',areaCell) + call mpas_pool_get_array(mesh,'zgrid' ,zgrid ) + call mpas_pool_get_array(mesh,'zz' ,zz ) + + call mpas_pool_get_array(diag_physics,'nifa2d',nifa2d) + call mpas_pool_get_array(diag_physics,'nwfa2d',nwfa2d) + + call mpas_pool_get_dimension(state,'index_nifa' ,index_nifa ) + call mpas_pool_get_dimension(state,'index_nwfa' ,index_nwfa ) + + call mpas_pool_get_array(state,'scalars',scalars,time_lev) + nifa => scalars(index_nifa,:,:) + nwfa => scalars(index_nwfa,:,:) + + call mpas_pool_get_array(state,'rho_zz',rho_zz,time_lev) + + if(.not.allocated(hgt)) allocate(hgt(1:nVertLevels,1:nCellsSolve)) + do iCell = 1, nCellsSolve + do k = 1, nVertLevels + hgt(k,iCell) = 0.5_RKIND * (zgrid(k,iCell)+zgrid(k+1,iCell)) + enddo + enddo + +!... initialize the distribution of hygroscopic ("water friendly") aerosols if not already initialized using +! GOCART data: + global_nwfa_min = 0._RKIND + global_nwfa_max = 0._RKIND + nwfa_min = minval(nwfa(:,1:nCellsSolve)) + nwfa_max = maxval(nwfa(:,1:nCellsSolve)) + call mpas_dmpar_min_real(dminfo,nwfa_min,global_nwfa_min) + call mpas_dmpar_max_real(dminfo,nwfa_max,global_nwfa_max) + call mpas_log_write('--- global_nwfa_min = $r',realArgs=(/global_nwfa_min/)) + call mpas_log_write('--- global_nwfa_max = $r',realArgs=(/global_nwfa_max/)) + + if(global_nwfa_min == 0._RKIND .and. global_nwfa_max == 0._RKIND) then + call mpas_log_write('--- initialize nwfa using an exponential distribution of CCN as a function of height.') + do iCell = 1, nCellsSolve + if(hgt(1,iCell).le.1000.0) then + h_01 = 0.8 + elseif(hgt(1,iCell).ge.2500.0) then + h_01 = 0.01 + else + h_01 = 0.8*cos(hgt(1,iCell)*0.001 - 1.0) + endif + niCCN3 = -1.0*ALOG(naCCN1/naCCN0)/h_01 + nwfa(1,iCell) = naCCN1+naCCN0*exp(-((hgt(2,iCell)-hgt(1,iCell))/1000.)*niCCN3) + do k = 2, nVertLevels + nwfa(k,iCell) = naCCN1+naCCN0*exp(-((hgt(k,iCell)-hgt(1,iCell))/1000.)*niCCN3) + enddo + enddo + else + call mpas_log_write('--- initialize nwfa using the climatological GOCART data.') + endif + +!... initialize the distribution of nonhygroscopic ("ice friendly") aerosols if not already initialized using +! GOCART data: + global_nifa_min = 0._RKIND + global_nifa_max = 0._RKIND + nifa_min = minval(nifa(:,1:nCellsSolve)) + nifa_max = maxval(nifa(:,1:nCellsSolve)) + call mpas_dmpar_min_real(dminfo,nifa_min,global_nifa_min) + call mpas_dmpar_max_real(dminfo,nifa_max,global_nifa_max) + call mpas_log_write('--- global_nifa_min = $r',realArgs=(/global_nifa_min/)) + call mpas_log_write('--- global_nifa_max = $r',realArgs=(/global_nifa_max/)) + + if(global_nifa_min == 0._RKIND .and. global_nifa_max == 0._RKIND) then + call mpas_log_write('--- initialize nifa using an exponential distribution of IN as a function of height.') + do iCell = 1, nCellsSolve + if(hgt(1,iCell).le.1000.0) then + h_01 = 0.8 + elseif(hgt(1,iCell).ge.2500.0) then + h_01 = 0.01 + else + h_01 = 0.8*cos(hgt(1,iCell)*0.001 - 1.0) + endif + niIN3 = -1.0*ALOG(naIN1/naIN0)/h_01 + nifa(1,iCell) = naIN1+naIN0*exp(-((hgt(2,iCell)-hgt(1,iCell))/1000.)*niIN3) + do k = 2, nVertLevels + nifa(k,iCell) = naIN1+naIN0*exp(-((hgt(k,iCell)-hgt(1,iCell))/1000.)*niIN3) + enddo + enddo + else + call mpas_log_write('--- initialize nifa using the climatological GOCART data.') + endif + +!... scale the lowest level aerosol data into an emissions rate. This is very far from ideal, but +!... need higher emissions where larger amount of (climo) existing and lesser emissions where there +!... exists fewer to begin as a first-order simplistic approach. Later, proper connection to emission +!... inventory would be better, but, for now, scale like this: +!... where: Nwfa=50 per cc, emit 0.875E4 aerosols per second per grid box unit +!... that was tested as ~(20kmx20kmx50m = 2.E10 m**3). + + k = 1 + do iCell = 1, nCellsSolve + deltaz = zgrid(k+1,iCell)-zgrid(k,iCell) + if (deltaz < 9.0) then + deltaz = 9.0 + endif + nwfa2d(iCell) = max(nwfa_default, min(aero_max, nwfa(k,iCell))) * & + 0.000196 * (5.0 / deltaz) * (areaCell(iCell) / 9.e6) + nifa2d(iCell) = 0._RKIND + enddo + +!... deallocate local arrays: + if(allocated(hgt)) deallocate(hgt) + + end subroutine init_tempo_aerosols_forMPAS + !================================================================================================================= subroutine table_ccnAct(dminfo) !================================================================================================================= From 634d4c0e83fc1768594135cf71f67365bd3e8861 Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Wed, 21 Jan 2026 21:14:10 +0000 Subject: [PATCH 06/15] -adds tempo and supported diagnostics to microphysics driver --- src/core_atmosphere/Externals.cfg | 2 +- .../mpas_atmphys_driver_microphysics.F | 60 +++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) diff --git a/src/core_atmosphere/Externals.cfg b/src/core_atmosphere/Externals.cfg index 004706ab05..79950d5bbf 100644 --- a/src/core_atmosphere/Externals.cfg +++ b/src/core_atmosphere/Externals.cfg @@ -16,7 +16,7 @@ required = True local_path = ./physics_noaa/TEMPO protocol = git repo_url = https://github.com/AndersJensen-NOAA/TEMPO.git -tag = v3.0.0_h +tag = v3.0.0_i required = True [externals_description] diff --git a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F index af2abcd436..d2106c67ed 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F +++ b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F @@ -418,11 +418,14 @@ subroutine driver_microphysics(configs,mesh,state,time_lev,diag,diag_physics,ten !local variables and arrays: integer:: istep + integer:: i,j,k !CCPP-compliant flags: character(len=StrKIND):: errmsg integer:: errflg + type(ty_tempo_driver_diags) :: tempo_driver_diags + !----------------------------------------------------------------------------------------------------------------- !call mpas_log_write('') !call mpas_log_write('---enter subroutine driver_microphysics:') @@ -463,6 +466,63 @@ subroutine driver_microphysics(configs,mesh,state,time_lev,diag,diag_physics,ten ) call mpas_timer_stop('mp_kessler') + case ("mp_tempo") + + if (allocated(nwfa_p) .and. allocated(nwfa2d_p)) then + call tempo_aerosol_surface_emissions(dt=dt_microp, nwfa=nwfa_p, nwfa2d=nwfa2d_p, & + ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, kts=kts) + endif + + call mpas_timer_start('mp_tempo') + + istep = 1 + do while (istep .le. n_microp) + call tempo_run( tempo_cfgs=tempo_cfgs, & + dt = dt_microp , itimestep = itimestep , & + th = th_p , qv = qv_p , qc = qc_p , & + qr = qr_p , qi = qi_p , qs = qs_p , & + qg = qg_p , ni = ni_p , nr = nr_p , & + w = w_p , & +! ng = ng_p , qb = volg_p , w = w_p , & + nc = nc_p , nwfa = nwfa_p , nifa = nifa_p , & + pii = pi_p , p = pres_p , dz = dz_p , & + ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , & + ims = ims , ime = ime , jms = jms , jme = jme , kms = kms , kme = kme , & + its = its , ite = ite , jts = jts , jte = jte , kts = kts , kte = kte , & + tempo_diags = tempo_driver_diags) + do j = jts, jte + do i = its, ite + ! precipitation variables are summed in case of multiple calls when n_microp > 1 + snowncv_p(i,j) = snowncv_p(i,j) + tempo_driver_diags%ice_liquid_equiv_precip(i,j) + & + tempo_driver_diags%snow_liquid_equiv_precip(i,j) + snownc_p(i,j) = snownc_p(i,j) + tempo_driver_diags%ice_liquid_equiv_precip(i,j) + & + tempo_driver_diags%snow_liquid_equiv_precip(i,j) + graupelncv_p(i,j) = graupelncv_p(i,j) + tempo_driver_diags%graupel_liquid_equiv_precip(i,j) + graupelnc_p(i,j) = graupelnc_p(i,j) + tempo_driver_diags%graupel_liquid_equiv_precip(i,j) + rainncv_p(i,j) = rainncv_p(i,j) + tempo_driver_diags%rain_precip(i,j) + & + tempo_driver_diags%ice_liquid_equiv_precip(i,j) + & + tempo_driver_diags%snow_liquid_equiv_precip(i,j) + & + tempo_driver_diags%graupel_liquid_equiv_precip(i,j) + rainnc_p(i,j) = rainnc_p(i,j) + tempo_driver_diags%rain_precip(i,j) + & + tempo_driver_diags%ice_liquid_equiv_precip(i,j) + & + tempo_driver_diags%snow_liquid_equiv_precip(i,j) + & + tempo_driver_diags%graupel_liquid_equiv_precip(i,j) + sr_p(i,j) = tempo_driver_diags%frozen_fraction(i,j) + !frainnc_p = frainnc_p + tempo_driver_diags%frz_rain_precip + !max_hail_diameter_sfc_p = tempo_driver_diags%max_hail_diameter_sfc + !max_hail_diameter_column_p = tempo_driver_diags%max_hail_diameter_column + do k = kts, kte + !refl10cm_p = tempo_driver_diags%refl10cm + recloud_p(i,k,j) = tempo_driver_diags%re_cloud(i,k,j) + reice_p(i,k,j) = tempo_driver_diags%re_ice(i,k,j) + resnow_p(i,k,j) = tempo_driver_diags%re_snow(i,k,j) + enddo + enddo + enddo + istep = istep + 1 + enddo + call mpas_timer_stop('mp_tempo') + case ("mp_thompson") call mpas_timer_start('mp_thompson') istep = 1 From 3a2dded5c1c0d7a089a0dc2bbc90b2697fc914a6 Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Sun, 1 Feb 2026 15:24:17 +0000 Subject: [PATCH 07/15] Update TEMPO tag --- src/core_atmosphere/Externals.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/Externals.cfg b/src/core_atmosphere/Externals.cfg index 79950d5bbf..7452961650 100644 --- a/src/core_atmosphere/Externals.cfg +++ b/src/core_atmosphere/Externals.cfg @@ -16,7 +16,7 @@ required = True local_path = ./physics_noaa/TEMPO protocol = git repo_url = https://github.com/AndersJensen-NOAA/TEMPO.git -tag = v3.0.0_i +tag = v3.0.0_j required = True [externals_description] From 099bb795db55c46b919dacebdee7eeb1f98ccdd9 Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Mon, 2 Feb 2026 19:56:36 +0000 Subject: [PATCH 08/15] adds tempo packages and tempo variables to registries --- src/core_atmosphere/Registry.xml | 137 +++++++++--------- .../physics/mpas_atmphys_packages.F | 28 ++++ src/core_init_atmosphere/Registry.xml | 19 +-- 3 files changed, 108 insertions(+), 76 deletions(-) diff --git a/src/core_atmosphere/Registry.xml b/src/core_atmosphere/Registry.xml index 4281c40bba..de687d0cd6 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -402,6 +402,9 @@ + + + @@ -1219,9 +1222,9 @@ #ifdef DO_PHYSICS - - - + + + @@ -1636,43 +1639,43 @@ + packages="bl_mynn_in;bl_ysu_in;cu_ntiedtke_in;mp_kessler_in;mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_kessler_in;mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="bl_mynn_in;bl_ysu_in;cu_ntiedtke_in;mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="bl_mynn_in;mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="bl_mynn_in;mp_thompson_in;mp_thompson_aers_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_tempo_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> #endif @@ -1987,43 +1990,43 @@ + packages="bl_mynn_in;bl_ysu_in;cu_ntiedtke_in;mp_kessler_in;mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_kessler_in;mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="bl_mynn_in;bl_ysu_in;cu_ntiedtke_in;mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="bl_mynn_in;mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="bl_mynn_in;mp_thompson_in;mp_thompson_aers_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_tempo_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> #endif @@ -2063,43 +2066,43 @@ units="kg kg^{-1} s^{-1}" description="Lateral boundary tendency of water vapor mixing ratio"/> - - - - - - - - - - @@ -2258,7 +2261,7 @@ + possible_values="`suite',`mp_wsm6',`mp_thompson',`mp_thompson_aerosols',`mp_tempo',`mp_kessler',`off'"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_kessler_in;mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_kessler_in;mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_kessler_in;mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> @@ -3450,51 +3453,51 @@ + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_wsm6_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_tempo_in"/> + packages="mp_thompson_in;mp_thompson_aers_in;mp_tempo_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> @@ -3885,23 +3888,23 @@ units="kg kg^{-1}" description="Water vapor mixing ratio increment"/> - - - - - diff --git a/src/core_atmosphere/physics/mpas_atmphys_packages.F b/src/core_atmosphere/physics/mpas_atmphys_packages.F index 5d32cb297e..84fb298077 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_packages.F +++ b/src/core_atmosphere/physics/mpas_atmphys_packages.F @@ -38,9 +38,11 @@ function atmphys_setup_packages(configs,packages,iocontext) result(ierr) character(len=StrKIND),pointer:: config_pbl_scheme character(len=StrKIND),pointer:: config_lsm_scheme logical,pointer:: mp_kessler_in,mp_thompson_in,mp_thompson_aers_in,mp_wsm6_in + logical,pointer:: mp_tempo_in,tempo_aerosolaware_in,tempo_hailaware_in logical,pointer:: cu_grell_freitas_in,cu_kain_fritsch_in,cu_ntiedtke_in logical,pointer:: bl_mynn_in,bl_ysu_in logical,pointer:: sf_noahmp_in + logical,pointer:: config_tempo_hailaware,config_tempo_aerosolaware integer :: ierr @@ -56,6 +58,8 @@ function atmphys_setup_packages(configs,packages,iocontext) result(ierr) !--- initialization of all packages for parameterizations of cloud microphysics: call mpas_pool_get_config(configs,'config_microp_scheme',config_microp_scheme) + call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware) + call mpas_pool_get_config(configs,'config_tempo_hailaware',config_tempo_hailaware) nullify(mp_kessler_in) call mpas_pool_get_package(packages,'mp_kessler_inActive',mp_kessler_in) @@ -66,12 +70,22 @@ function atmphys_setup_packages(configs,packages,iocontext) result(ierr) nullify(mp_thompson_aers_in) call mpas_pool_get_package(packages,'mp_thompson_aers_inActive',mp_thompson_aers_in) + nullify(mp_tempo_in) + call mpas_pool_get_package(packages,'mp_tempo_inActive',mp_tempo_in) + + nullify(tempo_aerosolaware_in) + call mpas_pool_get_package(packages,'tempo_aerosolaware_inActive',tempo_aerosolaware_in) + + nullify(tempo_hailaware_in) + call mpas_pool_get_package(packages,'tempo_hailaware_inActive',tempo_hailaware_in) + nullify(mp_wsm6_in) call mpas_pool_get_package(packages,'mp_wsm6_inActive',mp_wsm6_in) if(.not.associated(mp_kessler_in ) .or. & .not.associated(mp_thompson_in ) .or. & .not.associated(mp_thompson_aers_in) .or. & + .not.associated(mp_tempo_in ) .or. & .not.associated(mp_wsm6_in)) then call mpas_log_write('====================================================================================',messageType=MPAS_LOG_ERR) call mpas_log_write('* Error while setting up packages for cloud microphysics options in atmosphere core.',messageType=MPAS_LOG_ERR) @@ -83,6 +97,9 @@ function atmphys_setup_packages(configs,packages,iocontext) result(ierr) mp_kessler_in = .false. mp_thompson_in = .false. mp_thompson_aers_in = .false. + mp_tempo_in = .false. + tempo_aerosolaware_in = .false. + tempo_hailaware_in = .false. mp_wsm6_in = .false. if(config_microp_scheme == 'mp_kessler') then @@ -91,6 +108,14 @@ function atmphys_setup_packages(configs,packages,iocontext) result(ierr) mp_thompson_in = .true. elseif(config_microp_scheme == 'mp_thompson_aerosols') then mp_thompson_aers_in = .true. + elseif(config_microp_scheme == 'mp_tempo') then + mp_tempo_in = .true. + if(config_tempo_aerosolaware) then + tempo_aerosolaware_in = .true. + endif + if(config_tempo_hailaware) then + tempo_hailaware_in = .true. + endif elseif(config_microp_scheme == 'mp_wsm6') then mp_wsm6_in = .true. endif @@ -98,6 +123,9 @@ function atmphys_setup_packages(configs,packages,iocontext) result(ierr) call mpas_log_write(' mp_kessler_in = $l', logicArgs=(/mp_kessler_in/)) call mpas_log_write(' mp_thompson_in = $l', logicArgs=(/mp_thompson_in/)) call mpas_log_write(' mp_thompson_aers_in = $l', logicArgs=(/mp_thompson_aers_in/)) + call mpas_log_write(' mp_tempo_in = $l', logicArgs=(/mp_tempo_in/)) + call mpas_log_write(' tempo_aerosolaware_in = $l', logicArgs=(/tempo_aerosolaware_in/)) + call mpas_log_write(' tempo_hailaware_in = $l', logicArgs=(/tempo_hailaware_in/)) call mpas_log_write(' mp_wsm6_in = $l', logicArgs=(/mp_wsm6_in/)) !--- initialization of all packages for parameterizations of convection: diff --git a/src/core_init_atmosphere/Registry.xml b/src/core_init_atmosphere/Registry.xml index cf4934a81b..b39cde0aae 100644 --- a/src/core_init_atmosphere/Registry.xml +++ b/src/core_init_atmosphere/Registry.xml @@ -375,6 +375,7 @@ + @@ -592,7 +593,7 @@ - + @@ -1018,16 +1019,16 @@ + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> - + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> + + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> @@ -1208,11 +1209,11 @@ + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> + packages="mp_thompson_aers_in;tempo_aerosolaware_in"/> From 7162adfb4497409a86d81c2c303838b1584c8651 Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Mon, 2 Feb 2026 21:19:01 +0000 Subject: [PATCH 09/15] adds support for tempo initial conditions of nwfa and nifa --- .../mpas_init_atm_core_interface.F | 28 +++++++++++++++---- 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/src/core_init_atmosphere/mpas_init_atm_core_interface.F b/src/core_init_atmosphere/mpas_init_atm_core_interface.F index f277a4a72f..5223002a5c 100644 --- a/src/core_init_atmosphere/mpas_init_atm_core_interface.F +++ b/src/core_init_atmosphere/mpas_init_atm_core_interface.F @@ -121,6 +121,7 @@ function init_atm_setup_packages(configs, streamInfo, packages, iocontext) resul logical, pointer :: config_native_gwd_gsl_static logical, pointer :: first_guess_field logical, pointer :: mp_thompson_aers_in + logical, pointer :: tempo_aerosolaware_in integer, pointer :: config_init_case logical, pointer :: noahmp, config_noahmp_static @@ -170,6 +171,9 @@ function init_atm_setup_packages(configs, streamInfo, packages, iocontext) resul nullify(mp_thompson_aers_in) call mpas_pool_get_package(packages, 'mp_thompson_aers_inActive', mp_thompson_aers_in) + nullify(tempo_aerosolaware_in) + call mpas_pool_get_package(packages, 'tempo_aerosolaware_inActive', tempo_aerosolaware_in) + if (.not. associated(initial_conds) .or. & .not. associated(sfc_update) .or. & .not. associated(gwd_stage_in) .or. & @@ -179,7 +183,8 @@ function init_atm_setup_packages(configs, streamInfo, packages, iocontext) resul .not. associated(vertical_stage_out) .or. & .not. associated(met_stage_in) .or. & .not. associated(met_stage_out) .or. & - .not. associated(mp_thompson_aers_in)) then + .not. associated(mp_thompson_aers_in) .or. & + .not. associated(tempo_aerosolaware_in)) then call mpas_log_write('********************************************************************************', messageType=MPAS_LOG_ERR) call mpas_log_write('* Error while setting up packages for init_atmosphere core.', messageType=MPAS_LOG_ERR) call mpas_log_write('********************************************************************************', messageType=MPAS_LOG_ERR) @@ -198,11 +203,16 @@ function init_atm_setup_packages(configs, streamInfo, packages, iocontext) resul if (config_init_case == 9) then lbcs = .true. mp_thompson_aers_in = .false. + tempo_aerosolaware_in = .false. inquire(file="QNWFA_QNIFA_SIGMA_MONTHLY.dat",exist=lexist) - if(lexist) mp_thompson_aers_in = .true. + if(lexist) then + mp_thompson_aers_in = .true. + tempo_aerosolaware_in = .true. + endif else lbcs = .false. mp_thompson_aers_in = .false. + tempo_aerosolaware_in = .false. end if if (config_init_case == 7) then @@ -227,9 +237,12 @@ function init_atm_setup_packages(configs, streamInfo, packages, iocontext) resul met_stage_out = config_met_interp mp_thompson_aers_in = .false. + tempo_aerosolaware_in = .false. inquire(file="QNWFA_QNIFA_SIGMA_MONTHLY.dat",exist=lexist) - if((lexist .and. met_stage_out) .or. (lexist .and. met_stage_in)) mp_thompson_aers_in = .true. - + if((lexist .and. met_stage_out) .or. (lexist .and. met_stage_in)) then + mp_thompson_aers_in = .true. + tempo_aerosolaware_in = .true. + endif else if (config_init_case == 8) then gwd_stage_in = .false. gwd_stage_out = .false. @@ -253,9 +266,12 @@ function init_atm_setup_packages(configs, streamInfo, packages, iocontext) resul met_stage_out = .true. mp_thompson_aers_in = .false. + tempo_aerosolaware_in = .false. inquire(file="QNWFA_QNIFA_SIGMA_MONTHLY.dat",exist=lexist) - if((lexist .and. met_stage_out) .or. (lexist .and. met_stage_in)) mp_thompson_aers_in = .true. - + if((lexist .and. met_stage_out) .or. (lexist .and. met_stage_in)) then + mp_thompson_aers_in = .true. + tempo_aerosolaware_in = .true. + endif initial_conds = .false. ! Also, turn off the initial_conds package to avoid writing the IC "output" stream else if (config_init_case == 13) then From 860bf34989179abc5ccab640157dc5ac4c6599be Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Mon, 2 Feb 2026 21:39:14 +0000 Subject: [PATCH 10/15] move tempo pointer to NCAR/TEMPO --- src/core_atmosphere/Externals.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core_atmosphere/Externals.cfg b/src/core_atmosphere/Externals.cfg index 7452961650..3302c16fde 100644 --- a/src/core_atmosphere/Externals.cfg +++ b/src/core_atmosphere/Externals.cfg @@ -15,8 +15,8 @@ required = True [TEMPO_MP] local_path = ./physics_noaa/TEMPO protocol = git -repo_url = https://github.com/AndersJensen-NOAA/TEMPO.git -tag = v3.0.0_j +repo_url = https://github.com/NCAR/TEMPO.git +tag = tempo_v3.0.0 required = True [externals_description] From d8ef1f6556d873bff3757cf78d54ea4a86ba3700 Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Mon, 2 Feb 2026 22:26:10 +0000 Subject: [PATCH 11/15] adds tempo to lw and sw radiation drivers --- .../physics/mpas_atmphys_driver_radiation_lw.F | 4 ++-- .../physics/mpas_atmphys_driver_radiation_sw.F | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core_atmosphere/physics/mpas_atmphys_driver_radiation_lw.F b/src/core_atmosphere/physics/mpas_atmphys_driver_radiation_lw.F index dfa327fea8..d4e076abd2 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_driver_radiation_lw.F +++ b/src/core_atmosphere/physics/mpas_atmphys_driver_radiation_lw.F @@ -413,7 +413,7 @@ subroutine radiation_lw_from_MPAS(xtime_s,configs,mesh,state,time_lev,diag_physi radiation_lw_select: select case (trim(radt_lw_scheme)) case("rrtmg_lw") microp_select: select case(microp_scheme) - case("mp_thompson","mp_thompson_aerosols","mp_wsm6") + case("mp_thompson","mp_thompson_aerosols","mp_wsm6","mp_tempo") if(config_microp_re) then call mpas_pool_get_array(diag_physics,'re_cloud',re_cloud) call mpas_pool_get_array(diag_physics,'re_ice' ,re_ice ) @@ -684,7 +684,7 @@ subroutine radiation_lw_to_MPAS(configs,diag_physics,tend_physics,its,ite) case("rrtmg_lw") microp_select: select case(microp_scheme) - case("mp_thompson","mp_thompson_aerosols","mp_wsm6") + case("mp_thompson","mp_thompson_aerosols","mp_wsm6","mp_tempo") call mpas_pool_get_array(diag_physics,'rre_cloud',rre_cloud) call mpas_pool_get_array(diag_physics,'rre_ice' ,rre_ice ) call mpas_pool_get_array(diag_physics,'rre_snow' ,rre_snow ) diff --git a/src/core_atmosphere/physics/mpas_atmphys_driver_radiation_sw.F b/src/core_atmosphere/physics/mpas_atmphys_driver_radiation_sw.F index 96a4996378..524c7835a7 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_driver_radiation_sw.F +++ b/src/core_atmosphere/physics/mpas_atmphys_driver_radiation_sw.F @@ -488,7 +488,7 @@ subroutine radiation_sw_from_MPAS(configs,mesh,state,time_lev,diag_physics,atm_i case("rrtmg_sw") microp_select: select case(microp_scheme) - case("mp_thompson","mp_thompson_aerosols","mp_wsm6") + case("mp_thompson","mp_thompson_aerosols","mp_wsm6","mp_tempo") if(config_microp_re) then call mpas_pool_get_array(diag_physics,'re_cloud',re_cloud) call mpas_pool_get_array(diag_physics,'re_ice' ,re_ice ) From 556bc5c8139358bb88577271bdaa5439b5a63ef6 Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Mon, 2 Feb 2026 22:26:49 +0000 Subject: [PATCH 12/15] connects tempo aerosolaware variables to mynn mixing --- .../physics/mpas_atmphys_todynamics.F | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/core_atmosphere/physics/mpas_atmphys_todynamics.F b/src/core_atmosphere/physics/mpas_atmphys_todynamics.F index 284b072851..ef4c6f9181 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_todynamics.F +++ b/src/core_atmosphere/physics/mpas_atmphys_todynamics.F @@ -93,6 +93,7 @@ subroutine physics_get_tend(block,mesh,state,diag,tend,tend_physics,configs,rk_s integer,pointer:: index_qv,index_qc,index_qr,index_qi,index_qs integer,pointer:: index_nc,index_ni,index_nifa,index_nwfa integer,pointer:: nCells,nCellsSolve,nEdges,nEdgesSolve + logical,pointer:: config_tempo_aerosolaware real(kind=RKIND),dimension(:,:),pointer:: mass ! time level 2 rho_zz real(kind=RKIND),dimension(:,:),pointer:: mass_edge ! diag rho_edge @@ -126,6 +127,7 @@ subroutine physics_get_tend(block,mesh,state,diag,tend,tend_physics,configs,rk_s call mpas_pool_get_config(configs,'config_pbl_scheme' ,pbl_scheme ) call mpas_pool_get_config(configs,'config_radt_lw_scheme' ,radt_lw_scheme ) call mpas_pool_get_config(configs,'config_radt_sw_scheme' ,radt_sw_scheme ) + call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware) call mpas_pool_get_array(state,'theta_m' ,theta_m,1) call mpas_pool_get_array(state,'scalars' ,scalars,1) @@ -209,6 +211,7 @@ subroutine physics_get_tend(block,mesh,state,diag,tend,tend_physics,configs,rk_s call physics_get_tend_work( & block,mesh,nCells,nEdges,nCellsSolve,nEdgesSolve,rk_step,dynamics_substep, & pbl_scheme,convection_scheme,microp_scheme,radt_lw_scheme,radt_sw_scheme, & + config_tempo_aerosolaware, & index_qv,index_qc,index_qr,index_qi,index_qs, & index_nc,index_ni,index_nifa,index_nwfa, & mass,mass_edge,theta_m,scalars, & @@ -249,6 +252,7 @@ end subroutine physics_get_tend subroutine physics_get_tend_work( & block,mesh,nCells,nEdges,nCellsSolve,nEdgesSolve,rk_step,dynamics_substep, & pbl_scheme,convection_scheme,microp_scheme,radt_lw_scheme,radt_sw_scheme, & + config_tempo_aerosolaware, & index_qv,index_qc,index_qr,index_qi,index_qs, & index_nc,index_ni,index_nifa,index_nwfa, & mass,mass_edge,theta_m,scalars, & @@ -271,6 +275,7 @@ subroutine physics_get_tend_work( & character(len=StrKIND),intent(in):: pbl_scheme character(len=StrKIND),intent(in):: radt_lw_scheme character(len=StrKIND),intent(in):: radt_sw_scheme + logical,intent(in):: config_tempo_aerosolaware integer,intent(in):: nCells,nEdges,nCellsSolve,nEdgesSolve integer,intent(in):: rk_step,dynamics_substep @@ -366,6 +371,16 @@ subroutine physics_get_tend_work( & enddo endif + if(trim(microp_scheme) == 'mp_tempo' .and. config_tempo_aerosolaware) then + do i = 1, nCellsSolve + do k = 1, nVertLevels + tend_scalars(index_nc,k,i) = tend_scalars(index_nc,k,i) + rncblten(k,i)*mass(k,i) + tend_scalars(index_nifa,k,i) = tend_scalars(index_nifa,k,i) + rnifablten(k,i)*mass(k,i) + tend_scalars(index_nwfa,k,i) = tend_scalars(index_nwfa,k,i) + rnwfablten(k,i)*mass(k,i) + enddo + enddo + endif + case default end select pbl_select endif From 7e38e7843ba75de78de46d2e7a94b891961db95c Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Thu, 5 Feb 2026 14:46:12 +0000 Subject: [PATCH 13/15] Added hailaware feature --- src/core_atmosphere/Registry.xml | 25 ++ .../mpas_atmphys_driver_microphysics.F | 82 +++--- .../physics/mpas_atmphys_interface.F | 244 +++++++++++------- .../physics/mpas_atmphys_packages.F | 10 +- .../physics/mpas_atmphys_vars.F | 4 +- 5 files changed, 228 insertions(+), 137 deletions(-) diff --git a/src/core_atmosphere/Registry.xml b/src/core_atmosphere/Registry.xml index de687d0cd6..c9075d6903 100644 --- a/src/core_atmosphere/Registry.xml +++ b/src/core_atmosphere/Registry.xml @@ -1665,6 +1665,14 @@ description="Rain number concentration" packages="mp_thompson_in;mp_thompson_aers_in;mp_tempo_in"/> + + + + @@ -2016,6 +2024,14 @@ description="Tendency of rain number concentration multiplied by dry air density divided by d(zeta)/dz" packages="mp_thompson_in;mp_thompson_aers_in;mp_tempo_in"/> + + + + @@ -2090,6 +2106,14 @@ units="m^{-3} s^{-1}" description="Lateral boundary tendency of rain number concentration"/> + + + + @@ -3919,5 +3943,6 @@ #ifdef DO_PHYSICS #include "physics/Registry_noahmp.xml" +#include "physics/Registry_tempo.xml" #endif diff --git a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F index d2106c67ed..64bb9655d9 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F +++ b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F @@ -106,12 +106,13 @@ subroutine allocate_microphysics(configs) !local pointers: character(len=StrKIND),pointer:: microp_scheme - logical,pointer:: config_tempo_aerosolaware + logical,pointer:: config_tempo_aerosolaware, config_tempo_hailaware !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware) + call mpas_pool_get_config(configs,'config_tempo_hailaware',config_tempo_hailaware) !sounding variables: if(.not.allocated(rho_p) ) allocate(rho_p(ims:ime,kms:kme,jms:jme) ) @@ -160,6 +161,22 @@ subroutine allocate_microphysics(configs) if(.not.allocated(qs_p)) allocate(qs_p(ims:ime,kms:kme,jms:jme)) if(.not.allocated(qg_p)) allocate(qg_p(ims:ime,kms:kme,jms:jme)) + if(.not.allocated(ni_p) ) allocate(ni_p(ims:ime,kms:kme,jms:jme)) + if(.not.allocated(nr_p) ) allocate(nr_p(ims:ime,kms:kme,jms:jme)) + + if(config_tempo_aerosolaware) then + if(.not.allocated(nifa2d_p)) allocate(nifa2d_p(ims:ime,jms:jme)) + if(.not.allocated(nwfa2d_p)) allocate(nwfa2d_p(ims:ime,jms:jme)) + if(.not.allocated(nc_p) ) allocate(nc_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(nifa_p) ) allocate(nifa_p(ims:ime,kms:kme,jms:jme)) + if(.not.allocated(nwfa_p) ) allocate(nwfa_p(ims:ime,kms:kme,jms:jme)) + endif + + if(config_tempo_hailaware) then + if(.not.allocated(ng_p) ) allocate(ng_p(ims:ime,kms:kme,jms:jme) ) + if(.not.allocated(volg_p) ) allocate(volg_p(ims:ime,kms:kme,jms:jme)) + endif + !surface precipitation: if(.not.allocated(sr_p) ) allocate(sr_p(ims:ime,jms:jme) ) if(.not.allocated(snownc_p) ) allocate(snownc_p(ims:ime,jms:jme) ) @@ -179,10 +196,6 @@ subroutine allocate_microphysics(configs) if(.not.allocated(ni_p) ) allocate(ni_p(ims:ime,kms:kme,jms:jme)) if(.not.allocated(nr_p) ) allocate(nr_p(ims:ime,kms:kme,jms:jme)) - case("mp_tempo") - if(.not.allocated(ni_p) ) allocate(ni_p(ims:ime,kms:kme,jms:jme)) - if(.not.allocated(nr_p) ) allocate(nr_p(ims:ime,kms:kme,jms:jme)) - microp3_select: select case(trim(microp_scheme)) case("mp_thompson_aerosols") if(.not.allocated(nifa2d_p)) allocate(nifa2d_p(ims:ime,jms:jme)) @@ -191,15 +204,6 @@ subroutine allocate_microphysics(configs) if(.not.allocated(nifa_p) ) allocate(nifa_p(ims:ime,kms:kme,jms:jme)) if(.not.allocated(nwfa_p) ) allocate(nwfa_p(ims:ime,kms:kme,jms:jme)) - case("mp_tempo") - if(config_tempo_aerosolaware) then - if(.not.allocated(nifa2d_p)) allocate(nifa2d_p(ims:ime,jms:jme)) - if(.not.allocated(nwfa2d_p)) allocate(nwfa2d_p(ims:ime,jms:jme)) - if(.not.allocated(nc_p) ) allocate(nc_p(ims:ime,kms:kme,jms:jme) ) - if(.not.allocated(nifa_p) ) allocate(nifa_p(ims:ime,kms:kme,jms:jme)) - if(.not.allocated(nwfa_p) ) allocate(nwfa_p(ims:ime,kms:kme,jms:jme)) - endif - case default end select microp3_select @@ -220,13 +224,14 @@ subroutine deallocate_microphysics(configs) !local pointers: character(len=StrKIND),pointer:: microp_scheme - logical,pointer:: config_tempo_aerosolaware + logical,pointer:: config_tempo_aerosolaware, config_tempo_hailaware !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware) - + call mpas_pool_get_config(configs,'config_tempo_hailaware',config_tempo_hailaware) + !sounding variables: if(allocated(rho_p) ) deallocate(rho_p ) if(allocated(th_p) ) deallocate(th_p ) @@ -274,6 +279,22 @@ subroutine deallocate_microphysics(configs) if(allocated(qs_p)) deallocate(qs_p) if(allocated(qg_p)) deallocate(qg_p) + if(allocated(ni_p) ) deallocate(ni_p ) + if(allocated(nr_p) ) deallocate(nr_p ) + + if(config_tempo_aerosolaware) then + if(allocated(nifa2d_p)) deallocate(nifa2d_p) + if(allocated(nwfa2d_p)) deallocate(nwfa2d_p) + if(allocated(nc_p) ) deallocate(nc_p ) + if(allocated(nifa_p) ) deallocate(nifa_p ) + if(allocated(nwfa_p) ) deallocate(nwfa_p ) + endif + + if(config_tempo_hailaware) then + if(allocated(ng_p) ) deallocate(ng_p ) + if(allocated(volg_p) ) deallocate(volg_p ) + endif + !surface precipitation: if(allocated(sr_p) ) deallocate(sr_p ) if(allocated(snownc_p) ) deallocate(snownc_p ) @@ -293,10 +314,6 @@ subroutine deallocate_microphysics(configs) if(allocated(ni_p) ) deallocate(ni_p ) if(allocated(nr_p) ) deallocate(nr_p ) - case("mp_tempo") - if(allocated(ni_p) ) deallocate(ni_p ) - if(allocated(nr_p) ) deallocate(nr_p ) - microp3_select: select case(trim(microp_scheme)) case("mp_thompson_aerosols") if(allocated(nifa2d_p)) deallocate(nifa2d_p) @@ -305,15 +322,6 @@ subroutine deallocate_microphysics(configs) if(allocated(nifa_p) ) deallocate(nifa_p ) if(allocated(nwfa_p) ) deallocate(nwfa_p ) - case("mp_tempo") - if(config_tempo_aerosolaware) then - if(allocated(nifa2d_p)) deallocate(nifa2d_p) - if(allocated(nwfa2d_p)) deallocate(nwfa2d_p) - if(allocated(nc_p) ) deallocate(nc_p ) - if(allocated(nifa_p) ) deallocate(nifa_p ) - if(allocated(nwfa_p) ) deallocate(nwfa_p ) - endif - case default end select microp3_select @@ -343,7 +351,7 @@ subroutine init_microphysics(dminfo,configs,mesh,state,time_lev,sfc_input,diag_p !local pointer: logical,pointer:: do_restart character(len=StrKIND),pointer:: microp_scheme - logical,pointer:: config_tempo_aerosolaware + logical,pointer:: config_tempo_aerosolaware, config_tempo_hailaware !CCPP-compliant flags: character(len=StrKIND):: errmsg @@ -360,6 +368,7 @@ subroutine init_microphysics(dminfo,configs,mesh,state,time_lev,sfc_input,diag_p call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) call mpas_pool_get_config(configs,'config_do_restart' ,do_restart ) call mpas_pool_get_config(configs,'config_tempo_aerosolaware',config_tempo_aerosolaware) + call mpas_pool_get_config(configs,'config_tempo_hailaware',config_tempo_hailaware) microp_select: select case(trim(microp_scheme)) case("mp_thompson","mp_thompson_aerosols") @@ -368,15 +377,15 @@ subroutine init_microphysics(dminfo,configs,mesh,state,time_lev,sfc_input,diag_p case("mp_tempo") call tempo_init(aerosolaware_flag=config_tempo_aerosolaware, & - tempo_cfgs=tempo_cfgs) + hailaware_flag=config_tempo_hailaware, tempo_cfgs=tempo_cfgs) + + if(config_tempo_aerosolaware) then + call init_tempo_aerosols_forMPAS(do_restart,dminfo,mesh,state,time_lev,diag_physics) + endif microp2_select: select case(trim(microp_scheme)) case("mp_thompson_aerosols") call init_thompson_aerosols_forMPAS(do_restart,dminfo,mesh,state,time_lev,diag_physics) - case("mp_tempo") - if(config_tempo_aerosolaware) then - call init_tempo_aerosols_forMPAS(do_restart,dminfo,mesh,state,time_lev,diag_physics) - endif case default end select microp2_select @@ -482,8 +491,7 @@ subroutine driver_microphysics(configs,mesh,state,time_lev,diag,diag_physics,ten th = th_p , qv = qv_p , qc = qc_p , & qr = qr_p , qi = qi_p , qs = qs_p , & qg = qg_p , ni = ni_p , nr = nr_p , & - w = w_p , & -! ng = ng_p , qb = volg_p , w = w_p , & + ng = ng_p , qb = volg_p , w = w_p , & nc = nc_p , nwfa = nwfa_p , nifa = nifa_p , & pii = pi_p , p = pres_p , dz = dz_p , & ids = ids , ide = ide , jds = jds , jde = jde , kds = kds , kde = kde , & diff --git a/src/core_atmosphere/physics/mpas_atmphys_interface.F b/src/core_atmosphere/physics/mpas_atmphys_interface.F index 203ab01e64..d5e89990c5 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_interface.F +++ b/src/core_atmosphere/physics/mpas_atmphys_interface.F @@ -78,13 +78,14 @@ subroutine allocate_forall_physics(configs) !local pointers: character(len=StrKIND),pointer:: microp_scheme,pbl_scheme - logical,pointer:: config_tempo_aerosolaware + logical,pointer:: config_tempo_aerosolaware, config_tempo_hailaware !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) call mpas_pool_get_config(configs,'config_pbl_scheme' ,pbl_scheme ) call mpas_pool_get_config(configs,'config_tempo_aerosolaware', config_tempo_aerosolaware) + call mpas_pool_get_config(configs,'config_tempo_hailaware', config_tempo_hailaware) if(.not.allocated(psfc_p) ) allocate(psfc_p(ims:ime,jms:jme) ) if(.not.allocated(ptop_p) ) allocate(ptop_p(ims:ime,jms:jme) ) @@ -129,6 +130,11 @@ subroutine allocate_forall_physics(configs) if(.not.allocated(nwfa_p)) allocate(nwfa_p(ims:ime,kms:kme,jms:jme)) endif + if(config_tempo_hailaware) then + if(.not.allocated(ng_p)) allocate(ng_p(ims:ime,kms:kme,jms:jme)) + if(.not.allocated(volg_p)) allocate(volg_p(ims:ime,kms:kme,jms:jme)) + endif + case default end select microp_select @@ -162,13 +168,14 @@ subroutine deallocate_forall_physics(configs) !local pointers: character(len=StrKIND),pointer:: microp_scheme,pbl_scheme - logical,pointer:: config_tempo_aerosolaware + logical,pointer:: config_tempo_aerosolaware, config_tempo_hailaware !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) call mpas_pool_get_config(configs,'config_pbl_scheme' ,pbl_scheme ) call mpas_pool_get_config(configs,'config_tempo_aerosolaware', config_tempo_aerosolaware) + call mpas_pool_get_config(configs,'config_tempo_hailaware', config_tempo_hailaware) if(allocated(psfc_p) ) deallocate(psfc_p ) if(allocated(ptop_p) ) deallocate(ptop_p ) @@ -213,6 +220,11 @@ subroutine deallocate_forall_physics(configs) if(allocated(nwfa_p)) deallocate(nwfa_p) endif + if(config_tempo_hailaware) then + if(allocated(ng_p)) deallocate(ng_p) + if(allocated(volg_p)) deallocate(volg_p) + endif + case default end select microp_select @@ -254,10 +266,11 @@ subroutine MPAS_to_physics(configs,mesh,state,time_lev,diag,diag_physics,its,ite !local pointers: character(len=StrKIND),pointer:: microp_scheme,pbl_scheme - logical,pointer:: config_tempo_aerosolaware + logical,pointer:: config_tempo_aerosolaware, config_tempo_hailaware integer,pointer:: index_qv,index_qc,index_qr,index_qi,index_qs,index_qg integer,pointer:: index_nc,index_ni,index_nifa,index_nwfa + integer,pointer:: index_ng,index_volg real(kind=RKIND),dimension(:),pointer :: latCell,lonCell real(kind=RKIND),dimension(:),pointer :: fzm,fzp,rdzw @@ -267,6 +280,7 @@ subroutine MPAS_to_physics(configs,mesh,state,time_lev,diag,diag_physics,its,ite real(kind=RKIND),dimension(:,:),pointer :: rho_zz,theta_m,pressure_p,u,v,w real(kind=RKIND),dimension(:,:),pointer :: qv,qc,qr,qi,qs,qg real(kind=RKIND),dimension(:,:),pointer :: nc,ni,nifa,nwfa + real(kind=RKIND),dimension(:,:),pointer :: ng,volg real(kind=RKIND),dimension(:,:,:),pointer:: scalars !local variables: @@ -290,6 +304,7 @@ subroutine MPAS_to_physics(configs,mesh,state,time_lev,diag,diag_physics,its,ite call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) call mpas_pool_get_config(configs,'config_pbl_scheme' ,pbl_scheme ) call mpas_pool_get_config(configs,'config_tempo_aerosolaware', config_tempo_aerosolaware) + call mpas_pool_get_config(configs,'config_tempo_hailaware', config_tempo_hailaware) call mpas_pool_get_array(mesh,'latCell',latCell) call mpas_pool_get_array(mesh,'lonCell',lonCell) @@ -400,6 +415,23 @@ subroutine MPAS_to_physics(configs,mesh,state,time_lev,diag,diag_physics,its,ite enddo endif + if(config_tempo_hailaware) then + nullify(ng) + nullify(volg) + call mpas_pool_get_dimension(state,'index_ng',index_ng) + call mpas_pool_get_dimension(state,'index_volg',index_volg) + ng => scalars(index_ng,:,:) + volg => scalars(index_volg,:,:) + do j = jts,jte + do k = kts,kte + do i = its,ite + ng_p(i,k,j) = max(0.,ng(k,i)) + volg_p(i,k,j) = max(0.,volg(k,i)) + enddo + enddo + enddo + endif + case default end select microp_select @@ -608,13 +640,15 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, character(len=StrKIND),pointer:: mp_scheme integer,pointer:: index_qv,index_qc,index_qr,index_qi,index_qs,index_qg integer,pointer:: index_nc,index_ni,index_nr,index_nifa,index_nwfa - logical,pointer:: config_tempo_aerosolaware + integer,pointer:: index_ng,index_volg + logical,pointer:: config_tempo_aerosolaware, config_tempo_hailaware real(kind=RKIND),dimension(:),pointer :: nifa2d,nwfa2d,nt_c,mu_c real(kind=RKIND),dimension(:,:),pointer :: zgrid,w real(kind=RKIND),dimension(:,:),pointer :: zz,exner,pressure_b real(kind=RKIND),dimension(:,:),pointer :: rho_zz,theta_m,pressure_p real(kind=RKIND),dimension(:,:),pointer :: qv,qc,qr,qi,qs,qg real(kind=RKIND),dimension(:,:),pointer :: nc,ni,nr,nifa,nwfa + real(kind=RKIND),dimension(:,:),pointer :: ng,volg real(kind=RKIND),dimension(:,:),pointer :: rainprod,evapprod real(kind=RKIND),dimension(:,:),pointer :: re_cloud,re_ice,re_snow real(kind=RKIND),dimension(:,:),pointer :: rthmpten,rqvmpten,rqcmpten,rqrmpten,rqimpten,rqsmpten,rqgmpten @@ -628,6 +662,7 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, call mpas_pool_get_config(configs,'config_microp_scheme',mp_scheme) call mpas_pool_get_config(configs,'config_tempo_aerosolaware', config_tempo_aerosolaware) + call mpas_pool_get_config(configs,'config_tempo_hailaware', config_tempo_hailaware) call mpas_pool_get_array(mesh,'zgrid',zgrid) call mpas_pool_get_array(mesh,'zz' ,zz ) @@ -705,20 +740,27 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, call mpas_pool_get_dimension(state,'index_qi',index_qi) call mpas_pool_get_dimension(state,'index_qs',index_qs) call mpas_pool_get_dimension(state,'index_qg',index_qg) - qi => scalars(index_qi,:,:) - qs => scalars(index_qs,:,:) - qg => scalars(index_qg,:,:) + call mpas_pool_get_dimension(state,'index_ni',index_ni) + call mpas_pool_get_dimension(state,'index_nr',index_nr) call mpas_pool_get_array(diag_physics,'re_cloud',re_cloud) call mpas_pool_get_array(diag_physics,'re_ice' ,re_ice ) call mpas_pool_get_array(diag_physics,'re_snow' ,re_snow ) + qi => scalars(index_qi,:,:) + qs => scalars(index_qs,:,:) + qg => scalars(index_qg,:,:) + ni => scalars(index_ni,:,:) + nr => scalars(index_nr,:,:) + do j = jts, jte do k = kts, kte do i = its, ite qi_p(i,k,j) = qi(k,i) qs_p(i,k,j) = qs(k,i) qg_p(i,k,j) = qg(k,i) + ni_p(i,k,j) = ni(k,i) + nr_p(i,k,j) = nr(k,i) recloud_p(i,k,j) = re_cloud(k,i) reice_p(i,k,j) = re_ice(k,i) @@ -727,6 +769,50 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, enddo enddo + if(config_tempo_aerosolaware) then + call mpas_pool_get_dimension(state,'index_nc' ,index_nc ) + call mpas_pool_get_dimension(state,'index_nifa',index_nifa) + call mpas_pool_get_dimension(state,'index_nwfa',index_nwfa) + nc => scalars(index_nc,:,:) + nifa => scalars(index_nifa,:,:) + nwfa => scalars(index_nwfa,:,:) + + do j = jts, jte + do k = kts, kte + do i = its, ite + nc_p(i,k,j) = nc(k,i) + nifa_p(i,k,j) = nifa(k,i) + nwfa_p(i,k,j) = nwfa(k,i) + enddo + enddo + enddo + + call mpas_pool_get_array(diag_physics,'nifa2d',nifa2d) + call mpas_pool_get_array(diag_physics,'nwfa2d',nwfa2d) + do j = jts,jte + do i = its,ite + nifa2d_p(i,j) = nifa2d(i) + nwfa2d_p(i,j) = nwfa2d(i) + enddo + enddo + endif + + if(config_tempo_hailaware) then + call mpas_pool_get_dimension(state,'index_ng' ,index_ng ) + call mpas_pool_get_dimension(state,'index_volg',index_volg) + ng => scalars(index_ng,:,:) + volg => scalars(index_volg,:,:) + + do j = jts, jte + do k = kts, kte + do i = its, ite + ng_p(i,k,j) = ng(k,i) + volg_p(i,k,j) = volg(k,i) + enddo + enddo + enddo + endif + mp2_select: select case(trim(mp_scheme)) case("mp_thompson","mp_thompson_aerosols") call mpas_pool_get_dimension(state,'index_ni',index_ni) @@ -749,20 +835,6 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, enddo enddo - case("mp_tempo") - call mpas_pool_get_dimension(state,'index_ni',index_ni) - call mpas_pool_get_dimension(state,'index_nr',index_nr) - ni => scalars(index_ni,:,:) - nr => scalars(index_nr,:,:) - do j = jts,jte - do k = kts, kte - do i = its, ite - ni_p(i,k,j) = ni(k,i) - nr_p(i,k,j) = nr(k,i) - enddo - enddo - enddo - mp3_select: select case(trim(mp_scheme)) case("mp_thompson_aerosols") call mpas_pool_get_dimension(state,'index_nc' ,index_nc ) @@ -788,32 +860,6 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, enddo enddo - case("mp_tempo") - if(config_tempo_aerosolaware) then - call mpas_pool_get_dimension(state,'index_nc' ,index_nc ) - call mpas_pool_get_dimension(state,'index_nifa',index_nifa) - call mpas_pool_get_dimension(state,'index_nwfa',index_nwfa) - nc => scalars(index_nc,:,:) - nifa => scalars(index_nifa,:,:) - nwfa => scalars(index_nwfa,:,:) - - call mpas_pool_get_array(diag_physics,'nifa2d',nifa2d) - call mpas_pool_get_array(diag_physics,'nwfa2d',nwfa2d) - do j = jts,jte - do i = its,ite - nifa2d_p(i,j) = nifa2d(i) - nwfa2d_p(i,j) = nwfa2d(i) - enddo - do k = kts, kte - do i = its, ite - nc_p(i,k,j) = nc(k,i) - nifa_p(i,k,j) = nifa(k,i) - nwfa_p(i,k,j) = nwfa(k,i) - enddo - enddo - enddo - endif - case default end select mp3_select @@ -920,7 +966,8 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te character(len=StrKIND),pointer:: mp_scheme integer,pointer:: index_qv,index_qc,index_qr,index_qi,index_qs,index_qg integer,pointer:: index_nc,index_ni,index_nr,index_nifa,index_nwfa - logical,pointer:: config_tempo_aerosolaware + integer,pointer:: index_ng,index_volg + logical,pointer:: config_tempo_aerosolaware, config_tempo_hailaware real(kind=RKIND),dimension(:),pointer :: surface_pressure,tend_sfc_pressure real(kind=RKIND),dimension(:),pointer :: nifa2d,nwfa2d real(kind=RKIND),dimension(:,:),pointer :: zgrid @@ -930,6 +977,7 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te real(kind=RKIND),dimension(:,:),pointer :: dtheta_dt_mp real(kind=RKIND),dimension(:,:),pointer :: qv,qc,qr,qi,qs,qg real(kind=RKIND),dimension(:,:),pointer :: nc,ni,nr,nifa,nwfa + real(kind=RKIND),dimension(:,:),pointer :: ng,volg real(kind=RKIND),dimension(:,:),pointer :: rainprod,evapprod,refl10cm real(kind=RKIND),dimension(:,:),pointer :: re_cloud,re_ice,re_snow real(kind=RKIND),dimension(:,:),pointer :: rthmpten,rqvmpten,rqcmpten,rqrmpten,rqimpten,rqsmpten,rqgmpten @@ -945,6 +993,7 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te call mpas_pool_get_config(configs,'config_microp_scheme',mp_scheme) call mpas_pool_get_config(configs,'config_tempo_aerosolaware', config_tempo_aerosolaware) + call mpas_pool_get_config(configs,'config_tempo_hailaware', config_tempo_hailaware) call mpas_pool_get_array(mesh,'zz' ,zz ) call mpas_pool_get_array(mesh,'zgrid',zgrid) @@ -1062,21 +1111,28 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te call mpas_pool_get_dimension(state,'index_qi',index_qi) call mpas_pool_get_dimension(state,'index_qs',index_qs) call mpas_pool_get_dimension(state,'index_qg',index_qg) - qi => scalars(index_qi,:,:) - qs => scalars(index_qs,:,:) - qg => scalars(index_qg,:,:) + call mpas_pool_get_dimension(state,'index_ni',index_ni) + call mpas_pool_get_dimension(state,'index_nr',index_nr) call mpas_pool_get_array(diag_physics,'re_cloud',re_cloud) call mpas_pool_get_array(diag_physics,'re_ice' ,re_ice ) call mpas_pool_get_array(diag_physics,'re_snow' ,re_snow ) call mpas_pool_get_array(diag_physics,'refl10cm',refl10cm) + qi => scalars(index_qi,:,:) + qs => scalars(index_qs,:,:) + qg => scalars(index_qg,:,:) + ni => scalars(index_ni,:,:) + nr => scalars(index_nr,:,:) + do j = jts,jte do k = kts,kte do i = its,ite qi(k,i) = qi_p(i,k,j) qs(k,i) = qs_p(i,k,j) qg(k,i) = qg_p(i,k,j) + ni(k,i) = ni_p(i,k,j) + nr(k,i) = nr_p(i,k,j) re_cloud(k,i) = recloud_p(i,k,j) re_ice(k,i) = reice_p(i,k,j) @@ -1085,23 +1141,53 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te enddo enddo - mp2_select: select case(trim(mp_scheme)) - case("mp_thompson","mp_thompson_aerosols") - call mpas_pool_get_dimension(state,'index_ni',index_ni) - call mpas_pool_get_dimension(state,'index_nr',index_nr) - ni => scalars(index_ni,:,:) - nr => scalars(index_nr,:,:) + if(config_tempo_aerosolaware) then + call mpas_pool_get_dimension(state,'index_nc' ,index_nc ) + call mpas_pool_get_dimension(state,'index_nifa',index_nifa) + call mpas_pool_get_dimension(state,'index_nwfa',index_nwfa) + + call mpas_pool_get_array(diag_physics,'nifa2d',nifa2d) + call mpas_pool_get_array(diag_physics,'nwfa2d',nwfa2d) - do j = jts,jte - do k = kts,kte - do i = its,ite - ni(k,i) = ni_p(i,k,j) - nr(k,i) = nr_p(i,k,j) - enddo - enddo - enddo + nc => scalars(index_nc,:,:) + nifa => scalars(index_nifa,:,:) + nwfa => scalars(index_nwfa,:,:) + do j = jts, jte + do k = kts, kte + do i = its, ite + nc(k,i) = nc_p(i,k,j) + nifa(k,i) = nifa_p(i,k,j) + nwfa(k,i) = nwfa_p(i,k,j) + enddo + enddo + enddo + + do j = jts, jte + do i = its,ite + nifa2d(i) = nifa2d_p(i,j) + nwfa2d(i) = nwfa2d_p(i,j) + enddo + enddo + endif - case("mp_tempo") + if(config_tempo_hailaware) then + call mpas_pool_get_dimension(state,'index_ng' ,index_ng ) + call mpas_pool_get_dimension(state,'index_volg',index_volg) + + ng => scalars(index_ng,:,:) + volg => scalars(index_volg,:,:) + do j = jts, jte + do k = kts, kte + do i = its, ite + ng(k,i) = ng_p(i,k,j) + volg(k,i) = volg_p(i,k,j) + enddo + enddo + enddo + endif + + mp2_select: select case(trim(mp_scheme)) + case("mp_thompson","mp_thompson_aerosols") call mpas_pool_get_dimension(state,'index_ni',index_ni) call mpas_pool_get_dimension(state,'index_nr',index_nr) ni => scalars(index_ni,:,:) @@ -1141,32 +1227,6 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te enddo enddo - case("mp_tempo") - if(config_tempo_aerosolaware) then - call mpas_pool_get_dimension(state,'index_nc' ,index_nc ) - call mpas_pool_get_dimension(state,'index_nifa',index_nifa) - call mpas_pool_get_dimension(state,'index_nwfa',index_nwfa) - nc => scalars(index_nc,:,:) - nifa => scalars(index_nifa,:,:) - nwfa => scalars(index_nwfa,:,:) - - call mpas_pool_get_array(diag_physics,'nifa2d',nifa2d) - call mpas_pool_get_array(diag_physics,'nwfa2d',nwfa2d) - do j = jts,jte - do i = its,ite - nifa2d(i) = nifa2d_p(i,j) - nwfa2d(i) = nwfa2d_p(i,j) - enddo - do k = kts, kte - do i = its, ite - nc(k,i) = nc_p(i,k,j) - nifa(k,i) = nifa_p(i,k,j) - nwfa(k,i) = nwfa_p(i,k,j) - enddo - enddo - enddo - endif - case default end select mp3_select diff --git a/src/core_atmosphere/physics/mpas_atmphys_packages.F b/src/core_atmosphere/physics/mpas_atmphys_packages.F index 84fb298077..2c191a1e13 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_packages.F +++ b/src/core_atmosphere/physics/mpas_atmphys_packages.F @@ -42,7 +42,7 @@ function atmphys_setup_packages(configs,packages,iocontext) result(ierr) logical,pointer:: cu_grell_freitas_in,cu_kain_fritsch_in,cu_ntiedtke_in logical,pointer:: bl_mynn_in,bl_ysu_in logical,pointer:: sf_noahmp_in - logical,pointer:: config_tempo_hailaware,config_tempo_aerosolaware + logical,pointer:: config_tempo_aerosolaware,config_tempo_hailaware integer :: ierr @@ -110,12 +110,8 @@ function atmphys_setup_packages(configs,packages,iocontext) result(ierr) mp_thompson_aers_in = .true. elseif(config_microp_scheme == 'mp_tempo') then mp_tempo_in = .true. - if(config_tempo_aerosolaware) then - tempo_aerosolaware_in = .true. - endif - if(config_tempo_hailaware) then - tempo_hailaware_in = .true. - endif + if(config_tempo_aerosolaware) tempo_aerosolaware_in = .true. + if(config_tempo_hailaware) tempo_hailaware_in = .true. elseif(config_microp_scheme == 'mp_wsm6') then mp_wsm6_in = .true. endif diff --git a/src/core_atmosphere/physics/mpas_atmphys_vars.F b/src/core_atmosphere/physics/mpas_atmphys_vars.F index 134009f537..44e5edd78b 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_vars.F +++ b/src/core_atmosphere/physics/mpas_atmphys_vars.F @@ -208,7 +208,9 @@ module mpas_atmphys_vars real(kind=RKIND),dimension(:,:,:),allocatable:: & nc_p, &!cloud water droplet number concentration [#/kg] ni_p, &!cloud ice crystal number concentration [#/kg] - nr_p !rain drop number concentration [#/kg] + nr_p, &!rain drop number concentration [#/kg] + ng_p, &!graupel number concentration [#/kg] + volg_p !graupel volume [m3/kg] ([L/kg] in tempo) !... arrays located at w (vertical velocity) points, or at interface between layers: real(kind=RKIND),dimension(:,:,:),allocatable:: & From 07ff1f023dc89710192a3f5cfe4dabf359f9fede Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Thu, 5 Feb 2026 16:52:32 +0000 Subject: [PATCH 14/15] cleaned up interface, added comments, and added 3d reflectivity --- .../mpas_atmphys_driver_microphysics.F | 10 ++--- .../physics/mpas_atmphys_init_microphysics.F | 2 + .../physics/mpas_atmphys_interface.F | 45 +++---------------- .../physics/mpas_atmphys_vars.F | 3 +- 4 files changed, 15 insertions(+), 45 deletions(-) diff --git a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F index 64bb9655d9..96d7b0a9ec 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F +++ b/src/core_atmosphere/physics/mpas_atmphys_driver_microphysics.F @@ -163,6 +163,7 @@ subroutine allocate_microphysics(configs) if(.not.allocated(ni_p) ) allocate(ni_p(ims:ime,kms:kme,jms:jme)) if(.not.allocated(nr_p) ) allocate(nr_p(ims:ime,kms:kme,jms:jme)) + if(.not.allocated(refl10cm_p) ) allocate(refl10cm_p(ims:ime,kms:kme,jms:jme)) if(config_tempo_aerosolaware) then if(.not.allocated(nifa2d_p)) allocate(nifa2d_p(ims:ime,jms:jme)) @@ -281,6 +282,7 @@ subroutine deallocate_microphysics(configs) if(allocated(ni_p) ) deallocate(ni_p ) if(allocated(nr_p) ) deallocate(nr_p ) + if(allocated(refl10cm_p) ) deallocate(refl10cm_p) if(config_tempo_aerosolaware) then if(allocated(nifa2d_p)) deallocate(nifa2d_p) @@ -351,7 +353,7 @@ subroutine init_microphysics(dminfo,configs,mesh,state,time_lev,sfc_input,diag_p !local pointer: logical,pointer:: do_restart character(len=StrKIND),pointer:: microp_scheme - logical,pointer:: config_tempo_aerosolaware, config_tempo_hailaware + logical,pointer:: config_tempo_aerosolaware,config_tempo_hailaware !CCPP-compliant flags: character(len=StrKIND):: errmsg @@ -476,7 +478,6 @@ subroutine driver_microphysics(configs,mesh,state,time_lev,diag,diag_physics,ten call mpas_timer_stop('mp_kessler') case ("mp_tempo") - if (allocated(nwfa_p) .and. allocated(nwfa2d_p)) then call tempo_aerosol_surface_emissions(dt=dt_microp, nwfa=nwfa_p, nwfa2d=nwfa2d_p, & ims=ims, ime=ime, jms=jms, jme=jme, kms=kms, kme=kme, kts=kts) @@ -516,11 +517,8 @@ subroutine driver_microphysics(configs,mesh,state,time_lev,diag,diag_physics,ten tempo_driver_diags%snow_liquid_equiv_precip(i,j) + & tempo_driver_diags%graupel_liquid_equiv_precip(i,j) sr_p(i,j) = tempo_driver_diags%frozen_fraction(i,j) - !frainnc_p = frainnc_p + tempo_driver_diags%frz_rain_precip - !max_hail_diameter_sfc_p = tempo_driver_diags%max_hail_diameter_sfc - !max_hail_diameter_column_p = tempo_driver_diags%max_hail_diameter_column do k = kts, kte - !refl10cm_p = tempo_driver_diags%refl10cm + refl10cm_p(i,k,j) = tempo_driver_diags%refl10cm(i,k,j) recloud_p(i,k,j) = tempo_driver_diags%re_cloud(i,k,j) reice_p(i,k,j) = tempo_driver_diags%re_ice(i,k,j) resnow_p(i,k,j) = tempo_driver_diags%re_snow(i,k,j) diff --git a/src/core_atmosphere/physics/mpas_atmphys_init_microphysics.F b/src/core_atmosphere/physics/mpas_atmphys_init_microphysics.F index dfc4536b61..17eb28c80f 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_init_microphysics.F +++ b/src/core_atmosphere/physics/mpas_atmphys_init_microphysics.F @@ -342,6 +342,7 @@ subroutine init_tempo_aerosols_forMPAS(do_restart,dminfo,mesh,state,time_lev,dia else h_01 = 0.8*cos(hgt(1,iCell)*0.001 - 1.0) endif + ! naCCN1 and naCCN0 are defined in module_mp_thompson and will be used here for now niCCN3 = -1.0*ALOG(naCCN1/naCCN0)/h_01 nwfa(1,iCell) = naCCN1+naCCN0*exp(-((hgt(2,iCell)-hgt(1,iCell))/1000.)*niCCN3) do k = 2, nVertLevels @@ -373,6 +374,7 @@ subroutine init_tempo_aerosols_forMPAS(do_restart,dminfo,mesh,state,time_lev,dia else h_01 = 0.8*cos(hgt(1,iCell)*0.001 - 1.0) endif + ! naIN0 and naIN1 are defined in module_mp_thompson and will be used here for now niIN3 = -1.0*ALOG(naIN1/naIN0)/h_01 nifa(1,iCell) = naIN1+naIN0*exp(-((hgt(2,iCell)-hgt(1,iCell))/1000.)*niIN3) do k = 2, nVertLevels diff --git a/src/core_atmosphere/physics/mpas_atmphys_interface.F b/src/core_atmosphere/physics/mpas_atmphys_interface.F index d5e89990c5..bc2cbaffc2 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_interface.F +++ b/src/core_atmosphere/physics/mpas_atmphys_interface.F @@ -78,14 +78,13 @@ subroutine allocate_forall_physics(configs) !local pointers: character(len=StrKIND),pointer:: microp_scheme,pbl_scheme - logical,pointer:: config_tempo_aerosolaware, config_tempo_hailaware + logical,pointer:: config_tempo_aerosolaware !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) call mpas_pool_get_config(configs,'config_pbl_scheme' ,pbl_scheme ) call mpas_pool_get_config(configs,'config_tempo_aerosolaware', config_tempo_aerosolaware) - call mpas_pool_get_config(configs,'config_tempo_hailaware', config_tempo_hailaware) if(.not.allocated(psfc_p) ) allocate(psfc_p(ims:ime,jms:jme) ) if(.not.allocated(ptop_p) ) allocate(ptop_p(ims:ime,jms:jme) ) @@ -125,16 +124,10 @@ subroutine allocate_forall_physics(configs) case("mp_tempo") if(config_tempo_aerosolaware) then - if(.not.allocated(nc_p)) allocate(nc_p(ims:ime,kms:kme,jms:jme)) if(.not.allocated(nifa_p)) allocate(nifa_p(ims:ime,kms:kme,jms:jme)) if(.not.allocated(nwfa_p)) allocate(nwfa_p(ims:ime,kms:kme,jms:jme)) endif - if(config_tempo_hailaware) then - if(.not.allocated(ng_p)) allocate(ng_p(ims:ime,kms:kme,jms:jme)) - if(.not.allocated(volg_p)) allocate(volg_p(ims:ime,kms:kme,jms:jme)) - endif - case default end select microp_select @@ -168,14 +161,13 @@ subroutine deallocate_forall_physics(configs) !local pointers: character(len=StrKIND),pointer:: microp_scheme,pbl_scheme - logical,pointer:: config_tempo_aerosolaware, config_tempo_hailaware + logical,pointer:: config_tempo_aerosolaware !----------------------------------------------------------------------------------------------------------------- call mpas_pool_get_config(configs,'config_microp_scheme',microp_scheme) call mpas_pool_get_config(configs,'config_pbl_scheme' ,pbl_scheme ) call mpas_pool_get_config(configs,'config_tempo_aerosolaware', config_tempo_aerosolaware) - call mpas_pool_get_config(configs,'config_tempo_hailaware', config_tempo_hailaware) if(allocated(psfc_p) ) deallocate(psfc_p ) if(allocated(ptop_p) ) deallocate(ptop_p ) @@ -215,16 +207,10 @@ subroutine deallocate_forall_physics(configs) case("mp_tempo") if(config_tempo_aerosolaware) then - if(allocated(nc_p)) deallocate(nc_p) if(allocated(nifa_p)) deallocate(nifa_p) if(allocated(nwfa_p)) deallocate(nwfa_p) endif - if(config_tempo_hailaware) then - if(allocated(ng_p)) deallocate(ng_p) - if(allocated(volg_p)) deallocate(volg_p) - endif - case default end select microp_select @@ -395,19 +381,15 @@ subroutine MPAS_to_physics(configs,mesh,state,time_lev,diag,diag_physics,its,ite case("mp_tempo") if(config_tempo_aerosolaware) then - nullify(nc) nullify(nifa) nullify(nwfa) - call mpas_pool_get_dimension(state,'index_nc',index_nc) call mpas_pool_get_dimension(state,'index_nifa',index_nifa) call mpas_pool_get_dimension(state,'index_nwfa',index_nwfa) - nc => scalars(index_nc,:,:) nifa => scalars(index_nifa,:,:) nwfa => scalars(index_nwfa,:,:) do j = jts,jte do k = kts,kte do i = its,ite - nc_p(i,k,j) = max(0.,nc(k,i)) nifa_p(i,k,j) = max(0.,nifa(k,i)) nwfa_p(i,k,j) = max(0.,nwfa(k,i)) enddo @@ -415,23 +397,6 @@ subroutine MPAS_to_physics(configs,mesh,state,time_lev,diag,diag_physics,its,ite enddo endif - if(config_tempo_hailaware) then - nullify(ng) - nullify(volg) - call mpas_pool_get_dimension(state,'index_ng',index_ng) - call mpas_pool_get_dimension(state,'index_volg',index_volg) - ng => scalars(index_ng,:,:) - volg => scalars(index_volg,:,:) - do j = jts,jte - do k = kts,kte - do i = its,ite - ng_p(i,k,j) = max(0.,ng(k,i)) - volg_p(i,k,j) = max(0.,volg(k,i)) - enddo - enddo - enddo - endif - case default end select microp_select @@ -641,7 +606,7 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, integer,pointer:: index_qv,index_qc,index_qr,index_qi,index_qs,index_qg integer,pointer:: index_nc,index_ni,index_nr,index_nifa,index_nwfa integer,pointer:: index_ng,index_volg - logical,pointer:: config_tempo_aerosolaware, config_tempo_hailaware + logical,pointer:: config_tempo_aerosolaware,config_tempo_hailaware real(kind=RKIND),dimension(:),pointer :: nifa2d,nwfa2d,nt_c,mu_c real(kind=RKIND),dimension(:,:),pointer :: zgrid,w real(kind=RKIND),dimension(:,:),pointer :: zz,exner,pressure_b @@ -650,6 +615,7 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, real(kind=RKIND),dimension(:,:),pointer :: nc,ni,nr,nifa,nwfa real(kind=RKIND),dimension(:,:),pointer :: ng,volg real(kind=RKIND),dimension(:,:),pointer :: rainprod,evapprod + real(kind=RKIND),dimension(:,:),pointer :: refl10cm real(kind=RKIND),dimension(:,:),pointer :: re_cloud,re_ice,re_snow real(kind=RKIND),dimension(:,:),pointer :: rthmpten,rqvmpten,rqcmpten,rqrmpten,rqimpten,rqsmpten,rqgmpten real(kind=RKIND),dimension(:,:),pointer :: rncmpten,rnimpten,rnrmpten,rnifampten,rnwfampten @@ -746,6 +712,7 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, call mpas_pool_get_array(diag_physics,'re_cloud',re_cloud) call mpas_pool_get_array(diag_physics,'re_ice' ,re_ice ) call mpas_pool_get_array(diag_physics,'re_snow' ,re_snow ) + call mpas_pool_get_array(diag_physics,'refl10cm',refl10cm) qi => scalars(index_qi,:,:) qs => scalars(index_qs,:,:) @@ -765,6 +732,7 @@ subroutine microphysics_from_MPAS(configs,mesh,state,time_lev,diag,diag_physics, recloud_p(i,k,j) = re_cloud(k,i) reice_p(i,k,j) = re_ice(k,i) resnow_p(i,k,j) = re_snow(k,i) + refl10cm_p(i,k,j) = refl10cm(k,i) enddo enddo enddo @@ -1137,6 +1105,7 @@ subroutine microphysics_to_MPAS(configs,mesh,state,time_lev,diag,diag_physics,te re_cloud(k,i) = recloud_p(i,k,j) re_ice(k,i) = reice_p(i,k,j) re_snow(k,i) = resnow_p(i,k,j) + refl10cm(k,i) = refl10cm_p(i,k,j) enddo enddo enddo diff --git a/src/core_atmosphere/physics/mpas_atmphys_vars.F b/src/core_atmosphere/physics/mpas_atmphys_vars.F index 44e5edd78b..cf81b19ca7 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_vars.F +++ b/src/core_atmosphere/physics/mpas_atmphys_vars.F @@ -286,7 +286,8 @@ module mpas_atmphys_vars evapprod_p, &! recloud_p, &! reice_p, &! - resnow_p ! + resnow_p &! + refl10cm_p !... for Thompson cloud microphysics parameterization, including aerosol-aware option: real(kind=RKIND),dimension(:,:),allocatable:: & From 91f069951b2cdc3e83b35347516d4b43b5ac4743 Mon Sep 17 00:00:00 2001 From: AndersJensen-NOAA Date: Thu, 5 Feb 2026 16:58:54 +0000 Subject: [PATCH 15/15] add missing comma --- src/core_atmosphere/physics/mpas_atmphys_vars.F | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core_atmosphere/physics/mpas_atmphys_vars.F b/src/core_atmosphere/physics/mpas_atmphys_vars.F index cf81b19ca7..dfc302ff45 100644 --- a/src/core_atmosphere/physics/mpas_atmphys_vars.F +++ b/src/core_atmosphere/physics/mpas_atmphys_vars.F @@ -286,7 +286,7 @@ module mpas_atmphys_vars evapprod_p, &! recloud_p, &! reice_p, &! - resnow_p &! + resnow_p, &! refl10cm_p !... for Thompson cloud microphysics parameterization, including aerosol-aware option: