forked from magpiemodel/magpie
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create new Biodiv default realization with RR layer
- Loading branch information
1 parent
d600367
commit 174c29a
Showing
14 changed files
with
251 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
* list of files that are required here | ||
f44_bii_coeff.cs3 | ||
biorealm_biome.cs3 | ||
rr_layer.cs2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
*** | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK) | ||
*** | authors, and contributors see CITATION.cff file. This file is part | ||
*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
*** | AGPL-3.0, you are granted additional permissions described in the | ||
*** | MAgPIE License Exception, version 1.0 (see LICENSE file). | ||
*** | Contact: [email protected] | ||
|
||
|
||
positive variables | ||
vm_cost_bv_loss(j) Biodiversity cost (mio USD) | ||
vm_bv(j,landcover44,potnatveg) Biodiversity stock for all land cover classes (Mha) | ||
v44_bii(i,biome44) Biodiversity Intactness Index BII (1) | ||
v44_bii_missing(i,biome44) Missing BII increase for compliance with BII target (1) | ||
; | ||
|
||
parameters | ||
p44_bii_lower_bound(t,i,biome44) Interpolated lower bound for BII over time (1) | ||
p44_start_value(i,biome44) Start value for BII lower bound (1) | ||
p44_target_value(i,biome44) Target value for BII lower bound (1) | ||
; | ||
|
||
equations | ||
q44_bii(i,biome44) Biodiversity Intactness Index BII (1) | ||
q44_bii_target(i,biome44) Missing BII increase for compliance with BII target (1) | ||
q44_cost(i) Biodiversity cost (mio USD) | ||
; | ||
|
||
|
||
*#################### R SECTION START (OUTPUT DECLARATIONS) #################### | ||
parameters | ||
ov_cost_bv_loss(t,j,type) Biodiversity cost (mio USD) | ||
ov_bv(t,j,landcover44,potnatveg,type) Biodiversity stock for all land cover classes (Mha) | ||
ov44_bii(t,i,biome44,type) Biodiversity Intactness Index BII (1) | ||
ov44_bii_missing(t,i,biome44,type) Missing BII increase for compliance with BII target (1) | ||
oq44_bii(t,i,biome44,type) Biodiversity Intactness Index BII (1) | ||
oq44_bii_target(t,i,biome44,type) Missing BII increase for compliance with BII target (1) | ||
oq44_cost(t,i,type) Biodiversity cost (mio USD) | ||
; | ||
*##################### R SECTION END (OUTPUT DECLARATIONS) ##################### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
*** | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK) | ||
*** | authors, and contributors see CITATION.cff file. This file is part | ||
*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
*** | AGPL-3.0, you are granted additional permissions described in the | ||
*** | MAgPIE License Exception, version 1.0 (see LICENSE file). | ||
*** | Contact: [email protected] | ||
|
||
*' @equations | ||
|
||
*' The Biodiversity Intactness Index (BII) is calculated at the level of 71 biomes. | ||
*' Biodiversity stock weighted by range-rarity restoration prioritization layer (`f44_rr_layer`) | ||
*' The regional layer is needed for compatibility with the high resolution parallel optimization output script (scripts/output/extra/highres.R) | ||
|
||
q44_bii(i2,biome44)$(sum(cell(i2,j2), f44_biome(j2,biome44)) > 0) .. v44_bii(i2,biome44) | ||
=e= | ||
(sum((cell(i2,j2),potnatveg,landcover44), vm_bv(j2,landcover44,potnatveg) * f44_rr_layer(j2) * f44_biome(j2,biome44)) / sum((cell(i2,j2),land), pcm_land(j2,land) * f44_rr_layer(j2) * f44_biome(j2,biome44))); | ||
|
||
*' For each of the 71 biomes, the BII has to meet a minium level based on `s44_bii_lower_bound`. | ||
*' `v44_bii_missing` is a technical variable to maintain feasibility in case `v44_bii` cannot be increased. | ||
|
||
q44_bii_target(i2,biome44)$(sum(cell(i2,j2), f44_biome(j2,biome44)) > 0) .. | ||
v44_bii(i2,biome44) + v44_bii_missing(i2,biome44) =g= sum(ct, p44_bii_lower_bound(ct,i2,biome44)); | ||
|
||
*' Costs accrue only for `v44_bii_missing`. In the best case costs should be zero or close to zero. | ||
*' Costs strongly depend on the choice of `s44_bii_lower_bound`. | ||
|
||
q44_cost(i2) .. sum(cell(i2,j2), vm_cost_bv_loss(j2)) =e= | ||
sum(biome44, v44_bii_missing(i2,biome44)) * s44_cost_bii_missing; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
*** | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK) | ||
*** | authors, and contributors see CITATION.cff file. This file is part | ||
*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
*** | AGPL-3.0, you are granted additional permissions described in the | ||
*** | MAgPIE License Exception, version 1.0 (see LICENSE file). | ||
*** | Contact: [email protected] | ||
|
||
scalars | ||
s44_bii_lower_bound Lower bound for BII (1) / 0 / | ||
c44_bii_decrease Implementation of lower bound for BII (binary) / 1 / | ||
s44_target_year Year in which the BII lower bound is reached (1) / 2100 / | ||
s44_start_year Start year for interpolation towards BII lower bound (1) / 2025 / | ||
s44_cost_bii_missing Technical costs for missing BII increase (USD per unit of BII) / 1000000 / | ||
; | ||
|
||
|
||
table fm_bii_coeff(bii_class44,potnatveg) Biodiversity Intactness Index coefficients (unitless) | ||
$ondelim | ||
$include "./modules/44_biodiversity/bii_target/input/f44_bii_coeff.cs3" | ||
$offdelim | ||
; | ||
|
||
table f44_biome(j,biome44) Share of biome type in each spatial unit (1) | ||
$ondelim | ||
$include "./modules/44_biodiversity/bii_target/input/biorealm_biome.cs3" | ||
$offdelim | ||
; | ||
|
||
parameters | ||
f44_rr_layer(j) Range-rarity restoration prioritization layer (unitless) | ||
/ | ||
$ondelim | ||
$include "./modules/44_biodiversity/bii_target/input/rr_layer.cs2" | ||
$offdelim | ||
/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
* list of files that are required here | ||
f44_bii_coeff.cs3 | ||
biorealm_biome.cs3 | ||
rr_layer.cs2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
*** | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK) | ||
*** | authors, and contributors see CITATION.cff file. This file is part | ||
*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
*** | AGPL-3.0, you are granted additional permissions described in the | ||
*** | MAgPIE License Exception, version 1.0 (see LICENSE file). | ||
*** | Contact: [email protected] | ||
|
||
*#################### R SECTION START (OUTPUT DEFINITIONS) ##################### | ||
ov_cost_bv_loss(t,j,"marginal") = vm_cost_bv_loss.m(j); | ||
ov_bv(t,j,landcover44,potnatveg,"marginal") = vm_bv.m(j,landcover44,potnatveg); | ||
ov44_bii(t,i,biome44,"marginal") = v44_bii.m(i,biome44); | ||
ov44_bii_missing(t,i,biome44,"marginal") = v44_bii_missing.m(i,biome44); | ||
oq44_bii(t,i,biome44,"marginal") = q44_bii.m(i,biome44); | ||
oq44_bii_target(t,i,biome44,"marginal") = q44_bii_target.m(i,biome44); | ||
oq44_cost(t,i,"marginal") = q44_cost.m(i); | ||
ov_cost_bv_loss(t,j,"level") = vm_cost_bv_loss.l(j); | ||
ov_bv(t,j,landcover44,potnatveg,"level") = vm_bv.l(j,landcover44,potnatveg); | ||
ov44_bii(t,i,biome44,"level") = v44_bii.l(i,biome44); | ||
ov44_bii_missing(t,i,biome44,"level") = v44_bii_missing.l(i,biome44); | ||
oq44_bii(t,i,biome44,"level") = q44_bii.l(i,biome44); | ||
oq44_bii_target(t,i,biome44,"level") = q44_bii_target.l(i,biome44); | ||
oq44_cost(t,i,"level") = q44_cost.l(i); | ||
ov_cost_bv_loss(t,j,"upper") = vm_cost_bv_loss.up(j); | ||
ov_bv(t,j,landcover44,potnatveg,"upper") = vm_bv.up(j,landcover44,potnatveg); | ||
ov44_bii(t,i,biome44,"upper") = v44_bii.up(i,biome44); | ||
ov44_bii_missing(t,i,biome44,"upper") = v44_bii_missing.up(i,biome44); | ||
oq44_bii(t,i,biome44,"upper") = q44_bii.up(i,biome44); | ||
oq44_bii_target(t,i,biome44,"upper") = q44_bii_target.up(i,biome44); | ||
oq44_cost(t,i,"upper") = q44_cost.up(i); | ||
ov_cost_bv_loss(t,j,"lower") = vm_cost_bv_loss.lo(j); | ||
ov_bv(t,j,landcover44,potnatveg,"lower") = vm_bv.lo(j,landcover44,potnatveg); | ||
ov44_bii(t,i,biome44,"lower") = v44_bii.lo(i,biome44); | ||
ov44_bii_missing(t,i,biome44,"lower") = v44_bii_missing.lo(i,biome44); | ||
oq44_bii(t,i,biome44,"lower") = q44_bii.lo(i,biome44); | ||
oq44_bii_target(t,i,biome44,"lower") = q44_bii_target.lo(i,biome44); | ||
oq44_cost(t,i,"lower") = q44_cost.lo(i); | ||
*##################### R SECTION END (OUTPUT DEFINITIONS) ###################### | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
*** | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK) | ||
*** | authors, and contributors see CITATION.cff file. This file is part | ||
*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
*** | AGPL-3.0, you are granted additional permissions described in the | ||
*** | MAgPIE License Exception, version 1.0 (see LICENSE file). | ||
*** | Contact: [email protected] | ||
|
||
v44_bii.l(i,biome44) = 0.75; | ||
|
||
v44_bii.fx(i,biome44)$(sum(cell(i,j), f44_biome(j,biome44)) = 0) = 0; | ||
v44_bii_missing.fx(i,biome44)$(sum(cell(i,j), f44_biome(j,biome44)) = 0) = 0; | ||
p44_bii_lower_bound(t,i,biome44) = 0; | ||
|
||
vm_bv.l(j,landcover44,potnatveg) = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
*** | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK) | ||
*** | authors, and contributors see CITATION.cff file. This file is part | ||
*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
*** | AGPL-3.0, you are granted additional permissions described in the | ||
*** | MAgPIE License Exception, version 1.0 (see LICENSE file). | ||
*** | Contact: [email protected] | ||
|
||
if(m_year(t) = s44_start_year, | ||
* The start value for the linear interpolation is the BII at biome level in the start year. | ||
p44_start_value(i,biome44) = v44_bii.l(i,biome44); | ||
* The target value for the linear interpolation is the lower bound defined in `s44_bii_lower_bound`. | ||
p44_target_value(i,biome44) = s44_bii_lower_bound; | ||
|
||
* Linear increase of BII target values at biome level from start year to target year, and constant values thereafter. | ||
p44_bii_lower_bound(t2,i,biome44) = p44_start_value(i,biome44) + ((m_year(t2) - s44_start_year) / (s44_target_year - s44_start_year)) * (p44_target_value(i,biome44) - p44_start_value(i,biome44)); | ||
p44_bii_lower_bound(t2,i,biome44)$(m_year(t2) > s44_target_year) = p44_target_value(i,biome44); | ||
if(c44_bii_decrease = 0, | ||
p44_bii_lower_bound(t2,i,biome44)$(v44_bii.l(i,biome44) >= p44_target_value(i,biome44)) = v44_bii.l(i,biome44); | ||
elseif c44_bii_decrease = 1, | ||
p44_bii_lower_bound(t2,i,biome44)$(v44_bii.l(i,biome44) >= p44_target_value(i,biome44)) = p44_target_value(i,biome44); | ||
); | ||
p44_bii_lower_bound(t2,i,biome44)$(p44_bii_lower_bound(t2,i,biome44) >= 1) = 1; | ||
p44_bii_lower_bound(t2,i,biome44)$(m_year(t2) < s44_start_year) = 0; | ||
p44_bii_lower_bound(t2,i,biome44)$(sum(cell(i,j), f44_biome(j,biome44)) = 0) = 0; | ||
* The lower bound of `v44_bii` is set to `p44_bii_lower_bound` to avoid a reduction of BII in combination with `v44_bii_missing`. | ||
v44_bii.lo(i,biome44) = p44_bii_lower_bound(t,i,biome44); | ||
display p44_bii_lower_bound; | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
*** | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK) | ||
*** | authors, and contributors see CITATION.cff file. This file is part | ||
*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
*** | AGPL-3.0, you are granted additional permissions described in the | ||
*** | MAgPIE License Exception, version 1.0 (see LICENSE file). | ||
*** | Contact: [email protected] | ||
|
||
*' @description In this realisation, the Biodiversity Intactness Index (BII) is | ||
*' calculated separately for each biome type of each biogeographic realm, which results in 71 different spatial units (@olson_biome_2001). | ||
*' The BII is a relative indicator, wich measures the intactness of local species assemblages (species richness) | ||
*' compared to a reference state (space-for-time approach) (@purvis_chapter_2018). | ||
*' The implementation uses the BII coefficients described in @leclere_biodiv_2018 and @leclere_bending_2020. | ||
*' The realisation allows to set a lower bound for the BII in the future, based on an annual growth rate. | ||
|
||
*' @limitations | ||
|
||
*####################### R SECTION START (PHASES) ############################## | ||
$Ifi "%phase%" == "sets" $include "./modules/44_biodiversity/bii_target_apr24/sets.gms" | ||
$Ifi "%phase%" == "declarations" $include "./modules/44_biodiversity/bii_target_apr24/declarations.gms" | ||
$Ifi "%phase%" == "input" $include "./modules/44_biodiversity/bii_target_apr24/input.gms" | ||
$Ifi "%phase%" == "equations" $include "./modules/44_biodiversity/bii_target_apr24/equations.gms" | ||
$Ifi "%phase%" == "preloop" $include "./modules/44_biodiversity/bii_target_apr24/preloop.gms" | ||
$Ifi "%phase%" == "presolve" $include "./modules/44_biodiversity/bii_target_apr24/presolve.gms" | ||
$Ifi "%phase%" == "postsolve" $include "./modules/44_biodiversity/bii_target_apr24/postsolve.gms" | ||
*######################## R SECTION END (PHASES) ############################### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
*** | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK) | ||
*** | authors, and contributors see CITATION.cff file. This file is part | ||
*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of | ||
*** | AGPL-3.0, you are granted additional permissions described in the | ||
*** | MAgPIE License Exception, version 1.0 (see LICENSE file). | ||
*** | Contact: [email protected] | ||
|
||
sets | ||
|
||
landcover44 land cover classes used in bii calculation | ||
/ crop_ann, crop_per, manpast, rangeland, urban, aff_ndc, aff_co2p, primforest, secdforest, other, plant / | ||
|
||
bii_class44 bii coefficent land cover classes | ||
/ crop_ann, crop_per, manpast, rangeland, urban, primary, secd_mature, secd_young, timber / | ||
|
||
bii_class_secd(bii_class44) bii coefficent land cover classes secondary vegetation | ||
/ secd_mature, secd_young / | ||
|
||
ac_to_bii_class_secd(ac,bii_class_secd) Mapping between forest ageclasses and bii coefficent land cover classes | ||
/ (ac0,ac5,ac10,ac15,ac20,ac25,ac30) . (secd_young) | ||
(ac35,ac40,ac45,ac50,ac55,ac60, | ||
ac65,ac70,ac75,ac80,ac85,ac90, | ||
ac95,ac100,ac105,ac110,ac115, | ||
ac120,ac125,ac130,ac135,ac140, | ||
ac145,ac150,ac155,acx) . (secd_mature) / | ||
|
||
biome44 biomes | ||
/ AA1,AA2,AA4,AA7,AA8,AA10,AA11,AA14,AN11,AT1,AT2,AT7,AT8,AT9,AT10,AT12,AT13,AT14,IM1, | ||
IM2,NA4,IM3,IM13,IM14,NA3,NA8,NA11,IM4,IM5,IM7,IM9,IM10,NT2,NA13,NT1,NT9,NT98,NT99, | ||
OC1,OC2,OC7,NT3,NT4,NT7,NT8,NT10,NT12,NT13,NT14,PA11,PA12,PA13,NA5,PA1,PA4,PA5,PA6, | ||
PA8,PA9,PA10,AN99,AT98,NA2,NA6,NA7,NA12,NA99,PA98,PA99,AA12,AA13 / | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters