Skip to content

Commit

Permalink
Move LUH2 allocations
Browse files Browse the repository at this point in the history
LUH2 transition and state information isn't dependent on the
land use harvest capability.
  • Loading branch information
glemieux committed Apr 12, 2023
1 parent cafa72d commit 4099345
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions main/FatesInterfaceMod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -541,17 +541,21 @@ subroutine allocate_bcin(bc_in, nlevsoil_in, nlevdecomp_in, num_lu_harvest_cats,
if (hlm_use_lu_harvest .gt. 0) then
allocate(bc_in%hlm_harvest_rates(num_lu_harvest_cats))
allocate(bc_in%hlm_harvest_catnames(num_lu_harvest_cats))
allocate(bc_in%hlm_luh_states(num_luh2_states))
allocate(bc_in%hlm_luh_state_names(num_luh2_states))
allocate(bc_in%hlm_luh_transitions(num_luh2_transitions))
allocate(bc_in%hlm_luh_transition_names(num_luh2_transitions))
else ! LoggingMortality_frac needs these passed to it regardless of harvest
allocate(bc_in%hlm_harvest_rates(0))
allocate(bc_in%hlm_harvest_catnames(0))
end if

allocate(bc_in%pft_areafrac(natpft_lb:natpft_ub))

! LUH2 state and transition data
if (hlm_use_luh .gt. 0) then
allocate(bc_in%hlm_luh_states(num_luh2_states))
allocate(bc_in%hlm_luh_state_names(num_luh2_states))
allocate(bc_in%hlm_luh_transitions(num_luh2_transitions))
allocate(bc_in%hlm_luh_transition_names(num_luh2_transitions))
end if

! Variables for SP mode.
if(hlm_use_sp.eq.itrue) then
allocate(bc_in%hlm_sp_tlai(natpft_lb:natpft_ub))
Expand Down

0 comments on commit 4099345

Please sign in to comment.