Skip to content
Open
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e505dc8
Add two 1x1 FatesColdPRT2 tests, one with, one without MIMICS
slevis-lmwg Jul 30, 2025
01671b9
Uncomment if ( .not. use_fates_sp ) section of clmfates_interfaceMod
slevis-lmwg Aug 11, 2025
59f9d09
Replace plant_ndemand(c) * nuptake_prof(c,j) with plant_ndemand_vr(c,j)
slevis-lmwg Aug 12, 2025
b155e58
New use_fates section for plant_ndemand_vr and plant_ndemand from fates
slevis-lmwg Aug 13, 2025
c79230c
New use_fates section to set the FATES N uptake fluxes
slevis-lmwg Aug 13, 2025
98b4b7d
Change clm_fate from "in" to "inout" argument
slevis-lmwg Aug 13, 2025
a46a76c
Replace if (use_fates) with (is_fates(c)) to add flexibility
slevis-lmwg Aug 14, 2025
f2202fb
Remove two unhelpful 1x1 FatesColdPRT2 tests that I added earlier
slevis-lmwg Aug 15, 2025
e96b87e
New is_fates section for plant_ndemand, now when use_nitrif_denitrif
slevis-lmwg Aug 26, 2025
b24738b
Add (really, uncomment) FATES npp to enable fixation
slevis-lmwg Aug 26, 2025
00a332e
Uncomment hrv_deadstem_to_prod* lines in clmfates_interfaceMod
slevis-lmwg Sep 19, 2025
2bbdd64
Add error check about fates_parteh_mode = 2 and suplnitro = suplnAll
slevis-lmwg Sep 20, 2025
d8bc6ce
Upd. namelist_defaults for suplnitro when parteh_mode == 1 or /= 1
slevis-lmwg Sep 22, 2025
116b310
prt_carbon_allom_hyp -> fates_c_only & prt_cnp_flex_allom_hyp ->fates_cn
slevis-lmwg Sep 22, 2025
ba955b6
Correction to syntax error caught by gnu and nvhpc, not intel
slevis-lmwg Sep 23, 2025
391a023
Update fates paramfile var prescribed_puptake to 1 for PRT2 test
slevis-lmwg Sep 23, 2025
e881a89
Adjust unit conversions to agree with FATES commit b2a1da6
slevis-lmwg Dec 8, 2025
8135820
Change fates paramfile var prescribed_puptake to 10 for PRT2 test
slevis-lmwg Dec 10, 2025
e73b42d
Replace fates_cn with fates_cnp throughout
slevis-lmwg Dec 16, 2025
25ea275
Remove FATES_ERROR_EL from user_nl_clm (out-of-scope fix)
slevis-lmwg Dec 17, 2025
71ed0fe
Merge tag 'ctsm5.4.004' into fates-cn
slevis-lmwg Dec 17, 2025
3b7e863
Merge tag 'ctsm5.4.005' into fates-cn
slevis-lmwg Dec 20, 2025
b146c70
Add PRT2 test with synthetic N to replicate the pre-CN-coupling setup
slevis-lmwg Dec 20, 2025
fab4aa0
Update two namelist error-checks
slevis-lmwg Dec 30, 2025
e5403d2
Update equivalent to last error-checks, this time in controlMod.F90
slevis-lmwg Dec 31, 2025
cfa42fa
Add FatesColdPRT2_suplnAll test and corresponding testmod
slevis-lmwg Dec 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions cime_config/testdefs/testlist_clm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3703,6 +3703,28 @@
<option name="comment">ERP FATES test covering all standard FATES history variables.</option>
</options>
</test>
<test name="ERS_D_Ld30" grid="1x1_brazil" compset="I2000Clm60FatesCrujraRs" testmods="clm/FatesColdPRT2">
<machines>
<machine name="derecho" compiler="intel" category="fates"/>
<machine name="izumi" compiler="nag" category="fates"/>
<machine name="lawrencium-lr3" compiler="intel" category="fates"/>
</machines>
<options>
<option name="wallclock">00:40:00</option>
<option name="comment">1x1 exact restart debug test covering Fates CNP nutrients mode.</option>
</options>
</test>
<test name="ERS_D_Ld30" grid="1x1_brazil" compset="I2000Clm60FatesCrujraRs" testmods="clm/FatesColdPRT2--clm/mimicsFatesCold--clm-nofireemis">
<machines>
<machine name="derecho" compiler="intel" category="fates"/>
<machine name="izumi" compiler="nag" category="fates"/>
<machine name="lawrencium-lr3" compiler="intel" category="fates"/>
</machines>
<options>
<option name="wallclock">00:40:00</option>
<option name="comment">Same 1x1 exact restart test but with MIMICS.</option>
</options>
</test>
<test name="ERS_D_Ld30" grid="f45_f45_mg37" compset="I2000Clm50FatesCruRsGs" testmods="clm/FatesColdPRT2">
<machines>
<machine name="derecho" compiler="intel" category="fates"/>
Expand Down
2 changes: 1 addition & 1 deletion src/biogeochem/CNDriverMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ subroutine CNDriverNoLeaching(bounds,
cnveg_carbonflux_inst,cnveg_nitrogenstate_inst,cnveg_nitrogenflux_inst, &
soilbiogeochem_carbonflux_inst,&
soilbiogeochem_state_inst,soilbiogeochem_nitrogenstate_inst, &
soilbiogeochem_nitrogenflux_inst,canopystate_inst)
soilbiogeochem_nitrogenflux_inst,canopystate_inst, clm_fates)
call t_stopf('soilbiogeochemcompetition')

! distribute the available N between the competing patches on the basis of
Expand Down
141 changes: 113 additions & 28 deletions src/soilbiogeochem/SoilBiogeochemCompetitionMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module SoilBiogeochemCompetitionMod
use TemperatureType , only : temperature_type
use SoilStateType , only : soilstate_type
use CanopyStateType , only : CanopyState_type
use CLMFatesInterfaceMod, only : hlm_fates_interface_type
!
implicit none
private
Expand Down Expand Up @@ -172,10 +173,10 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
cnveg_carbonflux_inst,cnveg_nitrogenstate_inst,cnveg_nitrogenflux_inst, &
soilbiogeochem_carbonflux_inst, &
soilbiogeochem_state_inst, soilbiogeochem_nitrogenstate_inst, &
soilbiogeochem_nitrogenflux_inst,canopystate_inst)
soilbiogeochem_nitrogenflux_inst,canopystate_inst, clm_fates)
!
! !USES:
use clm_varctl , only: cnallocate_carbon_only, iulog
use clm_varctl , only: use_fates, cnallocate_carbon_only, iulog
use clm_varpar , only: nlevdecomp, ndecomp_cascade_transitions
use clm_varpar , only: i_cop_mic, i_oli_mic
use clm_varcon , only: nitrif_n2o_loss_frac
Expand Down Expand Up @@ -207,11 +208,16 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
type(soilbiogeochem_nitrogenstate_type) , intent(inout) :: soilbiogeochem_nitrogenstate_inst
type(soilbiogeochem_nitrogenflux_type) , intent(inout) :: soilbiogeochem_nitrogenflux_inst
type(canopystate_type) , intent(inout) :: canopystate_inst
type(hlm_fates_interface_type), intent(inout) :: clm_fates
!
!
! !LOCAL VARIABLES:
integer :: c,p,l,pi,j,k ! indices
integer :: fc ! filter column index
integer :: ft ! FATES functional type index
integer :: f ! loop index for FATES plant competitors
integer :: n_pcomp ! number of FATES plant competitors
integer :: ci, s ! used for FATES BC (clump index, site index)
logical :: local_use_fun ! local version of use_fun
real(r8) :: amnf_immob_vr ! actual mineral N flux from immobilization (gN/m3/s)
real(r8) :: n_deficit_vr ! microbial N deficit, vertically resolved (gN/m3/s)
Expand All @@ -221,13 +227,15 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
real(r8) :: compet_decomp_nh4 ! (unitless) relative competitiveness of immobilizers for NH4
real(r8) :: compet_denit ! (unitless) relative competitiveness of denitrifiers for NO3
real(r8) :: compet_nit ! (unitless) relative competitiveness of nitrifiers for NH4
real(r8) :: ndemand ! (gN/m2/s) nitrogen demand per FATES plant competitor f (see local variable f above)
real(r8) :: fpi_no3_vr(bounds%begc:bounds%endc,1:nlevdecomp) ! fraction of potential immobilization supplied by no3(no units)
real(r8) :: fpi_nh4_vr(bounds%begc:bounds%endc,1:nlevdecomp) ! fraction of potential immobilization supplied by nh4 (no units)
real(r8) :: sum_nh4_demand(bounds%begc:bounds%endc,1:nlevdecomp)
real(r8) :: sum_nh4_demand_scaled(bounds%begc:bounds%endc,1:nlevdecomp)
real(r8) :: sum_no3_demand(bounds%begc:bounds%endc,1:nlevdecomp)
real(r8) :: sum_no3_demand_scaled(bounds%begc:bounds%endc,1:nlevdecomp)
real(r8) :: sum_ndemand_vr(bounds%begc:bounds%endc, 1:nlevdecomp) !total column N demand (gN/m3/s) at a given level
real(r8) :: plant_ndemand_vr(bounds%begc:bounds%endc, 1:nlevdecomp) !plant column N demand (gN/m3/s) at a given level
real(r8) :: nuptake_prof(bounds%begc:bounds%endc, 1:nlevdecomp)
real(r8) :: sminn_tot(bounds%begc:bounds%endc)
integer :: nlimit(bounds%begc:bounds%endc,0:nlevdecomp) !flag for N limitation
Expand Down Expand Up @@ -319,12 +327,51 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
end do
end do

do j = 1, nlevdecomp
do fc=1,num_bgc_soilc
c = filter_bgc_soilc(fc)
sum_ndemand_vr(c,j) = plant_ndemand(c) * nuptake_prof(c,j) + potential_immob_vr(c,j)
bgc_soilc_loop: do fc = 1, num_bgc_soilc
c = filter_bgc_soilc(fc)

fates: if (use_fates) then
ci = bounds%clump_index
s = clm_fates%f2hmap(ci)%hsites(c)
n_pcomp = clm_fates%fates(ci)%bc_out(s)%num_plant_comps

! Overwrite the column level demands, since fates plants are all sharing
! the same space, in units per the same square meter, we just add demand
! to scale up to column
plant_ndemand(c) = 0._r8

! We fill the vertically resolved array to simplify some jointly used code
do j = 1, nlevdecomp
plant_ndemand_vr(c,j) = 0._r8

do f = 1, n_pcomp
ft = clm_fates%fates(ci)%bc_out(s)%ft_index(f)

! [gN/m3/s] = [gC/m3] * [gN/gC/s]
plant_ndemand_vr(c,j) = plant_ndemand_vr(c,j) + &
clm_fates%fates(ci)%bc_out(s)%veg_rootc(f,j) * &
(clm_fates%fates(ci)%bc_pconst%vmax_nh4(ft) + &
clm_fates%fates(ci)%bc_pconst%vmax_no3(ft))
end do

! [gN/m2/s]
plant_ndemand(c) = plant_ndemand(c) + plant_ndemand_vr(c,j) * dzsoi_decomp(j)

end do

else ! not use_fates

do j = 1, nlevdecomp
plant_ndemand_vr(c,j) = plant_ndemand(c) * nuptake_prof(c,j)
end do

end if fates

do j = 1, nlevdecomp
sum_ndemand_vr(c,j) = plant_ndemand_vr(c,j) + potential_immob_vr(c,j)
end do
end do

end do bgc_soilc_loop

do j = 1, nlevdecomp
do fc=1,num_bgc_soilc
Expand All @@ -337,7 +384,7 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
nlimit(c,j) = 0
fpi_vr(c,j) = 1.0_r8
actual_immob_vr(c,j) = potential_immob_vr(c,j)
sminn_to_plant_vr(c,j) = plant_ndemand(c) * nuptake_prof(c,j)
sminn_to_plant_vr(c,j) = plant_ndemand_vr(c,j)
else if ( cnallocate_carbon_only()) then !.or. &
! this code block controls the addition of N to sminn pool
! to eliminate any N limitation, when Carbon_Only is set. This lets the
Expand All @@ -349,7 +396,7 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
nlimit(c,j) = 1
fpi_vr(c,j) = 1.0_r8
actual_immob_vr(c,j) = potential_immob_vr(c,j)
sminn_to_plant_vr(c,j) = plant_ndemand(c) * nuptake_prof(c,j)
sminn_to_plant_vr(c,j) = plant_ndemand_vr(c,j)
supplement_to_sminn_vr(c,j) = sum_ndemand_vr(c,j) - (sminn_vr(c,j)/dt)
else
! N availability can not satisfy the sum of immobilization and
Expand Down Expand Up @@ -552,8 +599,8 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
l = col%landunit(c)

! first compete for nh4
sum_nh4_demand(c,j) = plant_ndemand(c) * nuptake_prof(c,j) + potential_immob_vr(c,j) + pot_f_nit_vr(c,j)
sum_nh4_demand_scaled(c,j) = plant_ndemand(c)* nuptake_prof(c,j) * compet_plant_nh4 + &
sum_nh4_demand(c,j) = plant_ndemand_vr(c,j) + potential_immob_vr(c,j) + pot_f_nit_vr(c,j)
sum_nh4_demand_scaled(c,j) = plant_ndemand_vr(c,j) * compet_plant_nh4 + &
potential_immob_vr(c,j)*compet_decomp_nh4 + pot_f_nit_vr(c,j)*compet_nit

if (sum_nh4_demand(c,j)*dt < smin_nh4_vr(c,j)) then
Expand All @@ -568,7 +615,7 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
f_nit_vr(c,j) = pot_f_nit_vr(c,j)

if ( .not. local_use_fun ) then
smin_nh4_to_plant_vr(c,j) = plant_ndemand(c) * nuptake_prof(c,j)
smin_nh4_to_plant_vr(c,j) = plant_ndemand_vr(c,j)
else
smin_nh4_to_plant_vr(c,j) = smin_nh4_vr(c,j)/dt - actual_immob_nh4_vr(c,j) - f_nit_vr(c,j)
end if
Expand All @@ -588,8 +635,8 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
sum_nh4_demand_scaled(c,j)), pot_f_nit_vr(c,j))

if ( .not. local_use_fun ) then
smin_nh4_to_plant_vr(c,j) = min((smin_nh4_vr(c,j)/dt)*(plant_ndemand(c)* &
nuptake_prof(c,j)*compet_plant_nh4 / sum_nh4_demand_scaled(c,j)), plant_ndemand(c)*nuptake_prof(c,j))
smin_nh4_to_plant_vr(c,j) = min((smin_nh4_vr(c,j)/dt) * (plant_ndemand_vr(c,j) * &
compet_plant_nh4 / sum_nh4_demand_scaled(c,j)), plant_ndemand_vr(c,j))

else
! RF added new term. send rest of N to plant - which decides whether it should pay or not?
Expand Down Expand Up @@ -619,15 +666,15 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
end if

if(.not.local_use_fun)then
sum_no3_demand(c,j) = (plant_ndemand(c)*nuptake_prof(c,j)-smin_nh4_to_plant_vr(c,j)) + &
sum_no3_demand(c,j) = (plant_ndemand_vr(c,j) - smin_nh4_to_plant_vr(c,j)) + &
(potential_immob_vr(c,j)-actual_immob_nh4_vr(c,j)) + pot_f_denit_vr(c,j)
sum_no3_demand_scaled(c,j) = (plant_ndemand(c)*nuptake_prof(c,j) &
sum_no3_demand_scaled(c,j) = (plant_ndemand_vr(c,j) &
-smin_nh4_to_plant_vr(c,j))*compet_plant_no3 + &
(potential_immob_vr(c,j)-actual_immob_nh4_vr(c,j))*compet_decomp_no3 + pot_f_denit_vr(c,j)*compet_denit
else
sum_no3_demand(c,j) = plant_ndemand(c)*nuptake_prof(c,j) + &
sum_no3_demand(c,j) = plant_ndemand_vr(c,j) + &
(potential_immob_vr(c,j)-actual_immob_nh4_vr(c,j)) + pot_f_denit_vr(c,j)
sum_no3_demand_scaled(c,j) = (plant_ndemand(c)*nuptake_prof(c,j))*compet_plant_no3 + &
sum_no3_demand_scaled(c,j) = (plant_ndemand_vr(c,j)) * compet_plant_no3 + &
(potential_immob_vr(c,j)-actual_immob_nh4_vr(c,j))*compet_decomp_no3 + pot_f_denit_vr(c,j)*compet_denit
endif

Expand All @@ -642,12 +689,12 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
f_denit_vr(c,j) = pot_f_denit_vr(c,j)

if(.not.local_use_fun)then
smin_no3_to_plant_vr(c,j) = (plant_ndemand(c)*nuptake_prof(c,j)-smin_nh4_to_plant_vr(c,j))
smin_no3_to_plant_vr(c,j) = (plant_ndemand_vr(c,j) - smin_nh4_to_plant_vr(c,j))
else
! This restricts the N uptake of a single layer to the value determined from the total demands and the
! hypothetical uptake profile above. Which is a strange thing to do, since that is independent of FUN
! do we need this at all?
smin_no3_to_plant_vr(c,j) = plant_ndemand(c)*nuptake_prof(c,j)
smin_no3_to_plant_vr(c,j) = plant_ndemand_vr(c,j)
! RF added new term. send rest of N to plant - which decides whether it should pay or not?
if ( local_use_fun ) then
smin_no3_to_plant_vr(c,j) = smin_no3_vr(c,j)/dt - actual_immob_no3_vr(c,j) - f_denit_vr(c,j)
Expand All @@ -667,9 +714,9 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
actual_immob_nh4_vr(c,j))*compet_decomp_no3 / sum_no3_demand_scaled(c,j)), &
potential_immob_vr(c,j)-actual_immob_nh4_vr(c,j))

smin_no3_to_plant_vr(c,j) = min((smin_no3_vr(c,j)/dt)*((plant_ndemand(c)* &
nuptake_prof(c,j)-smin_nh4_to_plant_vr(c,j))*compet_plant_no3 / sum_no3_demand_scaled(c,j)), &
plant_ndemand(c)*nuptake_prof(c,j)-smin_nh4_to_plant_vr(c,j))
smin_no3_to_plant_vr(c,j) = min((smin_no3_vr(c,j)/dt) * ((plant_ndemand_vr(c,j) - &
smin_nh4_to_plant_vr(c,j)) * compet_plant_no3 / sum_no3_demand_scaled(c,j)), &
plant_ndemand_vr(c,j) - smin_nh4_to_plant_vr(c,j))

f_denit_vr(c,j) = min((smin_no3_vr(c,j)/dt)*(pot_f_denit_vr(c,j)*compet_denit / &
sum_no3_demand_scaled(c,j)), pot_f_denit_vr(c,j))
Expand All @@ -681,8 +728,8 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
f_denit_vr(c,j) = min((smin_no3_vr(c,j)/dt)*(pot_f_denit_vr(c,j)*compet_denit / &
sum_no3_demand_scaled(c,j)), pot_f_denit_vr(c,j))

smin_no3_to_plant_vr(c,j) = (smin_no3_vr(c,j)/dt)*((plant_ndemand(c)* &
nuptake_prof(c,j)-smin_nh4_to_plant_vr(c,j))*compet_plant_no3 / sum_no3_demand_scaled(c,j))
smin_no3_to_plant_vr(c,j) = (smin_no3_vr(c,j)/dt) * ((plant_ndemand_vr(c,j) - &
smin_nh4_to_plant_vr(c,j)) * compet_plant_no3 / sum_no3_demand_scaled(c,j))

! RF added new term. send rest of N to plant - which decides whether it should pay or not?
smin_no3_to_plant_vr(c,j) = (smin_no3_vr(c,j) / dt) - actual_immob_no3_vr(c,j) - f_denit_vr(c,j)
Expand Down Expand Up @@ -737,10 +784,10 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
! update to new values that satisfy demand
actual_immob_nh4_vr(c,j) = potential_immob_vr(c,j) - actual_immob_no3_vr(c,j)
end if
if ( smin_no3_to_plant_vr(c,j) + smin_nh4_to_plant_vr(c,j) < plant_ndemand(c)*nuptake_prof(c,j) ) then
if ( smin_no3_to_plant_vr(c,j) + smin_nh4_to_plant_vr(c,j) < plant_ndemand_vr(c,j) ) then
supplement_to_sminn_vr(c,j) = supplement_to_sminn_vr(c,j) + &
(plant_ndemand(c)*nuptake_prof(c,j) - smin_no3_to_plant_vr(c,j)) - smin_nh4_to_plant_vr(c,j) ! use old values
smin_nh4_to_plant_vr(c,j) = plant_ndemand(c)*nuptake_prof(c,j) - smin_no3_to_plant_vr(c,j)
(plant_ndemand_vr(c,j) - smin_no3_to_plant_vr(c,j)) - smin_nh4_to_plant_vr(c,j) ! use old values
smin_nh4_to_plant_vr(c,j) = plant_ndemand_vr(c,j) - smin_no3_to_plant_vr(c,j)
end if
sminn_to_plant_vr(c,j) = smin_no3_to_plant_vr(c,j) + smin_nh4_to_plant_vr(c,j)
end if
Expand Down Expand Up @@ -991,6 +1038,44 @@ subroutine SoilBiogeochemCompetition (bounds, num_bgc_soilc, filter_bgc_soilc,nu
end if
end do ! end of column loops

! Set the FATES N uptake fluxes

if (use_fates) then
do fc=1, num_bgc_soilc
c = filter_bgc_soilc(fc)
ci = bounds%clump_index
s = clm_fates%f2hmap(ci)%hsites(c)
n_pcomp = clm_fates%fates(ci)%bc_out(s)%num_plant_comps

if ( plant_ndemand(c) > tiny(plant_ndemand(c)) ) then
do f = 1, n_pcomp
ft = clm_fates%fates(ci)%bc_out(s)%ft_index(f)

! [gN/m2/s]
ndemand = 0._r8

do j = 1, nlevdecomp
ndemand = ndemand + clm_fates%fates(ci)%bc_out(s)%veg_rootc(f,j) * &
(clm_fates%fates(ci)%bc_pconst%vmax_nh4(ft) + &
clm_fates%fates(ci)%bc_pconst%vmax_no3(ft)) * dzsoi_decomp(j)
end do

do j = 1, nlevdecomp
clm_fates%fates(ci)%bc_in(s)%plant_nh4_uptake_flux(f,1) = &
clm_fates%fates(ci)%bc_in(s)%plant_nh4_uptake_flux(f,1) + &
smin_nh4_to_plant_vr(c,j) * dt * dzsoi_decomp(j) * &
(ndemand / plant_ndemand(c))

clm_fates%fates(ci)%bc_in(s)%plant_no3_uptake_flux(f,1) = &
clm_fates%fates(ci)%bc_in(s)%plant_no3_uptake_flux(f,1) + &
smin_no3_to_plant_vr(c,j) * dt * dzsoi_decomp(j) * &
(ndemand / plant_ndemand(c))
end do
end do
end if
end do
end if

end if if_nitrif !end of if_not_use_nitrif_denitrif

end associate
Expand Down
Loading