diff --git a/src/core_atmosphere/Externals.cfg b/src/core_atmosphere/Externals.cfg
index 84dc47d1d8..3302c16fde 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
+[TEMPO_MP]
+local_path = ./physics_noaa/TEMPO
+protocol = git
+repo_url = https://github.com/NCAR/TEMPO.git
+tag = tempo_v3.0.0
+required = True
+
[externals_description]
schema_version = 1.0.0
diff --git a/src/core_atmosphere/Registry.xml b/src/core_atmosphere/Registry.xml
index 4281c40bba..c9075d6903 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,51 @@
+ 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 +1998,51 @@
+ 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 +2082,51 @@
units="kg kg^{-1} s^{-1}"
description="Lateral boundary tendency of water vapor mixing ratio"/>
-
-
-
-
-
-
-
+
+
+
+
-
-
-
@@ -2258,7 +2285,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 +3477,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 +3912,23 @@
units="kg kg^{-1}"
description="Water vapor mixing ratio increment"/>
-
-
-
-
-
@@ -3916,5 +3943,6 @@
#ifdef DO_PHYSICS
#include "physics/Registry_noahmp.xml"
+#include "physics/Registry_tempo.xml"
#endif
diff --git a/src/core_atmosphere/physics/Makefile b/src/core_atmosphere/physics/Makefile
index 75eec25931..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
+ $(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 ******"
@@ -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
@@ -262,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_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 bbc78b8ed2..96d7b0a9ec 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_run, &
+ ty_tempo_driver_diags, tempo_aerosol_surface_emissions
implicit none
private
@@ -89,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
@@ -103,10 +106,13 @@ subroutine allocate_microphysics(configs)
!local pointers:
character(len=StrKIND),pointer:: microp_scheme
+ 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) )
@@ -149,6 +155,41 @@ 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))
+
+ 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))
+ 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) )
+ 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))
@@ -184,11 +225,14 @@ subroutine deallocate_microphysics(configs)
!local pointers:
character(len=StrKIND),pointer:: microp_scheme
+ 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 )
@@ -230,6 +274,41 @@ 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)
+
+ 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)
+ 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 )
+ 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)
@@ -274,6 +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
!CCPP-compliant flags:
character(len=StrKIND):: errmsg
@@ -289,12 +369,22 @@ 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")
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, &
+ 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)
@@ -339,11 +429,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:')
@@ -384,6 +477,58 @@ 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 , &
+ 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)
+ do k = kts, kte
+ 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)
+ enddo
+ enddo
+ enddo
+ istep = istep + 1
+ enddo
+ call mpas_timer_stop('mp_tempo')
+
case ("mp_thompson")
call mpas_timer_start('mp_thompson')
istep = 1
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 )
diff --git a/src/core_atmosphere/physics/mpas_atmphys_init_microphysics.F b/src/core_atmosphere/physics/mpas_atmphys_init_microphysics.F
index f2a75d6c90..17eb28c80f 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,161 @@ 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
+ ! 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
+ 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
+ ! 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
+ 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)
!=================================================================================================================
diff --git a/src/core_atmosphere/physics/mpas_atmphys_interface.F b/src/core_atmosphere/physics/mpas_atmphys_interface.F
index 71e46dfcd2..bc2cbaffc2 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,12 @@ 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(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 +161,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 +205,12 @@ 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(nifa_p)) deallocate(nifa_p)
+ if(allocated(nwfa_p)) deallocate(nwfa_p)
+ endif
+
case default
end select microp_select
@@ -236,9 +252,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, 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
@@ -248,6 +266,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:
@@ -270,6 +289,8 @@ 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_config(configs,'config_tempo_hailaware', config_tempo_hailaware)
call mpas_pool_get_array(mesh,'latCell',latCell)
call mpas_pool_get_array(mesh,'lonCell',lonCell)
@@ -358,6 +379,24 @@ 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(nifa)
+ nullify(nwfa)
+ call mpas_pool_get_dimension(state,'index_nifa',index_nifa)
+ call mpas_pool_get_dimension(state,'index_nwfa',index_nwfa)
+ nifa => scalars(index_nifa,:,:)
+ nwfa => scalars(index_nwfa,:,:)
+ do j = jts,jte
+ do k = kts,kte
+ do i = its,ite
+ 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,13 +605,17 @@ 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
+ 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 :: 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
@@ -584,6 +627,8 @@ 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 )
@@ -657,6 +702,85 @@ 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)
+ 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_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)
+ resnow_p(i,k,j) = re_snow(k,i)
+ refl10cm_p(i,k,j) = refl10cm(k,i)
+ enddo
+ 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)
@@ -715,7 +839,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 +861,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 +885,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 +934,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
+ 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
@@ -805,6 +945,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
@@ -819,6 +960,8 @@ 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)
@@ -932,6 +1075,86 @@ 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)
+ 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)
+ re_snow(k,i) = resnow_p(i,k,j)
+ refl10cm(k,i) = refl10cm_p(i,k,j)
+ enddo
+ 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)
+
+ call mpas_pool_get_array(diag_physics,'nifa2d',nifa2d)
+ call mpas_pool_get_array(diag_physics,'nwfa2d',nwfa2d)
+
+ 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
+
+ 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)
@@ -984,7 +1207,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 +1229,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 +1254,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
diff --git a/src/core_atmosphere/physics/mpas_atmphys_packages.F b/src/core_atmosphere/physics/mpas_atmphys_packages.F
index 5d32cb297e..2c191a1e13 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_aerosolaware,config_tempo_hailaware
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,10 @@ 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) tempo_aerosolaware_in = .true.
+ if(config_tempo_hailaware) tempo_hailaware_in = .true.
elseif(config_microp_scheme == 'mp_wsm6') then
mp_wsm6_in = .true.
endif
@@ -98,6 +119,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_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
diff --git a/src/core_atmosphere/physics/mpas_atmphys_vars.F b/src/core_atmosphere/physics/mpas_atmphys_vars.F
index 134009f537..dfc302ff45 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:: &
@@ -284,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:: &
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"/>
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