Skip to content

Commit d856677

Browse files
committed
make some Thompson tuning parameters externally accessible
1 parent e02eef3 commit d856677

3 files changed

Lines changed: 107 additions & 21 deletions

File tree

physics/MP/Thompson/module_mp_thompson.F90

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,17 @@ module module_mp_thompson
9292
!.. droplet concentration and nu_c is also variable depending on local
9393
!.. droplet number concentration.
9494
!real(wp), parameter :: Nt_c = 100.e6
95-
real(wp), parameter :: Nt_c_o = 50.e6
96-
real(wp), parameter :: Nt_c_l = 150.e6
9795
real(wp), parameter, private :: Nt_c_max = 1999.e6
9896

97+
! Tuning parameters
98+
real(wp) :: Nt_c_l = 150.e6 ! Cloud number concentration over land (set in thompson_init)
99+
real(wp) :: Nt_c_o = 50.e6 ! Cloud number concentration over ocean (set in thompson_init)
100+
real(wp) :: av_i
101+
real(wp) :: xnc_max = 1000.e3
102+
real(wp) :: ssati_min = 0.15
103+
real(wp) :: Nt_i_max = 4999.e3_dp
104+
real(wp) :: rr_min = 1000.0
105+
99106
!..Declaration of constants for assumed CCN/IN aerosols when none in
100107
!.. the input data. Look inside the init routine for modifications
101108
!.. due to surface land-sea points or vegetation characteristics.
@@ -456,7 +463,7 @@ subroutine thompson_init(is_aerosol_aware_in, &
456463
logical:: micro_init
457464
real(wp) :: stime, etime
458465
logical, parameter :: precomputed_tables = .FALSE.
459-
466+
460467
! Set module derived constants
461468
am_r = PI*rho_w/6.0
462469
am_g = PI*rho_g/6.0
@@ -472,6 +479,9 @@ subroutine thompson_init(is_aerosol_aware_in, &
472479

473480
lsub = lvap0 + lfus
474481
olfus = 1./lfus
482+
483+
! Transition value of coefficient matching at crossover from cloud ice to snow
484+
av_i = av_s * D0s ** (bv_s - bv_i)
475485

476486
! Set module variable is_aerosol_aware/merra2_aerosol_aware
477487
is_aerosol_aware = is_aerosol_aware_in
@@ -2017,7 +2027,6 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
20172027
real(wp) :: Ef_ra, Ef_sa, Ef_ga
20182028
real(wp) :: dtsave, odts, odt, odzq, hgt_agl, SR
20192029
real(wp) :: xslw1, ygra1, zans1, eva_factor
2020-
real(wp) av_i
20212030
integer :: i, k, k2, n, nn, nstep, k_0, kbot, IT, iexfrq
20222031
integer, dimension(5) :: ksed1
20232032
integer :: nir, nis, nig, nii, nic, niin
@@ -2042,8 +2051,6 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
20422051
odt = 1./dt
20432052
odts = 1./dtsave
20442053
iexfrq = 1
2045-
! Transition value of coefficient matching at crossover from cloud ice to snow
2046-
av_i = av_s * D0s ** (bv_s - bv_i)
20472054

20482055
!+---+-----------------------------------------------------------------+
20492056
!> - Initialize Source/sink terms. First 2 chars: "pr" represents source/sink of
@@ -2269,15 +2276,15 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
22692276
ni(k) = max(R2, ni1d(k)*rho(k))
22702277
if (ni(k).le. R2) then
22712278
lami = cie(2)/5.E-6
2272-
ni(k) = min(4999.e3_dp, cig(1)*oig2*ri(k)/am_i*lami**bm_i)
2279+
ni(k) = min(Nt_i_max, cig(1)*oig2*ri(k)/am_i*lami**bm_i)
22732280
endif
22742281
L_qi(k) = .true.
22752282
lami = (am_i*cig(2)*oig1*ni(k)/ri(k))**obmi
22762283
ilami = 1./lami
22772284
xDi = (bm_i + mu_i + 1.) * ilami
22782285
if (xDi.lt. 5.E-6) then
22792286
lami = cie(2)/5.E-6
2280-
ni(k) = min(4999.e3_dp, cig(1)*oig2*ri(k)/am_i*lami**bm_i)
2287+
ni(k) = min(Nt_i_max, cig(1)*oig2*ri(k)/am_i*lami**bm_i)
22812288
elseif (xDi.gt. 300.E-6) then
22822289
lami = cie(2)/300.E-6
22832290
ni(k) = cig(1)*oig2*ri(k)/am_i*lami**bm_i
@@ -2933,13 +2940,13 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
29332940

29342941
!> - Deposition nucleation of dust/mineral from DeMott et al (2010)
29352942
!! we may need to relax the temperature and ssati constraints.
2936-
if ( (ssati(k).ge. 0.15) .or. (ssatw(k).gt. eps &
2943+
if ( (ssati(k).ge. ssati_min) .or. (ssatw(k).gt. eps &
29372944
.and. temp(k).lt.253.15) ) then
29382945
if (dustyIce .AND. (is_aerosol_aware .or. merra2_aerosol_aware)) then
29392946
xnc = iceDeMott(tempc,qv(k),qvs(k),qvsi(k),rho(k),nifa(k))
29402947
xnc = xnc*(1.0 + 50.*rand3)
29412948
else
2942-
xnc = min(1000.E3, TNO*EXP(ATO*(T_0-temp(k))))
2949+
xnc = min(xnc_max, TNO*EXP(ATO*(T_0-temp(k))))
29432950
endif
29442951
xni = ni(k) + (pni_rfz(k)+pni_wfz(k))*dtsave
29452952
pni_inu(k) = 0.5*(xnc-xni + abs(xnc-xni))*odts
@@ -2949,7 +2956,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
29492956

29502957
!> - Freezing of aqueous aerosols based on Koop et al (2001, Nature)
29512958
xni = smo0(k)+ni(k) + (pni_rfz(k)+pni_wfz(k)+pni_inu(k))*dtsave
2952-
if ((is_aerosol_aware .or. merra2_aerosol_aware) .AND. homogIce .AND. (xni.le.4999.E3) &
2959+
if ((is_aerosol_aware .or. merra2_aerosol_aware) .AND. homogIce .AND. (xni.le.Nt_i_max) &
29532960
.AND.(temp(k).lt.238).AND.(ssati(k).ge.0.4) ) then
29542961
xnc = iceKoop(temp(k),qv(k),qvs(k),nwfa(k), dtsave)
29552962
pni_iha(k) = xnc*odts
@@ -3282,7 +3289,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
32823289
xDi = (bm_i + mu_i + 1.) * ilami
32833290
if (xDi.lt. 5.E-6) then
32843291
lami = cie(2)/5.E-6
3285-
xni = min(4999.e3_dp, cig(1)*oig2*xri/am_i*lami**bm_i)
3292+
xni = min(Nt_i_max, cig(1)*oig2*xri/am_i*lami**bm_i)
32863293
niten(k) = (xni-ni1d(k)*rho(k))*odts*orho
32873294
elseif (xDi.gt. 300.E-6) then
32883295
lami = cie(2)/300.E-6
@@ -3293,8 +3300,8 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
32933300
niten(k) = -ni1d(k)*odts
32943301
endif
32953302
xni=max(0.,(ni1d(k) + niten(k)*dtsave)*rho(k))
3296-
if (xni.gt.4999.E3) &
3297-
niten(k) = (4999.E3-ni1d(k)*rho(k))*odts*orho
3303+
if (xni.gt.Nt_i_max) &
3304+
niten(k) = (Nt_i_max-ni1d(k)*rho(k))*odts*orho
32983305

32993306
!> - Rain tendency
33003307
qrten(k) = qrten(k) + (prr_wau(k) + prr_rcw(k) &
@@ -3977,7 +3984,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
39773984
pfll1(k) = pfll1(k) + sed_r(k)*DT*onstep(1)
39783985
enddo
39793986

3980-
if (rr(kts).gt.R1*1000.) then
3987+
if (rr(kts).gt.R1*rr_min) then
39813988
pptrain = pptrain + sed_r(kts)*DT*onstep(1)
39823989
endif
39833990
enddo
@@ -4072,7 +4079,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
40724079
pfil1(k) = pfil1(k) + sed_i(k)*DT*onstep(2)
40734080
enddo
40744081

4075-
if (ri(kts).gt.R1*1000.) then
4082+
if (ri(kts).gt.R1*rr_min) then
40764083
pptice = pptice + sed_i(kts)*DT*onstep(2)
40774084
endif
40784085
enddo
@@ -4102,7 +4109,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
41024109
pfil1(k) = pfil1(k) + sed_s(k)*DT*onstep(3)
41034110
enddo
41044111

4105-
if (rs(kts).gt.R1*1000.) then
4112+
if (rs(kts).gt.R1*rr_min) then
41064113
pptsnow = pptsnow + sed_s(kts)*DT*onstep(3)
41074114
endif
41084115
enddo
@@ -4133,7 +4140,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
41334140
pfil1(k) = pfil1(k) + sed_g(k)*DT*onstep(4)
41344141
enddo
41354142

4136-
if (rg(kts).gt.R1*1000.) then
4143+
if (rg(kts).gt.R1*rr_min) then
41374144
pptgraul = pptgraul + sed_g(kts)*DT*onstep(4)
41384145
endif
41394146
enddo
@@ -4261,7 +4268,7 @@ subroutine mp_thompson (qv1d, qc1d, qi1d, qr1d, qs1d, qg1d, ni1d, &
42614268
lami = cie(2)/300.E-6
42624269
endif
42634270
ni1d(k) = min(cig(1)*oig2*qi1d(k)/am_i*lami**bm_i, &
4264-
4999.e3_dp/rho(k))
4271+
Nt_i_max/rho(k))
42654272
endif
42664273
qr1d(k) = qr1d(k) + qrten(k)*DT
42674274
nr1d(k) = max(R2/rho(k), nr1d(k) + nrten(k)*DT)

physics/MP/Thompson/mp_thompson.F90

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ module mp_thompson
1111
use machine, only : kind_phys
1212

1313
use module_mp_thompson, only : thompson_init, mp_gt_driver, thompson_finalize, calc_effectRad
14-
use module_mp_thompson, only : naIN0, naIN1, naCCN0, naCCN1, eps, Nt_c_l, Nt_c_o
14+
use module_mp_thompson, only : naIN0, naIN1, naCCN0, naCCN1, eps
1515
use module_mp_thompson, only : re_qc_min, re_qc_max, re_qi_min, re_qi_max, re_qs_min, re_qs_max
1616

1717
use module_mp_thompson_make_number_concentrations, only: make_IceNumber, make_DropletNumber, make_RainNumber
@@ -34,6 +34,9 @@ subroutine mp_thompson_init(ncol, nlev, con_pi, con_t0c, con_rv, &
3434
con_cp, con_rgas, con_boltz, con_amd, &
3535
con_amw, con_avgd, con_hvap, con_hfus, &
3636
con_g, con_rd, con_eps, &
37+
con_Nt_c_l, con_Nt_c_o, con_av_i, &
38+
con_xnc_max, con_ssati_min, con_Nt_i_max,&
39+
con_rr_min, &
3740
restart, imp_physics, &
3841
imp_physics_thompson, convert_dry_rho, &
3942
spechum, qc, qr, qi, qs, qg, ni, nr, &
@@ -45,6 +48,7 @@ subroutine mp_thompson_init(ncol, nlev, con_pi, con_t0c, con_rv, &
4548
is_initialized, errmsg, errflg)
4649
use module_mp_thompson, only : PI, T_0, Rv, R, RoverRv, Cp
4750
use module_mp_thompson, only : R_uni, k_b, M_w, M_a, N_avo, lvap0, lfus
51+
use module_mp_thompson, only : nt_c_l, nt_c_o, av_i, xnc_max, ssati_min, Nt_i_max, rr_min
4852

4953
implicit none
5054

@@ -54,6 +58,8 @@ subroutine mp_thompson_init(ncol, nlev, con_pi, con_t0c, con_rv, &
5458
real(kind_phys), intent(in ) :: con_pi, con_t0c, con_rv, con_cp, con_rgas, &
5559
con_boltz, con_amd, con_amw, con_avgd, &
5660
con_hvap, con_hfus, con_g, con_rd, con_eps
61+
real(kind_phys), optional, intent(in ) :: con_Nt_c_l, con_Nt_c_o, con_av_i, con_xnc_max, &
62+
con_ssati_min, con_Nt_i_max, con_rr_min
5763
logical, intent(in ) :: restart
5864
logical, intent(inout) :: is_initialized
5965
integer, intent(in ) :: imp_physics
@@ -126,6 +132,13 @@ subroutine mp_thompson_init(ncol, nlev, con_pi, con_t0c, con_rv, &
126132
lvap0 = con_hvap
127133
lfus = con_hfus
128134

135+
if (present(con_nt_c_l)) nt_c_l = con_nt_c_l
136+
if (present(con_nt_c_o)) nt_c_o = con_nt_c_o
137+
if (present(con_xnc_max)) xnc_max = con_xnc_max
138+
if (present(con_ssati_min)) ssati_min = con_ssati_min
139+
if (present(con_Nt_i_max)) Nt_i_max = con_Nt_i_max
140+
if (present(con_rr_min)) rr_min = con_rr_min
141+
129142
! Consistency checks
130143
if (imp_physics/=imp_physics_thompson) then
131144
write(errmsg,'(*(a))') "Logic error: namelist choice of microphysics is different from Thompson MP"
@@ -153,7 +166,10 @@ subroutine mp_thompson_init(ncol, nlev, con_pi, con_t0c, con_rv, &
153166
mpicomm=mpicomm, mpirank=mpirank, mpiroot=mpiroot, &
154167
threads=threads, errmsg=errmsg, errflg=errflg)
155168
if (errflg /= 0) return
156-
169+
170+
! override the value of av_i with the constant value
171+
if (present(con_av_i)) av_i = con_av_i
172+
157173
! For restart runs, the init is done here
158174
if (restart) then
159175
is_initialized = .true.

physics/MP/Thompson/mp_thompson.meta

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,69 @@
135135
type = real
136136
kind = kind_phys
137137
intent = in
138+
[con_Nt_c_l]
139+
standard_name = prescribed_number_concentration_of_cloud_liquid_water_particles_in_air_over_land
140+
long_name = volumetric number concentration of cloud liquid water droplets in air over land points
141+
units = m-3
142+
dimensions = ()
143+
type = real
144+
kind = kind_phys
145+
intent = in
146+
optional = True
147+
[con_Nt_c_o]
148+
standard_name = prescribed_number_concentration_of_cloud_liquid_water_particles_in_air_over_ocean
149+
long_name = volumetric number concentration of cloud liquid water droplets in air over ocean points
150+
units = m-3
151+
dimensions = ()
152+
type = real
153+
kind = kind_phys
154+
intent = in
155+
optional = True
156+
[con_av_i]
157+
standard_name = cloud_ice_to_snow_tuning_parameter
158+
long_name = transition value of coefficient matching at crossover from cloud ice to snow
159+
units = 1
160+
dimensions = ()
161+
type = real
162+
kind = kind_phys
163+
intent = in
164+
optional = True
165+
[con_xncmax]
166+
standard_name = maximum_mass_number_concentration_of_cloud_liquid_water_particles_in_air_used_in_deposition_nucleation
167+
long_name = maximum mass number concentration of cloud liquid water particles in air
168+
units = kg-1
169+
dimensions = ()
170+
type = real
171+
kind = kind_phys
172+
intent = in
173+
optional = True
174+
[con_ssati_min]
175+
standard_name = minimum_threshold_supersaturation_over_ice_for_deposition_nucleation
176+
long_name = minimum supersaturation over ice threshold for deposition nucleation
177+
units = fraction
178+
dimensions = ()
179+
type = real
180+
kind = kind_phys
181+
intent = in
182+
optional = True
183+
[con_Nt_i_max]
184+
standard_name = maximum_threshold_number_concentration_of_cloud_ice_water_crystals_in_air
185+
long_name = maximum threshold number concentration of cloud ice water crystals in air
186+
units = m-3
187+
dimensions = ()
188+
type = real
189+
kind = kind_phys
190+
intent = in
191+
optional = True
192+
[con_rr_min]
193+
standard_name = multiplicative_tuning_parameter_for_microphysical_sedimentation_minimum_threshold
194+
long_name = multiplicative tuning parameter for microphysical sedimentation minimum threshold
195+
units = 1
196+
dimensions = ()
197+
type = real
198+
kind = kind_phys
199+
intent = in
200+
optional = True
138201
[restart]
139202
standard_name = flag_for_restart
140203
long_name = flag for restart (warmstart) or coldstart

0 commit comments

Comments
 (0)