@@ -75,6 +75,7 @@ module ELMFatesInterfaceMod
7575 use elm_varctl , only : fates_history_dimlevel
7676 use elm_varctl , only : use_lch4
7777 use elm_varctl , only : use_century_decomp
78+ use elm_varctl , only : carbon_only,carbonnitrogen_only,carbonphosphorus_only
7879 use elm_varcon , only : tfrz
7980 use elm_varcon , only : spval
8081 use elm_varcon , only : denice
@@ -497,17 +498,6 @@ subroutine ELMFatesGlobals2()
497498 call set_fates_ctrlparms(' decomp_method' ,cval= ' CTC' )
498499 end if
499500
500- ! ELM ALWAYS has nitrogen and phosphorus "on"
501- ! These may be in a non-limiting status (ie when supplements)
502- ! are added, but they are always allocated and cycled non-the less
503- ! FATES may want to interact differently with other models
504- ! that don't even have these arrays allocated.
505- ! FATES also checks that if NO3 is cycled in ELM, then
506- ! any plant affinity parameters are checked.
507-
508- call set_fates_ctrlparms(' nitrogen_spec' ,ival= 1 )
509- call set_fates_ctrlparms(' phosphorus_spec' ,ival= 1 )
510-
511501 if (is_restart() .or. nsrest == nsrBranch) then
512502 pass_is_restart = 1
513503 else
@@ -1164,7 +1154,7 @@ subroutine dynamics_driv(this, bounds_clump, top_as_inst, &
11641154 integer :: nlevsoil ! number of soil layers at the site
11651155 integer :: ier ! allocate status code
11661156 real (r8 ) :: s_node, smp_node ! local for relative water content and potential
1167-
1157+ logical :: nitr_suppl,phos_suppl ! Is ELM currently supplementing N or P?
11681158 real (r8 ), pointer :: lnfm24(:) ! 24-hour averaged lightning data
11691159 real (r8 ), pointer :: gdp_lf_col(:) ! gdp data
11701160
@@ -1329,8 +1319,26 @@ subroutine dynamics_driv(this, bounds_clump, top_as_inst, &
13291319
13301320 ! Nutrient uptake fluxes have been accumulating with each short
13311321 ! timestep, here, we unload them from the boundary condition
1332- ! structures into the cohort structures.
1333- call UnPackNutrientAquisitionBCs(this% fates(nc)% sites, this% fates(nc)% bc_in)
1322+ ! structures into the cohort structures. We also tell
1323+ ! fates the current supplementation status (used for dynamic rooting)
1324+
1325+ if (carbon_only)then
1326+ nitr_suppl = .true.
1327+ phos_suppl = .true.
1328+ else
1329+ if (carbonnitrogen_only)then
1330+ phos_suppl = .true.
1331+ else
1332+ phos_suppl = .false.
1333+ end if
1334+ if (carbonphosphorus_only)then
1335+ nitr_suppl = .true.
1336+ else
1337+ nitr_suppl = .false.
1338+ end if
1339+ end if
1340+
1341+ call UnPackNutrientAquisitionBCs(this% fates(nc)% sites, this% fates(nc)% bc_in, nitr_suppl, phos_suppl)
13341342
13351343 ! Distribute any seeds from neighboring gridcells into the current gridcell
13361344 ! Global seed availability array populated by WrapGlobalSeedDispersal call
0 commit comments