Skip to content

Commit 9dcb293

Browse files
committed
Forestry fix: need to allocate potential harvest area
if we don't define the potential harvest area in this routine, harvest ends up geting rescaled. This is clunky code, but was trying to make it consistent with the older, biomass-based harvest schemes.
1 parent 4ca39eb commit 9dcb293

1 file changed

Lines changed: 63 additions & 3 deletions

File tree

ED/src/dynamics/forestry.f90

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ subroutine find_harvest_area(cpoly,isi,onsp,harvestable_agb,pot_area_harv)
5353
real :: site_harvest_target
5454
real :: site_harvestable_agb
5555
! real :: site_hvmax_btimber
56-
! real :: site_hvpot_btimber
57-
56+
! real :: site_hvpot_btimber
5857
real :: area_mature_primary
5958
real :: hvagb_mature_primary
6059
real :: area_mature_secondary
@@ -77,7 +76,68 @@ subroutine find_harvest_area(cpoly,isi,onsp,harvestable_agb,pot_area_harv)
7776
case (0) ! Nothing to do because anthropogenic disturbance is turned off
7877
return
7978
case (2) ! Harvest is based on size + area
80-
return
79+
80+
!----- Link to the current site. -------------------------------------------------------!
81+
csite => cpoly%site(isi)
82+
!---------------------------------------------------------------------------------------!
83+
84+
cpoly%primary_harvest_memory (isi) = 0.0
85+
cpoly%secondary_harvest_memory(isi) = 0.0
86+
87+
lambda_mature_plantation = cpoly%disturbance_rates(2,2,isi)
88+
lambda_mature_primary = cpoly%disturbance_rates(6,6,isi)
89+
90+
!---------------------------------------------------------------------------------------!
91+
! Loop over patches. !
92+
!---------------------------------------------------------------------------------------!
93+
patch_loop: do ipa=1,onsp
94+
95+
!------------------------------------------------------------------------------------!
96+
! Find out whether to harvest this patch. !
97+
!------------------------------------------------------------------------------------!
98+
select case (csite%dist_type(ipa))
99+
case (2)
100+
!----- Forest plantation. --------------------------------------------------------!
101+
if ( csite%age(ipa) > plantation_rotation ) then
102+
pot_area_harv(ipa) = csite%area(ipa) * lambda_mature_plantation
103+
end if
104+
!---------------------------------------------------------------------------------!
105+
case (6)
106+
!----- Primary/Secondary forest. -------------------------------------------------!
107+
if ( csite%age(ipa) > mature_harvest_age ) then
108+
pot_area_harv(ipa) = csite%area(ipa) * cpoly%disturbance_rates(6,6,isi)
109+
end if
110+
case default
111+
!----- Agriculture. Do not log. -------------------------------------------------!
112+
continue
113+
!---------------------------------------------------------------------------------!
114+
end select
115+
!------------------------------------------------------------------------------------!
116+
end do patch_loop
117+
!---------------------------------------------------------------------------------------!
118+
119+
write (unit=*,fmt='(a)' ) ' '
120+
write (unit=*,fmt='(a)' ) '------------------------------------------------'
121+
write (unit=*,fmt='(a)' ) ' FORESTRY. HARVEST RATES'
122+
write (unit=*,fmt='(a)' ) ' '
123+
write (unit=*,fmt='(a,1x,i5)') ' ISI = ',isi
124+
write (unit=*,fmt='(a,1x,es12.5)') ' HV LAMBDA (PRIMARY) = ' &
125+
, lambda_mature_primary
126+
write (unit=*,fmt='(a,1x,es12.5)') ' HV LAMBDA (PLANTATION) = ' &
127+
, lambda_mature_plantation
128+
write (unit=*,fmt='(a)' ) ' '
129+
write (unit=*,fmt='(a)' ) '------------------------------------------------'
130+
write (unit=*,fmt='(5(a,1x))' ) ' IPA',' LU',' AGE',' AREA' &
131+
,' HV_AREA'
132+
write (unit=*,fmt='(a)' ) '------------------------------------------------'
133+
do ipa=1,onsp
134+
write (unit=*,fmt='(2(i5,1x),3(f12.7,1x))') ipa,csite%dist_type(ipa) &
135+
,csite%age(ipa),csite%area(ipa) &
136+
,pot_area_harv(ipa)
137+
end do
138+
write (unit=*,fmt='(a)' ) '------------------------------------------------'
139+
write (unit=*,fmt='(a)' ) ' '
140+
81141
!---------------------------------------------------------------------------------------!
82142

83143
case (1)

0 commit comments

Comments
 (0)