Skip to content

Commit

Permalink
Revert changes to thompson mp schemes to using native, non TEMPO, int…
Browse files Browse the repository at this point in the history
…rinsics.
  • Loading branch information
dustinswales committed Aug 27, 2024
1 parent fe8b6da commit eef9874
Show file tree
Hide file tree
Showing 9 changed files with 26 additions and 31 deletions.
14 changes: 7 additions & 7 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,12 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
use surface_perturbation, only: cdfnor,ppfbet

! For Thompson MP
use module_mp_thompson_params, only: Nt_c_l, Nt_c_o, &
use module_mp_thompson, only: calc_effectRad, &
Nt_c_l, Nt_c_o, &
re_qc_min, re_qc_max, &
re_qi_min, re_qi_max, &
re_qs_min, re_qs_max, configs
use module_mp_thompson_utils, only: calc_effectRad, &
re_qs_min, re_qs_max
use module_mp_thompson_make_number_concentrations, only: &
make_IceNumber, &
make_DropletNumber, &
make_RainNumber
Expand Down Expand Up @@ -899,10 +900,9 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, lextop,&
!tgs: progclduni has different limits for ice radii (10.0-150.0) than
! calc_effectRad (4.99-125.0 for WRFv3.8.1; 2.49-125.0 for WRFv4+)
! it will raise the low limit from 5 to 10, but the high limit will remain 125.
call calc_effectRad (t1d=tlyr(i,:), p1d=plyr(i,:)*100., qv1d=qv_mp(i,:), qc1d=qc_mp(i,:), &
nc1d=nc_mp(i,:), qi1d=qi_mp(i,:), ni1d=ni_mp(i,:), qs1d=qs_mp(i,:), &
re_qc1d=effrl(i,:), re_qi1d=effri(i,:), re_qs1d=effrs(i,:), kts=1, kte=lm, &
lsml=islmsk, configs=configs )
call calc_effectRad (tlyr(i,:), plyr(i,:)*100., qv_mp(i,:), qc_mp(i,:), &
nc_mp(i,:), qi_mp(i,:), ni_mp(i,:), qs_mp(i,:), &
effrl(i,:), effri(i,:), effrs(i,:), islmsk, 1, lm )
! Scale Thompson's effective radii from meter to micron
do k=1,lm
effrl(i,k) = MAX(re_qc_min, MIN(effrl(i,k), re_qc_max))*1.e6
Expand Down
2 changes: 1 addition & 1 deletion physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmg_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
type = scheme
relative_path = ../../
dependencies = tools/funcphys.f90,hooks/machine.F
dependencies = MP/TEMPO/tempo/module_mp_thompson_params.F90,MP/TEMPO/tempo/module_mp_thompson_utils.F90
dependencies = MP/Thompson/module_mp_thompson.F90,MP/Thompson/module_mp_thompson_make_number_concentrations.F90
dependencies = Radiation/RRTMG/radcons.f90,Radiation/radiation_aerosols.f
dependencies = Radiation/radiation_astronomy.f,Radiation/radiation_clouds.f,Radiation/radiation_gases.f
dependencies = Radiation/RRTMG/radlw_param.f,Radiation/RRTMG/radsw_param.f,Radiation/radiation_cloud_overlap.F90
Expand Down
19 changes: 8 additions & 11 deletions physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_mp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ module GFS_rrtmgp_cloud_mp
use rrtmgp_lw_cloud_optics, only: &
radliq_lwr => radliq_lwrLW, radliq_upr => radliq_uprLW,&
radice_lwr => radice_lwrLW, radice_upr => radice_uprLW
use module_mp_thompson_utils, only: calc_effectRad, make_IceNumber, &
make_DropletNumber, make_RainNumber
use module_mp_thompson_params, only: Nt_c_l, Nt_c_o, re_qc_min, re_qc_max, &
re_qi_min, re_qi_max, re_qs_min, re_qs_max, configs


use module_mp_thompson, only: calc_effectRad, Nt_c_l, Nt_c_o, re_qc_min, re_qc_max, &
re_qi_min, re_qi_max, re_qs_min, re_qs_max
use module_mp_thompson_make_number_concentrations, only: make_IceNumber, &
make_DropletNumber, make_RainNumber
real (kind_phys), parameter :: &
cld_limit_lower = 0.001, &
cld_limit_ovcst = 1.0 - 1.0e-8, &
Expand Down Expand Up @@ -902,11 +900,10 @@ subroutine cmp_reff_Thompson(nLev, nCol, i_cldliq, i_cldice, i_cldsnow, i_cldice
! Compute effective radii for liquid/ice/snow.
do iCol=1,nCol
ilsmask = nint(lsmask(iCol))
call calc_effectRad (t1d=t_lay(iCol,:), p1d=p_lay(iCol,:), qv1d=qv_mp(iCol,:), qc1d=qc_mp(iCol,:), &
nc1d=nc_mp(iCol,:), qi1d=qi_mp(iCol,:), ni1d=ni_mp(iCol,:), qs1d=qs_mp(iCol,:), &
re_qc1d=re_cloud(iCol,:), re_qi1d=re_ice(iCol,:), re_qs1d=re_snow(iCol,:), kts=1, kte=nLev, &
lsml=ilsmask, configs=configs)

call calc_effectRad (t_lay(iCol,:), p_lay(iCol,:), qv_mp(iCol,:), qc_mp(iCol,:), &
nc_mp(iCol,:), qi_mp(iCol,:), ni_mp(iCol,:), qs_mp(iCol,:), &
re_cloud(iCol,:), re_ice(iCol,:), re_snow(iCol,:), ilsmask, &
1, nLev )
do iLay = 1, nLev
re_cloud(iCol,iLay) = MAX(re_qc_min, MIN(re_cloud(iCol,iLay), re_qc_max))
re_ice(iCol,iLay) = MAX(re_qi_min, MIN(re_ice(iCol,iLay), re_qi_max))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
relative_path = ../../
dependencies = hooks/machine.F
dependencies = Radiation/radiation_tools.F90,Radiation/radiation_clouds.f,Radiation/RRTMGP/rrtmgp_lw_cloud_optics.F90
dependencies = MP/TEMPO/tempo/module_mp_thompson_utils.F90,MP/TEMPO/tempo/module_mp_thompson_params.F90
dependencies = MP/Thompson/module_mp_thompson.F90,photochem/module_ozphys.F90

########################################################################
[ccpp-arg-table]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ subroutine GFS_suite_interstitial_4_run (im, levs, ltaerosol, tracers_total, ntr
qdiag3d, save_lnc, save_inc, ntk, ntke, otsptflag, errmsg, errflg)

use machine, only: kind_phys
use module_mp_thompson_utils, only: make_IceNumber, make_DropletNumber
use module_mp_thompson_make_number_concentrations, only: make_IceNumber, make_DropletNumber

implicit none

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
type = scheme
relative_path = ../../
dependencies = hooks/machine.F
dependencies = MP/TEMPO/module_mp_thompson_utils.F90
dependencies = MP/Thompson/module_mp_thompson_make_number_concentrations.F90

########################################################################
[ccpp-arg-table]
Expand Down
9 changes: 5 additions & 4 deletions physics/MP/Thompson/mp_thompson.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ module mp_thompson
use mpi_f08
use machine, only : kind_phys

use module_mp_thompson_params
use module_mp_thompson_utils
use module_mp_thompson_main
use module_mp_thompson, only : thompson_init, mp_gt_driver, thompson_finalize
use module_mp_thompson, only : thompson_init, mp_gt_driver, thompson_finalize, calc_effectRad
use module_mp_thompson, only : naIN0, naIN1, naCCN0, naCCN1, eps, Nt_c_l, Nt_c_o
use module_mp_thompson, only : re_qc_min, re_qc_max, re_qi_min, re_qi_max, re_qs_min, re_qs_max

use module_mp_thompson_make_number_concentrations, only: make_IceNumber, make_DropletNumber, make_RainNumber

implicit none

Expand Down
5 changes: 1 addition & 4 deletions physics/MP/Thompson/mp_thompson.meta
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
type = scheme
dependencies = ../../hooks/machine.F
dependencies = ../module_mp_radar.F90
dependencies = ../TEMPO/tempo/module_mp_thompson_params.F90
dependencies = ../TEMPO/tempo/module_mp_thompson_main.F90
dependencies = ../TEMPO/tempo/module_mp_thompson_utils.F90
dependencies = ../TEMPO/module_mp_thompson.F90
dependencies = module_mp_thompson.F90,module_mp_thompson_make_number_concentrations.F90

########################################################################
[ccpp-arg-table]
Expand Down
2 changes: 1 addition & 1 deletion physics/Radiation/radiation_clouds.f
Original file line number Diff line number Diff line change
Expand Up @@ -3315,7 +3315,7 @@ SUBROUTINE cal_cldfra3(CLDFRA, qv, qc, qi, qs, dz, &
& modify_qvapor, max_relh, &
& kts,kte, debug_flag)
!
USE module_mp_thompson_utils , ONLY : rsif, rslf
USE module_mp_thompson , ONLY : rsif, rslf
IMPLICIT NONE
!
INTEGER, INTENT(IN):: kts, kte
Expand Down

0 comments on commit eef9874

Please sign in to comment.