Skip to content

Commit

Permalink
mraerosol branch can pass control regression tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AnningCheng-NOAA committed Oct 6, 2021
1 parent 8427992 commit 8a9b8d1
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 23 deletions.
14 changes: 6 additions & 8 deletions physics/module_mp_thompson.F90
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ MODULE module_mp_thompson
LOGICAL, PRIVATE:: merra2_aerosol_aware = .false.
LOGICAL, PARAMETER, PRIVATE:: dustyIce = .true.
LOGICAL, PARAMETER, PRIVATE:: homogIce = .true.
LOGICAL :: merra2_aerosol_aware = .false.

INTEGER, PARAMETER, PRIVATE:: IFDRY = 0
REAL, PARAMETER, PRIVATE:: T_0 = 273.15
Expand Down Expand Up @@ -440,7 +439,7 @@ MODULE module_mp_thompson
!>\section gen_thompson_init thompson_init General Algorithm
!> @{
SUBROUTINE thompson_init(is_aerosol_aware_in, &
merra2_erosol_aware_in, &
merra2_aerosol_aware_in, &
mpicomm, mpirank, mpiroot, &
threads, errmsg, errflg)

Expand Down Expand Up @@ -987,7 +986,6 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
refl_10cm, diagflag, do_radar_ref, &
vt_dbz_wt, first_time_step, &
re_cloud, re_ice, re_snow, &
iccn, iaerclm, &
has_reqc, has_reqi, has_reqs, &
rand_perturb_on, &
kme_stoch, &
Expand Down Expand Up @@ -1028,7 +1026,9 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(IN):: &
pii
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(INOUT):: &
nc, nwfa, nifa
nc
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(INOUT):: &
nwfa, nifa
REAL, DIMENSION(ims:ime, jms:jme), OPTIONAL, INTENT(IN):: nwfa2d, nifa2d
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(INOUT):: &
re_cloud, re_ice, re_snow
Expand All @@ -1054,8 +1054,6 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
REAL, DIMENSION(ims:ime, kms:kme, jms:jme), OPTIONAL, INTENT(INOUT):: &
vt_dbz_wt
LOGICAL, INTENT(IN) :: first_time_step
integer, intent(in ) :: iccn
logical, intent(in ) :: iaerclm

REAL, INTENT(IN):: dt_in, dt_inner
! To support subcycling: current step and maximum number of steps
Expand Down Expand Up @@ -3532,8 +3530,8 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
pnc_wcd(k) = 0.5*(xnc-nc(k) + abs(xnc-nc(k)))*odts*orho

!+---+-----------------------------------------------------------------+ ! EVAPORATION
elseif (clap .lt. -eps .AND. ssatw(k).lt.-1.E-6 .AND.
& (is_aerosol_aware .or. merra_aerosol_aware)) then &
elseif (clap .lt. -eps .AND. ssatw(k).lt.-1.E-6 .AND. &
(is_aerosol_aware .or. merra2_aerosol_aware)) then
tempc = temp(k) - 273.15
otemp = 1./temp(k)
rvs = rho(k)*qvs(k)
Expand Down
27 changes: 14 additions & 13 deletions physics/mp_thompson.F90
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module mp_thompson

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
use module_mp_thompson, only : merra2_aerosol_aware
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
Expand All @@ -28,19 +27,19 @@ module mp_thompson
contains

!> This subroutine is a wrapper around the actual thompson_init().
!! \section arg_table_mp_thompson use module_mp_thompson, only : _init Argument Table
!! \section arg_table_mp_thompson_init Argument Table
!! \htmlinclude mp_thompson_init.html
!!
subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, con_eps, &
restart, imp_physics, &
imp_physics_thompson, convert_dry_rho,&
spechum, qc, qr, qi, qs, qg, ni, nr, &
is_aerosol_aware, merra2_aerosol_aware&
nc, nwfa2d, nifa2d, &
nwfa, nifa, tgrs, prsl, phil, area, &
re_cloud, re_ice, re_snow, aerfld, &
mpicomm, mpirank, mpiroot, &
threads, ext_diag, diag3d, &
subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, con_eps, &
restart, imp_physics, &
imp_physics_thompson, convert_dry_rho, &
spechum, qc, qr, qi, qs, qg, ni, nr, &
is_aerosol_aware, merra2_aerosol_aware,&
nc, nwfa2d, nifa2d, &
nwfa, nifa, tgrs, prsl, phil, area, &
re_cloud, re_ice, re_snow, aerfld, &
mpicomm, mpirank, mpiroot, &
threads, ext_diag, diag3d, &
errmsg, errflg)

implicit none
Expand All @@ -65,6 +64,7 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, con_eps, &
! Aerosols
logical, intent(in ) :: is_aerosol_aware
logical, intent(in ) :: merra2_aerosol_aware

real(kind_phys), optional, intent(inout) :: nc(:,:)
real(kind_phys), optional, intent(inout) :: nwfa(:,:)
real(kind_phys), optional, intent(inout) :: nifa(:,:)
Expand Down Expand Up @@ -125,7 +125,8 @@ subroutine mp_thompson_init(ncol, nlev, con_g, con_rd, con_eps, &

! Call Thompson init
call thompson_init(is_aerosol_aware_in=is_aerosol_aware, &
merra2_aerosol_aware, mpicomm=mpicomm, &
merra2_aerosol_aware_in=merra2_aerosol_aware, &
mpicomm=mpicomm, &
mpirank=mpirank, mpiroot=mpiroot, threads=threads, &
errmsg=errmsg, errflg=errflg)
if (errflg /= 0) return
Expand Down
10 changes: 9 additions & 1 deletion physics/mp_thompson.meta
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@
type = logical
intent = in
optional = F
[merra2_aerosol_aware]
standard_name = flag_for_merra2_aerosol_aware_for_thompson
long_name = flag for merra2 aerosol-aware physics
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[nc]
standard_name = mass_number_concentration_of_cloud_liquid_water_particles_in_air
long_name = cloud droplet number concentration
Expand Down Expand Up @@ -481,7 +489,7 @@
type = logical
intent = in
optional = F
[is_aerosol_aware]
[merra2_aerosol_aware]
standard_name = flag_for_merra2_aerosol_aware_for_thompson
long_name = flag for merra2 aerosol-aware physics
units = flag
Expand Down

0 comments on commit 8a9b8d1

Please sign in to comment.