Skip to content

Commit

Permalink
Merge pull request #750 from flohump/f_peatland2
Browse files Browse the repository at this point in the history
option for exogenous peatland rewetting
  • Loading branch information
flohump authored Nov 25, 2024
2 parents 8e21df5 + 212b4fe commit b1e7f23
Show file tree
Hide file tree
Showing 11 changed files with 221 additions and 37 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- **scripts** add mrdownscale script (0.5deg downscaling using LandUseInit as reference)
- **32_forestry** added option s32_npi_ndc_reversal
- **35_natveg** added option s35_npi_ndc_reversal
- **58_peatland** added option for exogenous peatland rewetting

### removed
- **31_past** removed `grasslands_apr22` realization
Expand Down
28 changes: 27 additions & 1 deletion config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -1723,6 +1723,32 @@ cfg$gms$peatland <- "v2" # def = v2
# * Inf (on)
cfg$gms$s58_rewetting_switch <- Inf # def = Inf

# * Switch and specification of countries for selected policies in apply.
# * Options: list of iso-codes of countries where exogenous peatland rewetting should be applied
# * Note: must be written in the format: "IND, BRA, DEU"
# * Default: all iso countries
cfg$gms$policy_countries58 <- all_iso_countries

# * Switch for exogenous peatland rewetting for selected countries (0=off, 1=on)
cfg$gms$s58_rewetting_exo <- 0 # def = 0
# * Switch for exogenous peatland rewetting for all other countries (0=off, 1=on)
cfg$gms$s58_rewetting_exo_noselect <- 0 # def = 0
# * The following default values for exogenous peatland rewetting are based on the
# * Nature Restoration Law (NRL): 30 % by 2030, 40% by 2040, 50% by 2050
# * Start year for exogenous peatland rewetting
cfg$gms$s58_rewet_exo_start_year <- 2030 # def = 2030
# * Target year for exogenous peatland rewetting
cfg$gms$s58_rewet_exo_target_year <- 2050 # def = 2050
# * Start value for exogenous peatland rewetting as share of drained peatland in reference period
cfg$gms$s58_rewet_exo_start_value <- 0.3 # def = 0.3
# * Target value for exogenous peatland rewetting as share of drained peatland in reference period
cfg$gms$s58_rewet_exo_target_value <- 0.5 # def = 0.5

# * Switch for exogenous protection of intact peatland for selected countries (0=off, 1=on)
cfg$gms$s58_intact_prot_exo <- 0 # def = 0
# * Switch for exogenous protection of intact peatland for all other countries (0=off, 1=on)
cfg$gms$s58_intact_prot_exo_noselect <- 0 # def = 0

# * One-time and recurring costs for peatland rewetting (USD17MER per ha)
# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate:1.23)
cfg$gms$s58_cost_rewet_onetime <- 1230 # def = 1000 * 1.23
Expand All @@ -1731,7 +1757,7 @@ cfg$gms$s58_cost_rewet_recur <- 37 # def = 30 * 1.23
# * One-time and recurring costs for peatland drainage (USD17MER per ha)
# * One-time costs apply on the drainage of intact and rewetted peatland
# * Recurring costs apply on the level of drained and managed peatland
cfg$gms$s58_cost_drain_intact_onetime <- 0 # def = 0
cfg$gms$s58_cost_drain_intact_onetime <- 1230 # def = 1230
cfg$gms$s58_cost_drain_rewet_onetime <- 0 # def = 0
cfg$gms$s58_cost_drain_recur <- 0 # def = 0

Expand Down
1 change: 1 addition & 0 deletions modules/58_peatland/input/files
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
* list of files that are required here
f58_ipcc_wetland_ef2.cs3
f58_peatland_area.cs3
f58_peatland_area_iso.cs3
14 changes: 10 additions & 4 deletions modules/58_peatland/v2/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ parameters
p58_scalingFactorRed(t,j,manPeat58) Scaling factor for peatland reduction (1)
p58_mapping_cell_climate(j,clcl58) Mapping between cells and climate regions (binary)
i58_cost_rewet_recur(t) Recurring costs for rewetted peatland (USD17MER per ha)
i58_cost_rewet_onetime(t) One-time costs for peatland rewetting (USD17MER per ha)
i58_cost_drain_recur(t) Recurring costs for drained and managed peatlands (USD17MER per ha)
i58_cost_drain_intact_onetime(t) One-time costs for drainage of intact peatland (USD17MER per ha)
i58_cost_drain_rewet_onetime(t) One-time costs for drainage of rewetted peatland (USD17MER per ha)
i58_cost_onetime(t,cost58) One-time costs for peatland rewetting and drainage (USD17MER per ha)
p58_availPeatlandExp(t,j) Available area for expansion of drained peatland (mio. ha)
p58_availLandExp(t,j) Available area for expansion of managed land (mio. ha)
i58_peatland_rewetting_fader(t_all) Temporal fader for exogenous peatland rewetting (1)
p58_peatland_ref(j,land58) Peatland area in reference period (mio. ha)
p58_country_dummy(iso) Dummy parameter indicating whether country is affected by exogenous peatland rewetting (1)
p58_country_weight(i) Policy country weight per region (1)
i58_rewetting_exo(t,j) Cellular share of drained peatland in reference period to be rewetted (1)
i58_intact_protection_exo(j) Cellular share of intact peatland that should be protected (1)
;

equations
Expand All @@ -28,10 +32,11 @@ equations
q58_manLandRed(j,manPeat58) Managed land area reduction (mio. ha)
q58_peatlandMan(j,manPeat58) Change of managed peatland area (mio. ha)
q58_peatlandMan2(j,manPeat58) Contraint for managed peatland area (mio. ha)
q58_rewetting_exo(j,manPeat58) Constraint for exogenous peatland rewetting (mio. ha)
q58_peatland_cost(j) One-time and recurring cost of peatland conversion and management (mio. USD17MER per yr)
q58_peatland_cost_annuity(j,cost58) Annuity costs for peatland conversion in the current timestep (mio. USD17MER per yr)
q58_peatland_emis_detail(j,land58,emis58) Detailed GHG emissions from peatlands (Tg per yr)
q58_peatland_emis(i,poll58) GHG emissions from managed peatland (Tg per yr)
q58_peatland_emis(i,poll58) GHG emissions from managed peatland (Tg per yr)
;

variables
Expand Down Expand Up @@ -69,6 +74,7 @@ parameters
oq58_manLandRed(t,j,manPeat58,type) Managed land area reduction (mio. ha)
oq58_peatlandMan(t,j,manPeat58,type) Change of managed peatland area (mio. ha)
oq58_peatlandMan2(t,j,manPeat58,type) Contraint for managed peatland area (mio. ha)
oq58_rewetting_exo(t,j,manPeat58,type) Constraint for exogenous peatland rewetting (mio. ha)
oq58_peatland_cost(t,j,type) One-time and recurring cost of peatland conversion and management (mio. USD17MER per yr)
oq58_peatland_cost_annuity(t,j,cost58,type) Annuity costs for peatland conversion in the current timestep (mio. USD17MER per yr)
oq58_peatland_emis_detail(t,j,land58,emis58,type) Detailed GHG emissions from peatlands (Tg per yr)
Expand Down
10 changes: 7 additions & 3 deletions modules/58_peatland/v2/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
q58_peatlandMan2(j2,manPeat58)$(sum(ct, m_year(ct)) > s58_fix_peatland) ..
v58_peatland(j2,manPeat58) =l= v58_manLand(j2,manPeat58);

*' Constraint for optional exogenous peatland rewetting

q58_rewetting_exo(j2,manPeat58)$(sum(ct, m_year(ct)) > s58_fix_peatland) ..
v58_peatland(j2,"rewetted") =g=
sum(drained58, p58_peatland_ref(j2,drained58)) * sum(ct, i58_rewetting_exo(ct,j2));

*' Costs for peatland degradation and rewetting

q58_peatland_cost(j2) ..
Expand All @@ -64,9 +70,7 @@

q58_peatland_cost_annuity(j2,cost58) ..
v58_peatland_cost_annuity(j2,cost58) =g=
(- v58_peatlandChange(j2,"intact") * sum(ct, i58_cost_drain_intact_onetime(ct)))$sameas(cost58,"drain_intact")
+ (- v58_peatlandChange(j2,"rewetted") * sum(ct, i58_cost_drain_rewet_onetime(ct)))$sameas(cost58,"drain_rewetted")
+ (v58_peatlandChange(j2,"rewetted") * sum(ct, i58_cost_rewet_onetime(ct)))$sameas(cost58,"rewet")
sum(map_cost58(intact58,cost58), v58_peatlandChange(j2,intact58)) * sum(ct, i58_cost_onetime(ct,cost58))
* sum((cell(i2,j2),ct),pm_interest(ct,i2)/(1+pm_interest(ct,i2)));

*' Detailed peatland GHG emissions
Expand Down
62 changes: 54 additions & 8 deletions modules/58_peatland/v2/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,53 @@
*** | Contact: [email protected]

scalars
s58_cost_rewet_recur Recurring costs for rewetted peatland (USD17MER per ha) / 37 /
s58_cost_rewet_onetime One-time costs for peatland rewetting (USD17MER per ha) / 1230 /
s58_cost_drain_recur Recurring costs for drained and managed peatlands (USD17MER per ha) / 0 /
s58_cost_drain_intact_onetime One-time costs for drainage of intact peatland (USD17MER per ha) / 0 /
s58_cost_drain_rewet_onetime One-time costs for drainage of rewetted peatland (USD17MER per ha) / 0 /
s58_rewetting_switch Peatland rewetting on (Inf) or off (0) / Inf /
s58_fix_peatland Year indicating until when peatland area should be fixed (year) / 2020 /
s58_balance_penalty Penalty for technical peatland balance term (USD17MER) / 1e+06 /
s58_cost_rewet_recur Recurring costs for rewetted peatland (USD17MER per ha) / 37 /
s58_cost_rewet_onetime One-time costs for peatland rewetting (USD17MER per ha) / 1230 /
s58_cost_drain_recur Recurring costs for drained and managed peatlands (USD17MER per ha) / 0 /
s58_cost_drain_intact_onetime One-time costs for drainage of intact peatland (USD17MER per ha) / 0 /
s58_cost_drain_rewet_onetime One-time costs for drainage of rewetted peatland (USD17MER per ha) / 0 /
s58_rewetting_switch Peatland rewetting on (Inf) or off (0) / Inf /
s58_fix_peatland Year indicating until when peatland area should be fixed (year) / 2020 /
s58_balance_penalty Penalty for technical peatland balance term (USD17MER) / 1e+06 /
s58_rewetting_exo Switch for exogenous peatland rewetting for selected countries (1) / 0 /
s58_rewetting_exo_noselect Switch for exogenous peatland rewetting for all other countries (1) / 0 /
s58_rewet_exo_start_year Start year for exogenous peatland rewetting (1) / 2030 /
s58_rewet_exo_target_year Target year for exogenous peatland rewetting (1) / 2050 /
s58_rewet_exo_start_value Start value for exogenous peatland rewetting as share of drained peatland in reference period (1) / 0.3 /
s58_rewet_exo_target_value Target value for exogenous peatland rewetting as share of drained peatland in reference period (1) / 0.5 /
s58_intact_prot_exo Switch for exogenous protection of intact peatland for selected countries (1) / 0 /
s58_intact_prot_exo_noselect Switch for exogenous protection of intact peatland for all other countries (1) / 0 /
;

* Set-switch for countries affected by certain policies
* Default: all iso countries selected
sets
policy_countries58(iso) countries to be affected by exogenous peatland rewetting
/ ABW,AFG,AGO,AIA,ALA,ALB,AND,ARE,ARG,ARM,
ASM,ATA,ATF,ATG,AUS,AUT,AZE,BDI,BEL,BEN,
BES,BFA,BGD,BGR,BHR,BHS,BIH,BLM,BLR,BLZ,
BMU,BOL,BRA,BRB,BRN,BTN,BVT,BWA,CAF,CAN,
CCK,CHN,CHE,CHL,CIV,CMR,COD,COG,COK,COL,
COM,CPV,CRI,CUB,CUW,CXR,CYM,CYP,CZE,DEU,
DJI,DMA,DNK,DOM,DZA,ECU,EGY,ERI,ESH,ESP,
EST,ETH,FIN,FJI,FLK,FRA,FRO,FSM,GAB,GBR,
GEO,GGY,GHA,GIB,GIN,GLP,GMB,GNB,GNQ,GRC,
GRD,GRL,GTM,GUF,GUM,GUY,HKG,HMD,HND,HRV,
HTI,HUN,IDN,IMN,IND,IOT,IRL,IRN,IRQ,ISL,
ISR,ITA,JAM,JEY,JOR,JPN,KAZ,KEN,KGZ,KHM,
KIR,KNA,KOR,KWT,LAO,LBN,LBR,LBY,LCA,LIE,
LKA,LSO,LTU,LUX,LVA,MAC,MAF,MAR,MCO,MDA,
MDG,MDV,MEX,MHL,MKD,MLI,MLT,MMR,MNE,MNG,
MNP,MOZ,MRT,MSR,MTQ,MUS,MWI,MYS,MYT,NAM,
NCL,NER,NFK,NGA,NIC,NIU,NLD,NOR,NPL,NRU,
NZL,OMN,PAK,PAN,PCN,PER,PHL,PLW,PNG,POL,
PRI,PRK,PRT,PRY,PSE,PYF,QAT,REU,ROU,RUS,
RWA,SAU,SDN,SEN,SGP,SGS,SHN,SJM,SLB,SLE,
SLV,SMR,SOM,SPM,SRB,SSD,STP,SUR,SVK,SVN,
SWE,SWZ,SXM,SYC,SYR,TCA,TCD,TGO,THA,TJK,
TKL,TKM,TLS,TON,TTO,TUN,TUR,TUV,TWN,TZA,
UGA,UKR,UMI,URY,USA,UZB,VAT,VCT,VEN,VGB,
VIR,VNM,VUT,WLF,WSM,YEM,ZAF,ZMB,ZWE /
;

*Peatland area based on Global Peatland Map 2.0 and Global Peatland Database
Expand All @@ -23,6 +62,13 @@ $include "./modules/58_peatland/input/f58_peatland_area.cs3"
$offdelim
;

*Peatland area based on Global Peatland Map 2.0 and Global Peatland Database
table f58_peatland_area_iso(iso,land58) Peatland area (mio. ha)
$ondelim
$include "./modules/58_peatland/input/f58_peatland_area_iso.cs3"
$offdelim
;

*Wetland GHG emission factors based on IPCC Wetlands 2014 and Tiemeyer et al. 2020
table f58_ipcc_wetland_ef(clcl58,land58,emis58) Wetland emission factors (Tg per yr)
$ondelim
Expand Down
4 changes: 4 additions & 0 deletions modules/58_peatland/v2/postsolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ pc58_manLand(j,manPeat58) = v58_manLand.l(j,manPeat58);
oq58_manLandRed(t,j,manPeat58,"marginal") = q58_manLandRed.m(j,manPeat58);
oq58_peatlandMan(t,j,manPeat58,"marginal") = q58_peatlandMan.m(j,manPeat58);
oq58_peatlandMan2(t,j,manPeat58,"marginal") = q58_peatlandMan2.m(j,manPeat58);
oq58_rewetting_exo(t,j,manPeat58,"marginal") = q58_rewetting_exo.m(j,manPeat58);
oq58_peatland_cost(t,j,"marginal") = q58_peatland_cost.m(j);
oq58_peatland_cost_annuity(t,j,cost58,"marginal") = q58_peatland_cost_annuity.m(j,cost58);
oq58_peatland_emis_detail(t,j,land58,emis58,"marginal") = q58_peatland_emis_detail.m(j,land58,emis58);
Expand All @@ -47,6 +48,7 @@ pc58_manLand(j,manPeat58) = v58_manLand.l(j,manPeat58);
oq58_manLandRed(t,j,manPeat58,"level") = q58_manLandRed.l(j,manPeat58);
oq58_peatlandMan(t,j,manPeat58,"level") = q58_peatlandMan.l(j,manPeat58);
oq58_peatlandMan2(t,j,manPeat58,"level") = q58_peatlandMan2.l(j,manPeat58);
oq58_rewetting_exo(t,j,manPeat58,"level") = q58_rewetting_exo.l(j,manPeat58);
oq58_peatland_cost(t,j,"level") = q58_peatland_cost.l(j);
oq58_peatland_cost_annuity(t,j,cost58,"level") = q58_peatland_cost_annuity.l(j,cost58);
oq58_peatland_emis_detail(t,j,land58,emis58,"level") = q58_peatland_emis_detail.l(j,land58,emis58);
Expand All @@ -68,6 +70,7 @@ pc58_manLand(j,manPeat58) = v58_manLand.l(j,manPeat58);
oq58_manLandRed(t,j,manPeat58,"upper") = q58_manLandRed.up(j,manPeat58);
oq58_peatlandMan(t,j,manPeat58,"upper") = q58_peatlandMan.up(j,manPeat58);
oq58_peatlandMan2(t,j,manPeat58,"upper") = q58_peatlandMan2.up(j,manPeat58);
oq58_rewetting_exo(t,j,manPeat58,"upper") = q58_rewetting_exo.up(j,manPeat58);
oq58_peatland_cost(t,j,"upper") = q58_peatland_cost.up(j);
oq58_peatland_cost_annuity(t,j,cost58,"upper") = q58_peatland_cost_annuity.up(j,cost58);
oq58_peatland_emis_detail(t,j,land58,emis58,"upper") = q58_peatland_emis_detail.up(j,land58,emis58);
Expand All @@ -89,6 +92,7 @@ pc58_manLand(j,manPeat58) = v58_manLand.l(j,manPeat58);
oq58_manLandRed(t,j,manPeat58,"lower") = q58_manLandRed.lo(j,manPeat58);
oq58_peatlandMan(t,j,manPeat58,"lower") = q58_peatlandMan.lo(j,manPeat58);
oq58_peatlandMan2(t,j,manPeat58,"lower") = q58_peatlandMan2.lo(j,manPeat58);
oq58_rewetting_exo(t,j,manPeat58,"lower") = q58_rewetting_exo.lo(j,manPeat58);
oq58_peatland_cost(t,j,"lower") = q58_peatland_cost.lo(j);
oq58_peatland_cost_annuity(t,j,cost58,"lower") = q58_peatland_cost_annuity.lo(j,cost58);
oq58_peatland_emis_detail(t,j,land58,emis58,"lower") = q58_peatland_emis_detail.lo(j,land58,emis58);
Expand Down
23 changes: 23 additions & 0 deletions modules/58_peatland/v2/preloop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,33 @@
*** | MAgPIE License Exception, version 1.0 (see LICENSE file).
*** | Contact: [email protected]

* linear fader for exogenous peatland rewetting
m_linear_time_interpol(i58_peatland_rewetting_fader,s58_rewet_exo_start_year,s58_rewet_exo_target_year,s58_rewet_exo_start_value,s58_rewet_exo_target_value);

* Country switch to determine countries for which certain policies shall be applied.
* In the default case, the policy affects all countries when activated.
p58_country_dummy(iso) = 0;
p58_country_dummy(policy_countries58) = 1;
* Because MAgPIE is not run at country-level, but at region level, a region
* share is calculated that translates the countries' influence to regional level.
* Countries are weighted by total peatland area.
p58_country_weight(i) = sum(i_to_iso(i,iso), p58_country_dummy(iso) * sum(land58, f58_peatland_area_iso(iso,land58)))
/ sum(i_to_iso(i,iso), sum(land58, f58_peatland_area_iso(iso,land58)));

* construct exogenous peatland rewetting scenario
i58_rewetting_exo(t,j) = i58_peatland_rewetting_fader(t) *
(s58_rewetting_exo * sum(cell(i,j), p58_country_weight(i))
+ s58_rewetting_exo_noselect * sum(cell(i,j), 1-p58_country_weight(i)));

i58_intact_protection_exo(j) = s58_intact_prot_exo * sum(cell(i,j), p58_country_weight(i))
+ s58_intact_prot_exo_noselect * sum(cell(i,j), 1-p58_country_weight(i));

* fix uncontrolled pollutants to zero
vm_emissions_reg.fx(i,"peatland",pollutants) = 0;
vm_emissions_reg.lo(i,"peatland",poll58) = -Inf;
vm_emissions_reg.up(i,"peatland",poll58) = Inf;

* Mapping between detailed and simple climate classes
p58_mapping_cell_climate(j,clcl58) = sum(clcl_mapping(clcl,clcl58),pm_climate_class(j,clcl));

* Initialization of peatland area
Expand Down
16 changes: 9 additions & 7 deletions modules/58_peatland/v2/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@ if (m_year(t) <= s58_fix_peatland,

i58_cost_rewet_recur(t) = 0;
i58_cost_drain_recur(t) = 0;
i58_cost_drain_intact_onetime(t) = 0;
i58_cost_drain_rewet_onetime(t) = 0;
i58_cost_rewet_onetime(t) = 0;
i58_cost_onetime(t,cost58) = 0;

* save area in reference period
p58_peatland_ref(j,land58)$(m_year(t) = s58_fix_peatland) = pc58_peatland(j,land58);
else
* Define bounds and costs for peatland area after the year given by s58_fix_peatland
v58_peatland.lo(j,land58) = 0;
v58_peatland.l(j,land58) = pc58_peatland(j,land58);
v58_peatland.up(j,drained58) = Inf;
v58_peatland.up(j,drained58) = sum(land58, pc58_peatland(j,land58));
v58_peatland.up(j,"rewetted") = s58_rewetting_switch;
v58_peatland.lo(j,"intact") = pc58_peatland(j,"intact") * i58_intact_protection_exo(j);
v58_peatland.up(j,"intact") = pc58_peatland(j,"intact");
v58_peatland.fx(j,"peatExtract") = pc58_peatland(j,"peatExtract");
v58_balance.lo(j,manPeat58) = 0;
Expand All @@ -44,9 +46,9 @@ else

i58_cost_rewet_recur(t) = s58_cost_rewet_recur;
i58_cost_drain_recur(t) = s58_cost_drain_recur;
i58_cost_drain_intact_onetime(t) = s58_cost_drain_intact_onetime;
i58_cost_drain_rewet_onetime(t) = s58_cost_drain_rewet_onetime;
i58_cost_rewet_onetime(t) = s58_cost_rewet_onetime;
i58_cost_onetime(t,"drain_intact") = -s58_cost_drain_intact_onetime;
i58_cost_onetime(t,"drain_rewetted") = -s58_cost_drain_rewet_onetime;
i58_cost_onetime(t,"rewetted") = s58_cost_rewet_onetime;
);

*' @code
Expand Down
13 changes: 11 additions & 2 deletions modules/58_peatland/v2/sets.gms
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,29 @@ sets
manPeat58(land58) Drained and managed peatland categories
/ crop, past, forestry /

intact58(land58) intact and rewetted peatland categories
/ intact, rewetted /

cost58 annunity cost categories
/ drain_intact, drain_rewetted, rewet /
/ drain_intact, drain_rewetted, rewetted /

map_cost58(intact58,cost58) Mapping between intact58 and cost58
/ intact .(drain_intact)
rewetted .(drain_rewetted)
rewetted .(rewetted) /

emis58 Wetland emission types
/ co2, doc, ch4, n2o /

emisSub58(emis58) Wetland emission types
/ co2, ch4, n2o /
/ co2, doc, ch4, n2o /

poll58(pollutants) Wetland emissions that can be taxed
/ co2_c, ch4, n2o_n_direct /

emisSub58_to_poll58(emisSub58,poll58) Mapping
/ co2 .(co2_c)
doc .(co2_c)
ch4 .(ch4)
n2o .(n2o_n_direct) /

Expand Down
Loading

0 comments on commit b1e7f23

Please sign in to comment.