Skip to content

Commit

Permalink
correct luh file variable init and typos
Browse files Browse the repository at this point in the history
  • Loading branch information
glemieux committed Apr 20, 2023
1 parent 8c0352a commit 9775537
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions components/elm/src/dyn_subgrid/dynFATESLandUseChangeMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ subroutine dynFatesLandUseInit(bounds, landuse_filename)
if (use_cn) return ! Use this as a protection in lieu of build namelist check?

! Allocate and initialize the land use arrays
allocate(landuse_states(num_landuse_states_vars,bounds%begg:bounds%endg),stat=ier)
allocate(landuse_states(num_landuse_state_vars,bounds%begg:bounds%endg),stat=ier)
if (ier /= 0) then
call endrun(msg=' allocation error for landuse_states'//errMsg(__FILE__, __LINE__))
end if
Expand Down Expand Up @@ -160,7 +160,7 @@ subroutine dynFatesLandUseInterp(bounds, do_landuse_update)

! Reset the land use transitions to zero for safety
landuse_transitions(1:num_landuse_transition_vars,bounds%begg:bounds%endg) = 0._r8
landuse_states(1:num_landuse_states_vars,bounds%begg:bounds%endg) = 0._r8
landuse_states(1:num_landuse_state_vars,bounds%begg:bounds%endg) = 0._r8
else
do_landuse_update = .true.

Expand Down
1 change: 1 addition & 0 deletions components/elm/src/main/elm_varctl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ module elm_varctl
logical, public :: use_fates_nocomp = .false. ! true => no competition mode
logical, public :: use_fates_sp = .false. ! true => FATES satellite phenology mode
logical, public :: use_fates_luh = .false. ! true => FATES land use transitions mode
character(len=256), public :: fluh_timeseries = '' ! filename for land use harmonization data
character(len=256), public :: fates_inventory_ctrl_filename = '' ! filename for inventory control
integer, public :: fates_parteh_mode = -9 ! 1 => carbon only
! 2 => C+N+P (not enabled yet)
Expand Down
6 changes: 3 additions & 3 deletions components/elm/src/main/elmfates_interfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -962,10 +962,10 @@ subroutine dynamics_driv(this, bounds_clump, top_as_inst, &

if (use_fates_luh) then
if (do_landuse_update) then
! this%fates(nc)%bc_in(s)%hlm_luh_states
! this%fates(nc)%bc_in(s)%hlm_luh_state_names
this%fates(nc)%bc_in(s)%hlm_luh_states = landuse_states(:,g)
this%fates(nc)%bc_in(s)%hlm_luh_state_names = landuse_state_varnames
this%fates(nc)%bc_in(s)%hlm_luh_transitions = landuse_transitions(:,g)
this%fates(nc)%bc_in(s)%hlm_luh_transition_names = landuse_transition_varname
this%fates(nc)%bc_in(s)%hlm_luh_transition_names = landuse_transition_varnames
end if
end if

Expand Down

0 comments on commit 9775537

Please sign in to comment.