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

Removed zero-indexed variable in derived type. #201

Merged
merged 2 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion src/datatypes.mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ module datatypes
!===== Leaf area index
real :: LAI ! leaf area index
real :: CAI ! crown area index
real :: LAIlayer(0:10) = 0.0 ! LAI of each crown layer, max. 9
! real :: LAIlayer(0:10) = 0.0 ! LAI of each crown layer, max. 9
real :: root_distance(max_lev) ! characteristic half-distance between fine roots, m

!===== Averaged quantities for PPA phenology
Expand Down
41 changes: 21 additions & 20 deletions src/vegetation_biomee.mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module md_vegetation_biomee

! public subroutines
public :: initialize_cohort_from_biomass, initialize_vegn_tile
public :: vegn_CNW_budget, vegn_phenology, vegn_growth_EW,update_layer_LAI ! , vegn_CNW_budget_daily
public :: vegn_CNW_budget, vegn_phenology, vegn_growth_EW ! , update_layer_LAI ! , vegn_CNW_budget_daily
public :: vegn_reproduction, vegn_annualLAImax_update !, annual_calls
public :: vegn_nat_mortality, vegn_species_switch !, vegn_starvation
public :: relayer_cohorts, vegn_mergecohorts, kill_lowdensity_cohorts
Expand Down Expand Up @@ -434,27 +434,28 @@ subroutine vegn_growth_EW( vegn )
end subroutine vegn_growth_EW


subroutine update_layer_LAI( vegn )
!////////////////////////////////////////////////////////////////
! Updates LAI per canopy layer
! Code from BiomeE-Allocation
!---------------------------------------------------------------
type(vegn_tile_type), intent(inout) :: vegn

! local variables
type(cohort_type), pointer :: cc
integer :: i, layer
! The routine is never called, therefore commented out
! subroutine update_layer_LAI( vegn )
! !////////////////////////////////////////////////////////////////
! ! Updates LAI per canopy layer
! ! Code from BiomeE-Allocation
! !---------------------------------------------------------------
! type(vegn_tile_type), intent(inout) :: vegn

! update accumulative LAI for each corwn layer
vegn%LAI = 0.0
vegn%LAIlayer = 0.0
do i = 1, vegn%n_cohorts
cc => vegn%cohorts(i)
layer = Max (1, Min(cc%layer,9)) ! between 1~9
vegn%LAIlayer(layer) = vegn%LAIlayer(layer) + cc%leafarea * cc%nindivs !/(1.0-sp%internal_gap_frac)
enddo
! ! local variables
! type(cohort_type), pointer :: cc
! integer :: i, layer

! ! update accumulative LAI for each corwn layer
! vegn%LAI = 0.0
! vegn%LAIlayer = 0.0
! do i = 1, vegn%n_cohorts
! cc => vegn%cohorts(i)
! layer = Max (1, Min(cc%layer,9)) ! between 1~9
! vegn%LAIlayer(layer) = vegn%LAIlayer(layer) + cc%leafarea * cc%nindivs !/(1.0-sp%internal_gap_frac)
! enddo

end subroutine update_layer_LAI
! end subroutine update_layer_LAI


subroutine rootarea_and_verticalprofile( cc )
Expand Down
Loading