Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change the order of passing the "use_fates_luh" flag #2898

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
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
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
Loading