Skip to content

Commit

Permalink
use 1e-6 as lower threshold for ni and nr (NOAA-EMC#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
RussTreadon-NOAA committed Aug 9, 2024
1 parent 408917e commit 9a3a90d
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/gsi/crtm_interface.f90
Original file line number Diff line number Diff line change
Expand Up @@ -2714,15 +2714,17 @@ subroutine calc_thompson_reff(rho_air,tsen,qxmr,cloud_name,reff)
real(r_kind), parameter :: reff_i_min = 2.5_r_kind ! previous value was 10_r_kind
real(r_kind), parameter :: reff_i_max = 250.0_r_kind ! previous value was 150_r_kind
real(r_kind), parameter:: mu_i = 0.0_r_kind
real(r_kind), parameter:: ni_min = 1.0e-6_r_kind ! minimum number concentration (ccpp-physics)

! Parameters for rain (Lin 1983)
real(r_kind), parameter :: rho_r = 1000.0_r_kind ! [kg/m3 ]
real(r_kind), parameter :: reff_r_min = 50.0_r_kind ! [micron] ! previous value was 0.0_r_kind
real(r_kind), parameter :: reff_r_max = 1000.0_r_kind ! [micron] ! previous value was 10000.0_r_kind
real(r_kind), parameter :: reff_r_min = 50.0_r_kind ! [micron] ! previous value was 0.0_r_kind
real(r_kind), parameter :: reff_r_max = 1000.0_r_kind ! [micron] ! previous value was 10000.0_r_kind
real(r_kind), parameter:: mu_r = 0.0_r_kind
! Parameters for snow
real(r_kind), parameter :: reff_s_min = 5.0_r_kind ! [micron] ! previous value was 0.0_r_kind
real(r_kind), parameter :: reff_s_max = 5000.0_r_kind ! [micron] ! previous value was 10000.0_r_kind
real(r_kind), parameter :: reff_s_max = 5000.0_r_kind ! [micron] ! previous value was 10000.0_r_kind
real(r_kind), parameter:: nr_min = 1.0e-6_r_kind ! minimum number concentration (ccpp-physics)

!For snow moments conversions (from Field et al. 2005)
real(r_kind), dimension(10), parameter:: &
Expand Down Expand Up @@ -2768,10 +2770,10 @@ subroutine calc_thompson_reff(rho_air,tsen,qxmr,cloud_name,reff)
reff_max = reff_i_max
do k = 1, nsig
qx = qxmr(k) * rho_air(k) ! convert mixing ratio (kg/kg) to water content (kg/m3)
if (qx > qmin .and. ni(k)>zero) then
if (qx > qmin .and. ni(k)>ni_min) then
lam_i=exp(1.0_r_kind / 3.0_r_kind * log((am_i*ni(k) *gamma(mu_i + 3.0_r_kind + 1.0_r_kind))/(qx*gamma(mu_i+1.0_r_kind))))
reff(k) = 0.5_r_kind * (3.0_r_kind /lam_i)*1.0e6_r_kind
reff(k) = max(reff_min, min(reff_max, reff(k)))
reff(k) = 0.5_r_kind * (3.0_r_kind /lam_i)*1.0e6_r_kind
reff(k) = max(reff_min, min(reff_max, reff(k)))
else
reff(k) = zero
endif
Expand All @@ -2783,7 +2785,7 @@ subroutine calc_thompson_reff(rho_air,tsen,qxmr,cloud_name,reff)
reff_max = reff_r_max
do k = 1, nsig
qx = qxmr(k) * rho_air(k) ! convert mixing ratio (kg/kg) to water content (kg/m3)
if (qx > qmin .and. nr(k)>zero) then
if (qx > qmin .and. nr(k)>nr_min) then
lam_r=exp(1.0_r_kind / 3.0_r_kind * log ((am_r*nr(k) *gamma(mu_r + 3.0_r_kind + 1.0_r_kind))/(qx*gamma(mu_r + 1.0_r_kind))))
reff(k) = 0.5_r_kind *(3.0_r_kind/lam_r)*1.0e6_r_kind
reff(k) = max(reff_min, min(reff_max, reff(k)))
Expand Down

0 comments on commit 9a3a90d

Please sign in to comment.