Skip to content

Commit

Permalink
Force fractional exponent arguments to be 0 minimum
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisRenchon authored and kmdeck committed Oct 16, 2024
1 parent b7f3fb9 commit 7531f35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/standalone/Soil/Biogeochemistry/co2_parameterizations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function microbe_source(
Vmax = α_sx * exp(-Ea_sx / (R * T_soil)) # Maximum potential rate of respiration
Sx = p_sx * Csom * D_liq * θ_l^3 # All soluble substrate, kgC m⁻³
MM_sx = Sx / (kM_sx + Sx) # Availability of substrate factor, 0-1
O2 = D_oa * O2_a * ((ν - θ_l)^(FT(4 / 3))) # Oxygen concentration
O2 = D_oa * O2_a * (max((ν - θ_l), 0)^(FT(4 / 3))) # Oxygen concentration
MM_o2 = O2 / (kM_o2 + O2) # Oxygen limitation factor, 0-1
R_sm = Vmax * MM_sx * MM_o2 # Respiration, kg C m⁻³ s⁻¹
return R_sm
Expand Down Expand Up @@ -82,7 +82,7 @@ function co2_diffusivity(
T_ref = FT(LP.T_0(earth_param_set))
P_ref = FT(LP.P_ref(earth_param_set))
θ_a = volumetric_air_content(θ_w, ν)
D0 = D_ref * (T_soil / T_ref)^FT(1.75) * (P_ref / P_sfc)
D0 = D_ref * max((T_soil / T_ref), 0)^FT(1.75) * (P_ref / P_sfc)
D =
D0 *
(FT(2)θ_a100^FT(3) + FT(0.04)θ_a100) *
Expand Down

0 comments on commit 7531f35

Please sign in to comment.