Skip to content

Commit 8b5b5da

Browse files
committed
move calculation of av_i
1 parent 451fd82 commit 8b5b5da

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

physics/MP/Thompson/module_mp_thompson.F90

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,9 +479,6 @@ subroutine thompson_init(is_aerosol_aware_in, &
479479

480480
lsub = lvap0 + lfus
481481
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)
485482

486483
! Set module variable is_aerosol_aware/merra2_aerosol_aware
487484
is_aerosol_aware = is_aerosol_aware_in

physics/MP/Thompson/mp_thompson.F90

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ subroutine mp_thompson_init(ncol, nlev, con_pi, con_t0c, con_rv, &
4848
is_initialized, errmsg, errflg)
4949
use module_mp_thompson, only : PI, T_0, Rv, R, RoverRv, Cp
5050
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
51+
use module_mp_thompson, only : av_i, av_s, D0s, bv_s, bv_i
52+
use module_mp_thompson, only : nt_c_l, nt_c_o, xnc_max, ssati_min, Nt_i_max, rr_min
5253

5354
implicit none
5455

@@ -134,6 +135,15 @@ subroutine mp_thompson_init(ncol, nlev, con_pi, con_t0c, con_rv, &
134135

135136
if (present(con_nt_c_l)) nt_c_l = con_nt_c_l
136137
if (present(con_nt_c_o)) nt_c_o = con_nt_c_o
138+
if (present(con_av_i)) then
139+
if (con_av_i > 0.) then
140+
av_i = con_av_i
141+
else
142+
av_i = av_s * D0s ** (bv_s - bv_i) ! Transition value of coefficient matching at crossover from cloud ice to snow
143+
end if
144+
else
145+
av_i = av_s * D0s ** (bv_s - bv_i) ! Transition value of coefficient matching at crossover from cloud ice to snow
146+
end if
137147
if (present(con_xnc_max)) xnc_max = con_xnc_max
138148
if (present(con_ssati_min)) ssati_min = con_ssati_min
139149
if (present(con_Nt_i_max)) Nt_i_max = con_Nt_i_max
@@ -167,9 +177,6 @@ subroutine mp_thompson_init(ncol, nlev, con_pi, con_t0c, con_rv, &
167177
threads=threads, errmsg=errmsg, errflg=errflg)
168178
if (errflg /= 0) return
169179

170-
! override the value of av_i with the constant value
171-
if (present(con_av_i)) av_i = con_av_i
172-
173180
! For restart runs, the init is done here
174181
if (restart) then
175182
is_initialized = .true.

0 commit comments

Comments
 (0)