Skip to content

Commit fcfa435

Browse files
committed
add call to set fates control parameters for nutrient supplementation
1 parent 64046ec commit fcfa435

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

components/elm/src/main/elmfates_interfaceMod.F90

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module ELMFatesInterfaceMod
2929

3030
! use ed_driver_interface, only:
3131

32-
! Used CLM Modules
32+
! Used HLM Modules
3333
use VegetationType , only : veg_pp
3434
use shr_kind_mod , only : r8 => shr_kind_r8
3535
use decompMod , only : bounds_type
@@ -38,6 +38,8 @@ module ELMFatesInterfaceMod
3838
use CanopyStateType , only : canopystate_type
3939
use TemperatureType , only : temperature_type
4040
use EnergyFluxType , only : energyflux_type
41+
use AllocationMod , only : suplnitro, suplnNon
42+
use AllocationMod , only : suplphos, suplpNon
4143

4244
use SoilStateType , only : soilstate_type
4345
use elm_varctl , only : iulog
@@ -438,7 +440,8 @@ subroutine ELMFatesGlobals2()
438440
integer :: pass_hydro_solver
439441
integer :: pass_radiation_model
440442
integer :: pass_electron_transport_model
441-
443+
integer :: pass_nitrogen_supl
444+
integer :: pass_phosporus_supl
442445
! ----------------------------------------------------------------------------------
443446
! FATES lightning definitions
444447
! 1 : use a global constant lightning rate found in fates_params.
@@ -507,7 +510,21 @@ subroutine ELMFatesGlobals2()
507510

508511
call set_fates_ctrlparms('nitrogen_spec',ival=1)
509512
call set_fates_ctrlparms('phosphorus_spec',ival=1)
510-
513+
514+
! Pass the supplemental nutrient status flags
515+
if (suplnitro == suplnNon) then
516+
pass_nitrogen_supl = 0
517+
else
518+
pass_nitrogen_supl = 1
519+
end if
520+
if (suplphos == suplpNon) then
521+
pass_phosporus_supl = 0
522+
else
523+
pass_phosporus_supl = 1
524+
end if
525+
call set_fates_ctrlparms('nitrogen_supl',ival=pass_nitrogen_supl)
526+
call set_fates_ctrlparms('phosphorus_supl',ival=pass_phosporus_supl)
527+
511528
if(is_restart() .or. nsrest == nsrBranch) then
512529
pass_is_restart = 1
513530
else

0 commit comments

Comments
 (0)