Skip to content

Commit

Permalink
bugfix max forest recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
flohump committed Jun 4, 2024
1 parent c5a0c57 commit 11a5680
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 8 deletions.
2 changes: 1 addition & 1 deletion modules/35_natveg/pot_forest_may24/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ parameters
pc35_forest_recovery_shr(j) Forest share in natveg recovery (1)
p35_forest_recovery_area(t,j,ac) Recovered forest (mio. ha)
p35_maturesecdf(t,j,ac) Matured secondary forest (mio. ha)
pcm_max_forest_est(j) Overall forest establishment potential in current time step (mio. ha)
pcm_max_forest_est(t,j) Overall forest establishment potential in current time step (mio. ha)
pc35_max_forest_recovery(j) Maximum forest recovery potential after land abandonement (mio. ha)
p35_carbon_density_other(t,j,othertype35,ac,ag_pools) Carbon density other land (tC per ha)
p35_disturbance_loss_secdf(t,j,ac) Loss due to disturbances in secondary forest (mio. ha)
Expand Down
2 changes: 1 addition & 1 deletion modules/35_natveg/pot_forest_may24/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ q35_hvarea_other(j2,othertype35,ac_sub)..
q35_max_forest_establishment(j2)..
sum(land_forest, vm_landexpansion(j2,land_forest))
=l=
pcm_max_forest_est(j2)
sum(ct, pcm_max_forest_est(ct,j2))
- sum(ac, vm_land_other(j2,"youngsecdf",ac) )
;

Expand Down
10 changes: 7 additions & 3 deletions modules/35_natveg/pot_forest_may24/postsolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,13 @@ pc35_secdforest(j,ac) = v35_secdforest.l(j,ac);
pc35_land_other(j,othertype35,ac) = vm_land_other.l(j,othertype35,ac);

* Reset forest establishment bound
pcm_max_forest_est(j) = f35_pot_forest_area(j) - sum(land_forest, vm_land.l(j,land_forest));
pcm_max_forest_est(j)$(pcm_max_forest_est(j) < 0) = 0;

if(m_year(t) <= sm_fix_SSP2,
pcm_max_forest_est(t,j) = 0;
pcm_max_forest_est(t,j)$(fm_carbon_density(t,j,"secdforest","vegc") > 20) = sum(land, vm_land.l(j,land)) - sum(land_forest, vm_land.l(j,land_forest));
else
pcm_max_forest_est(t,j) = f35_pot_forest_area(j) - sum(land_forest, vm_land.l(j,land_forest));
pcm_max_forest_est(t,j)$(pcm_max_forest_est(t,j) < 0) = 0;
);
*#################### R SECTION START (OUTPUT DEFINITIONS) #####################
ov35_secdforest(t,j,ac,"marginal") = v35_secdforest.m(j,ac);
ov_land_other(t,j,othertype35,ac,"marginal") = vm_land_other.m(j,othertype35,ac);
Expand Down
13 changes: 11 additions & 2 deletions modules/35_natveg/pot_forest_may24/preloop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,17 @@ p35_disturbance_loss_primf(t,j) = 0;
* Forest establishment is constrained by the potential forest area in each cluster.
* Hence, the area for forest establishments is given by the potential forest
* area minus all forest areas in the previous time step.
pcm_max_forest_est(j) = f35_pot_forest_area(j) - sum(land_forest, pcm_land(j,land_forest));
pcm_max_forest_est(j)$(pcm_max_forest_est(j) < 0) = 0;

loop(t,
if(m_year(t) <= sm_fix_SSP2,
pcm_max_forest_est(t,j) = 0;
pcm_max_forest_est(t,j)$(fm_carbon_density(t,j,"secdforest","vegc") > 20) = sum(land, pcm_land(j,land)) - sum(land_forest, pcm_land(j,land_forest));
else
pcm_max_forest_est(t,j) = f35_pot_forest_area(j) - sum(land_forest, pcm_land(j,land_forest));
pcm_max_forest_est(t,j)$(pcm_max_forest_est(t,j) < 0) = 0;
);
);


* -----------------------------------------
* Land conservation for climate mitigation
Expand Down
2 changes: 1 addition & 1 deletion modules/35_natveg/pot_forest_may24/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ vm_land.l(j,"primforest") = pcm_land(j,"primforest");
* -------------------------------------------------

*** Calculate the upper boundary for secondary forest recovery
pc35_max_forest_recovery(j) = pcm_max_forest_est(j) - sum(ac, pc35_land_other(j,"youngsecdf",ac));
pc35_max_forest_recovery(j) = pcm_max_forest_est(t,j) - sum(ac, pc35_land_other(j,"youngsecdf",ac));

*** Distribute forestry abandonement
* Abandoned forestry is directly shifted into p35_forest_recovery_area(t,j,ac_est) because it is
Expand Down

0 comments on commit 11a5680

Please sign in to comment.