Skip to content

Commit

Permalink
Merge remote-tracking branch 'rgknox/fates-luh2flag-order' into fates…
Browse files Browse the repository at this point in the history
…-meier-bldcheck
  • Loading branch information
glemieux committed Jan 31, 2025
2 parents ccb55da + 4bff2f2 commit cdaa96b
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions src/utils/clmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -301,10 +301,11 @@ subroutine CLMFatesGlobals1(surf_numpft,surf_numcft,maxsoil_patches)
integer,intent(in) :: surf_numpft
integer,intent(in) :: surf_numcft
integer,intent(out) :: maxsoil_patches
integer :: pass_biogeog
integer :: pass_nocomp
integer :: pass_sp
integer :: pass_use_fixed_biogeog
integer :: pass_use_nocomp
integer :: pass_use_sp
integer :: pass_masterproc
integer :: pass_use_luh2
logical :: verbose_output
type(fates_param_reader_ctsm_impl) :: var_reader

Expand All @@ -321,25 +322,25 @@ subroutine CLMFatesGlobals1(surf_numpft,surf_numcft,maxsoil_patches)
! Send parameters individually

if(use_fates_fixed_biogeog)then
pass_biogeog = 1
pass_use_fixed_biogeog = 1
else
pass_biogeog = 0
pass_use_fixed_biogeog = 0
end if
call set_fates_ctrlparms('use_fixed_biogeog',ival=pass_biogeog)
call set_fates_ctrlparms('use_fixed_biogeog',ival=pass_use_fixed_biogeog)

if(use_fates_nocomp)then
pass_nocomp = 1
pass_use_nocomp = 1
else
pass_nocomp = 0
pass_use_nocomp = 0
end if
call set_fates_ctrlparms('use_nocomp',ival=pass_nocomp)
call set_fates_ctrlparms('use_nocomp',ival=pass_use_nocomp)

if(use_fates_sp)then
pass_sp = 1
pass_use_sp = 1
else
pass_sp = 0
pass_use_sp = 0
end if
call set_fates_ctrlparms('use_sp',ival=pass_sp)
call set_fates_ctrlparms('use_sp',ival=pass_use_sp)

if(masterproc)then
pass_masterproc = 1
Expand All @@ -348,6 +349,14 @@ subroutine CLMFatesGlobals1(surf_numpft,surf_numcft,maxsoil_patches)
end if
call set_fates_ctrlparms('masterproc',ival=pass_masterproc)

! FATES landuse modes
if(use_fates_luh) then
pass_use_luh2 = 1
else
pass_use_luh2 = 0
end if
call set_fates_ctrlparms('use_luh2',ival=pass_use_luh2)

end if


Expand Down Expand Up @@ -395,7 +404,6 @@ subroutine CLMFatesGlobals2()
integer :: pass_is_restart
integer :: pass_cohort_age_tracking
integer :: pass_tree_damage
integer :: pass_use_luh
integer :: pass_use_potentialveg
integer :: pass_num_luh_states
integer :: pass_num_luh_transitions
Expand Down Expand Up @@ -540,16 +548,12 @@ subroutine CLMFatesGlobals2()

! FATES landuse modes
if(use_fates_luh) then
pass_use_luh = 1
pass_num_luh_states = num_landuse_state_vars
pass_num_luh_transitions = num_landuse_transition_vars
else
pass_use_luh = 0
pass_num_luh_states = 0
pass_num_luh_transitions = 0
end if

call set_fates_ctrlparms('use_luh2',ival=pass_use_luh)
call set_fates_ctrlparms('num_luh2_states',ival=pass_num_luh_states)
call set_fates_ctrlparms('num_luh2_transitions',ival=pass_num_luh_transitions)

Expand Down

0 comments on commit cdaa96b

Please sign in to comment.