From 32f577b1092136e2ab02e0fa20002cd77dedae73 Mon Sep 17 00:00:00 2001 From: florianh Date: Wed, 28 Feb 2024 14:21:04 +0100 Subject: [PATCH 01/21] added input files --- modules/30_crop/endo_apr21/input/files | 6 ++++++ modules/30_crop/penalty_apr22/input/files | 6 ++++++ modules/30_crop/rotation_apr22/input/files | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/modules/30_crop/endo_apr21/input/files b/modules/30_crop/endo_apr21/input/files index d3bdc6145d..51ae5943da 100644 --- a/modules/30_crop/endo_apr21/input/files +++ b/modules/30_crop/endo_apr21/input/files @@ -5,3 +5,9 @@ avl_cropland.cs3 avl_cropland_0.5.mz f30_croparea_w_initialisation.cs3 avl_cropland_iso.cs3 +SNVTargetCropland.cs3 +SNVTargetCropland_iso.cs3 +SNVTargetCropland_0.5.mz +CroplandTreecover.cs3 +CroplandTreecover_iso.cs3 +CroplandTreecover_0.5.mz diff --git a/modules/30_crop/penalty_apr22/input/files b/modules/30_crop/penalty_apr22/input/files index af07706adc..e9e1ff7721 100644 --- a/modules/30_crop/penalty_apr22/input/files +++ b/modules/30_crop/penalty_apr22/input/files @@ -5,3 +5,9 @@ avl_cropland.cs3 avl_cropland_0.5.mz f30_croparea_w_initialisation.cs3 avl_cropland_iso.cs3 +SNVTargetCropland.cs3 +SNVTargetCropland_iso.cs3 +SNVTargetCropland_0.5.mz +CroplandTreecover.cs3 +CroplandTreecover_iso.cs3 +CroplandTreecover_0.5.mz diff --git a/modules/30_crop/rotation_apr22/input/files b/modules/30_crop/rotation_apr22/input/files index 960da6079d..1a20d41818 100644 --- a/modules/30_crop/rotation_apr22/input/files +++ b/modules/30_crop/rotation_apr22/input/files @@ -5,3 +5,9 @@ avl_cropland.cs3 avl_cropland_0.5.mz f30_croparea_w_initialisation.cs3 avl_cropland_iso.cs3 +SNVTargetCropland.cs3 +SNVTargetCropland_iso.cs3 +SNVTargetCropland_0.5.mz +CroplandTreecover.cs3 +CroplandTreecover_iso.cs3 +CroplandTreecover_0.5.mz From b6c7bde91d35ac411116b6b575d12eb983def58c Mon Sep 17 00:00:00 2001 From: florianh Date: Wed, 28 Feb 2024 22:24:43 +0100 Subject: [PATCH 02/21] read file --- modules/30_crop/endo_apr21/declarations.gms | 1 + modules/30_crop/endo_apr21/input.gms | 7 +++++++ modules/30_crop/endo_apr21/preloop.gms | 2 ++ modules/30_crop/endo_apr21/sets.gms | 3 +++ 4 files changed, 13 insertions(+) diff --git a/modules/30_crop/endo_apr21/declarations.gms b/modules/30_crop/endo_apr21/declarations.gms index 628262432a..757fa218db 100644 --- a/modules/30_crop/endo_apr21/declarations.gms +++ b/modules/30_crop/endo_apr21/declarations.gms @@ -13,6 +13,7 @@ parameters i30_avl_cropland_iso(iso) Available land area for cropland at ISO level (mio. ha) p30_snv_scenario_fader(t_all) SNV scenario fader (1) p30_rotation_scenario_fader(t_all) Crop rotation scenario fader (1) + i30_cropland_treecover(j) Cropland area covered by trees (mio. ha) ; positive variables diff --git a/modules/30_crop/endo_apr21/input.gms b/modules/30_crop/endo_apr21/input.gms index db30cd69a8..a6ed3f59ae 100644 --- a/modules/30_crop/endo_apr21/input.gms +++ b/modules/30_crop/endo_apr21/input.gms @@ -113,3 +113,10 @@ $include "./modules/30_crop/endo_apr21/input/avl_cropland_iso.cs3" $offdelim ; +********* CroplandTreecover ******************************************* + +table f30_cropland_treecover(j,crop_treecover30) Cropland area covered by trees (mio. ha) +$ondelim +$include "./modules/30_crop/endo_apr21/input/CroplandTreecover.cs3" +$offdelim +; diff --git a/modules/30_crop/endo_apr21/preloop.gms b/modules/30_crop/endo_apr21/preloop.gms index 695f756062..05db71b457 100644 --- a/modules/30_crop/endo_apr21/preloop.gms +++ b/modules/30_crop/endo_apr21/preloop.gms @@ -25,3 +25,5 @@ p30_country_dummy(policy_countries30) = 1; * Countries are weighted by available cropland area. i30_avl_cropland_iso(iso) = f30_avl_cropland_iso(iso,"%c30_marginal_land%"); p30_country_snv_weight(i) = sum(i_to_iso(i,iso), p30_country_dummy(iso) * i30_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), i30_avl_cropland_iso(iso)); + +i30_cropland_treecover(j) = f30_cropland_treecover(j,"CropTreecoverArea"); diff --git a/modules/30_crop/endo_apr21/sets.gms b/modules/30_crop/endo_apr21/sets.gms index e32d366b49..3c14c5a663 100644 --- a/modules/30_crop/endo_apr21/sets.gms +++ b/modules/30_crop/endo_apr21/sets.gms @@ -53,4 +53,7 @@ sets policy_target30 Target year for cropland policy / none, by2030, by2050 / + + crop_treecover30 + / CropTreecoverArea / ; From 5c444f5f6870227ef34dbde575dc390e25cbf870 Mon Sep 17 00:00:00 2001 From: florianh Date: Thu, 29 Feb 2024 09:03:26 +0100 Subject: [PATCH 03/21] AgroForestry implementation --- modules/30_crop/endo_apr21/declarations.gms | 7 ++++++- modules/30_crop/endo_apr21/equations.gms | 12 ++++++++++++ modules/30_crop/endo_apr21/input.gms | 8 +++++++- modules/30_crop/endo_apr21/postsolve.gms | 1 + modules/30_crop/endo_apr21/preloop.gms | 9 ++++++--- modules/30_crop/endo_apr21/presolve.gms | 9 +++++++-- modules/30_crop/endo_apr21/sets.gms | 4 ++++ 7 files changed, 43 insertions(+), 7 deletions(-) diff --git a/modules/30_crop/endo_apr21/declarations.gms b/modules/30_crop/endo_apr21/declarations.gms index 757fa218db..1a2a1d75e6 100644 --- a/modules/30_crop/endo_apr21/declarations.gms +++ b/modules/30_crop/endo_apr21/declarations.gms @@ -7,13 +7,16 @@ parameters p30_avl_cropland(t,j) Total available land for crop cultivation (mio. ha) - p30_country_snv_weight(i) SNV policy country weight per region (1) + p30_country_weight(i) SNV and AgroForestry policy country weight per region (1) p30_snv_shr(t,j) Share of semi-natural vegetation in cropland areas (1) + p30_agfor_shr(t,j) Share of AgroForestry in cropland areas (1) p30_country_dummy(iso) Dummy parameter indicating whether country is affected by selected SNV policy (1) i30_avl_cropland_iso(iso) Available land area for cropland at ISO level (mio. ha) p30_snv_scenario_fader(t_all) SNV scenario fader (1) + p30_agfor_scenario_fader(t_all) AgroForestry scenario fader (1) p30_rotation_scenario_fader(t_all) Crop rotation scenario fader (1) i30_cropland_treecover(j) Cropland area covered by trees (mio. ha) + p30_land_agfor_start_year(j,land) Land area in start year of AgroForestry policy (mio. ha) ; positive variables @@ -33,6 +36,8 @@ equations q30_bv_ann(j,potnatveg) Biodiversity value of annual cropland (mio. ha) q30_bv_per(j,potnatveg) Biodiversity value of perennial cropland (mio. ha) q30_land_snv(j) Land constraint for the SNV policy in cropland areas (mio. ha) + q30_land_agfor(j) Land constraint for AgroForestry policy in cropland areas (mio. ha) + q30_land_agfor_trans(j) Land transition constraint for AgroForestry policy in cropland areas (mio. ha) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### diff --git a/modules/30_crop/endo_apr21/equations.gms b/modules/30_crop/endo_apr21/equations.gms index da0f4ce868..9b786683c5 100644 --- a/modules/30_crop/endo_apr21/equations.gms +++ b/modules/30_crop/endo_apr21/equations.gms @@ -32,6 +32,18 @@ sum(ct, p30_snv_shr(ct,j2)) * vm_land(j2,"crop") + sum((ct,land_snv,consv_type), pm_land_conservation(ct,j2,land_snv,consv_type)); + q30_land_agfor(j2) .. + sum(land_agfor, vm_land(j2,land_agfor) - p30_land_agfor_start_year(j2,land_agfor)) + =g= + sum(ct, p30_agfor_shr(ct,j2)) * vm_land(j2,"crop") - i30_cropland_treecover(j2); + + q30_land_agfor_trans(j2) .. + sum(land_agfor, vm_lu_transitions(j2,"crop",land_agfor)) + =g= + vm_land(j2,"crop") * (sum(ct, p30_agfor_shr(ct,j2)) - sum(pt, p30_agfor_shr(pt,j2))); + + + *' As additional constraints minimum and maximum rotational constraints limit *' the placing of crops. On the one hand, these rotational constraints reflect *' crop rotations limiting the share a specific crop can cover of the total area diff --git a/modules/30_crop/endo_apr21/input.gms b/modules/30_crop/endo_apr21/input.gms index a6ed3f59ae..ef4fee8c21 100644 --- a/modules/30_crop/endo_apr21/input.gms +++ b/modules/30_crop/endo_apr21/input.gms @@ -23,8 +23,14 @@ $setglobal c30_rotation_constraints on scalars s30_snv_shr Share of available cropland that is witheld for other land cover types (1) / 0 / s30_snv_shr_noselect Share of available cropland that is witheld for other land cover types (1) / 0 / -s30_snv_scenario_start SNV scenario start year / 2020 / +s30_snv_scenario_start SNV scenario start year / 2020 / s30_snv_scenario_target SNV scenario target year / 2030 / + +s30_agfor_shr Share of cropland used for AgroForestry in target year (1) / 0.2 / +s30_agfor_shr_noselect Share of cropland used for AgroForestry in target year (1) / 0 / +s30_agfor_scenario_start AgroForestry scenario start year / 2020 / +s30_agfor_scenario_target AgroForestry scenario target year / 2050 / + s30_rotation_scenario_start Rotation scenario start year / 2020 / s30_rotation_scenario_target Rotation scenario target year / 2050 / ; diff --git a/modules/30_crop/endo_apr21/postsolve.gms b/modules/30_crop/endo_apr21/postsolve.gms index 33550027e2..021717157d 100644 --- a/modules/30_crop/endo_apr21/postsolve.gms +++ b/modules/30_crop/endo_apr21/postsolve.gms @@ -5,6 +5,7 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de +p30_land_agfor_start_year(j,land)$(m_year(t) = s30_agfor_scenario_start) = vm_land.l(j,land); *#################### R SECTION START (OUTPUT DEFINITIONS) ##################### ov_fallow(t,j,"marginal") = vm_fallow.m(j); diff --git a/modules/30_crop/endo_apr21/preloop.gms b/modules/30_crop/endo_apr21/preloop.gms index 05db71b457..7d0f2574b1 100644 --- a/modules/30_crop/endo_apr21/preloop.gms +++ b/modules/30_crop/endo_apr21/preloop.gms @@ -8,6 +8,7 @@ ** Trajectory for cropland scenarios * sigmoidal interpolation between start year and target year m_sigmoid_interpol(p30_snv_scenario_fader,s30_snv_scenario_start,s30_snv_scenario_target,0,1); +m_sigmoid_interpol(p30_agfor_scenario_fader,s30_agfor_scenario_start,s30_agfor_scenario_target,0,1); m_sigmoid_interpol(p30_rotation_scenario_fader,s30_rotation_scenario_start,s30_rotation_scenario_target,0,1); *due to some rounding errors the input data currently may contain in some cases @@ -16,14 +17,16 @@ m_sigmoid_interpol(p30_rotation_scenario_fader,s30_rotation_scenario_start,s30_r fm_croparea(t_past,j,w,kcr)$(fm_croparea(t_past,j,w,kcr)<0) = 0; ****** Regional share of semi-natural vegetation (SNV) in cropland areas for selective countries: -* Country switch to determine countries for which a SNV policy shall be applied. -* In the default case, the SNV policy affects all countries when activated. +* Country switch to determine countries for which a SNV or AgroForestry policy shall be applied. +* In the default case, the SNV and AgroForestry policies affect all countries when activated. p30_country_dummy(iso) = 0; p30_country_dummy(policy_countries30) = 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 available cropland area. i30_avl_cropland_iso(iso) = f30_avl_cropland_iso(iso,"%c30_marginal_land%"); -p30_country_snv_weight(i) = sum(i_to_iso(i,iso), p30_country_dummy(iso) * i30_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), i30_avl_cropland_iso(iso)); +p30_country_weight(i) = sum(i_to_iso(i,iso), p30_country_dummy(iso) * i30_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), i30_avl_cropland_iso(iso)); i30_cropland_treecover(j) = f30_cropland_treecover(j,"CropTreecoverArea"); + +p30_land_agfor_start_year(j,land) = 0; diff --git a/modules/30_crop/endo_apr21/presolve.gms b/modules/30_crop/endo_apr21/presolve.gms index efcc51f181..10f5f2eced 100644 --- a/modules/30_crop/endo_apr21/presolve.gms +++ b/modules/30_crop/endo_apr21/presolve.gms @@ -30,8 +30,13 @@ crpmin30(crp30) = yes$(f30_rotation_min_shr(crp30) > 0); *' @code *' Minimum semi-natural vegetation (SNV) share is fading in after 2020 p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * - (s30_snv_shr * sum(cell(i,j), p30_country_snv_weight(i)) - + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); + (s30_snv_shr * sum(cell(i,j), p30_country_weight(i)) + + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_weight(i))); + +*' Minimum semi-natural vegetation (SNV) share is fading in after 2020 +p30_agfor_shr(t,j) = p30_agfor_scenario_fader(t) * + (s30_agfor_shr * sum(cell(i,j), p30_country_weight(i)) + + s30_agfor_shr_noselect * sum(cell(i,j), 1-p30_country_weight(i))); *' Area potentially available for cropping p30_avl_cropland(t,j) = f30_avl_cropland(j,"%c30_marginal_land%") * (1 - p30_snv_shr(t,j)); diff --git a/modules/30_crop/endo_apr21/sets.gms b/modules/30_crop/endo_apr21/sets.gms index 3c14c5a663..7912bea265 100644 --- a/modules/30_crop/endo_apr21/sets.gms +++ b/modules/30_crop/endo_apr21/sets.gms @@ -56,4 +56,8 @@ sets crop_treecover30 / CropTreecoverArea / + + land_agfor(land) land types allowed for AgroForestry policy + / secdforest, other / + ; From 7e037b0818f42f29ea3564be47c64459030af617 Mon Sep 17 00:00:00 2001 From: florianh Date: Thu, 29 Feb 2024 09:56:39 +0100 Subject: [PATCH 04/21] AgroForestry implementation in default.cfg --- config/default.cfg | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/config/default.cfg b/config/default.cfg index 532a3df0d5..9795ec4b92 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -707,18 +707,33 @@ cfg$gms$s30_snv_shr_noselect <- 0 # def = 0 cfg$gms$s30_snv_scenario_start <- 2020 # def = 2020 # * Target year (year when full implementation is reached): cfg$gms$s30_snv_scenario_target <- 2030 # def = 2030 -# * Switch and specification of countries for which SNV policy in -# * s30_snv_shr apply. -# * Options: list of iso-codes of countries where SNV policy should be applied -# * Note: must be written in the format: "IND, BRA, DEU" -# * Default: all iso countries -cfg$gms$policy_countries30 <- all_iso_countries # * Land types included in the SNV policy. This option allows for sensitivity analyses. # * plausible options: "secdforest, forestry, past, other", # * "secdforest, other", # * "secdforest, past, other" etc. cfg$gms$land_snv <- "secdforest, forestry, past, other" #def = "secdforest, forestry, past, other" +# * Share of cropland used for AgroForestry at cluster level in target year. +# * AgroForestry is modelled as natural vegetation (secdforest, other) in cropland areas. +# * A share of 0.2 corresponds to 20 % of cropland used for AgroForestry. +# * Accepted values are between 0 and 1 +# Note: s30_agfor_shr applies to countries selected in policy_countries30 +# s30_agfor_shr_noselect applies to all other countries. +cfg$gms$s30_agfor_shr <- 0 # def = 0 +cfg$gms$s30_agfor_shr_noselect <- 0 # def = 0 +# * Year by which agfor policy ('s30_agfor_shr') is fully implemented. +# * Start year: +cfg$gms$s30_agfor_scenario_start <- 2020 # def = 2020 +# * Target year (year when full implementation is reached): +cfg$gms$s30_agfor_scenario_target <- 2030 # def = 2030 + +# * Switch and specification of countries for which SNV and AgroForestry policies in +# * s30_snv_shr and s30_agfor_shr apply. +# * Options: list of iso-codes of countries where SNV and AgroForestry policies should be applied +# * Note: must be written in the format: "IND, BRA, DEU" +# * Default: all iso countries +cfg$gms$policy_countries30 <- all_iso_countries + # ***--------------------- 31_past --------------------------------------- # * (static): static pasture # * (endo_jun13): dynamic pasture From 7bd65feb469b6ae5fbb4a494e44364937abb1340 Mon Sep 17 00:00:00 2001 From: florianh Date: Thu, 29 Feb 2024 11:22:53 +0100 Subject: [PATCH 05/21] test --- modules/30_crop/endo_apr21/equations.gms | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/30_crop/endo_apr21/equations.gms b/modules/30_crop/endo_apr21/equations.gms index 9b786683c5..9111b47061 100644 --- a/modules/30_crop/endo_apr21/equations.gms +++ b/modules/30_crop/endo_apr21/equations.gms @@ -35,12 +35,12 @@ q30_land_agfor(j2) .. sum(land_agfor, vm_land(j2,land_agfor) - p30_land_agfor_start_year(j2,land_agfor)) =g= - sum(ct, p30_agfor_shr(ct,j2)) * vm_land(j2,"crop") - i30_cropland_treecover(j2); + sum(ct, p30_agfor_shr(ct,j2)) * sum(ct, p30_avl_cropland(ct,j2)) - i30_cropland_treecover(j2); q30_land_agfor_trans(j2) .. sum(land_agfor, vm_lu_transitions(j2,"crop",land_agfor)) =g= - vm_land(j2,"crop") * (sum(ct, p30_agfor_shr(ct,j2)) - sum(pt, p30_agfor_shr(pt,j2))); + sum(ct, p30_avl_cropland(ct,j2)) * (sum(ct, p30_agfor_shr(ct,j2)) - sum(pt, p30_agfor_shr(pt,j2))); From 31073dfc5f47678cac6a40d18b667b1d7d80e0ac Mon Sep 17 00:00:00 2001 From: florianh Date: Thu, 29 Feb 2024 12:37:59 +0100 Subject: [PATCH 06/21] reverting back --- modules/30_crop/endo_apr21/equations.gms | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/30_crop/endo_apr21/equations.gms b/modules/30_crop/endo_apr21/equations.gms index 9111b47061..9b786683c5 100644 --- a/modules/30_crop/endo_apr21/equations.gms +++ b/modules/30_crop/endo_apr21/equations.gms @@ -35,12 +35,12 @@ q30_land_agfor(j2) .. sum(land_agfor, vm_land(j2,land_agfor) - p30_land_agfor_start_year(j2,land_agfor)) =g= - sum(ct, p30_agfor_shr(ct,j2)) * sum(ct, p30_avl_cropland(ct,j2)) - i30_cropland_treecover(j2); + sum(ct, p30_agfor_shr(ct,j2)) * vm_land(j2,"crop") - i30_cropland_treecover(j2); q30_land_agfor_trans(j2) .. sum(land_agfor, vm_lu_transitions(j2,"crop",land_agfor)) =g= - sum(ct, p30_avl_cropland(ct,j2)) * (sum(ct, p30_agfor_shr(ct,j2)) - sum(pt, p30_agfor_shr(pt,j2))); + vm_land(j2,"crop") * (sum(ct, p30_agfor_shr(ct,j2)) - sum(pt, p30_agfor_shr(pt,j2))); From eb311046c6f7f1700517e3ad8eb8c7816cfc7702 Mon Sep 17 00:00:00 2001 From: pvjeetze Date: Thu, 29 Feb 2024 15:25:31 +0100 Subject: [PATCH 07/21] implemented cropland relocation at the aggregated level in response to SNV policy --- config/default.cfg | 8 +++---- core/macros.gms | 14 +++++++---- literature.bib | 10 ++++++++ main.gms | 24 +++++++++---------- .../area_based_apr22/preloop.gms | 2 +- modules/30_crop/endo_apr21/declarations.gms | 9 ++++++- modules/30_crop/endo_apr21/equations.gms | 14 +++++++++-- modules/30_crop/endo_apr21/input.gms | 12 +++++++++- modules/30_crop/endo_apr21/postsolve.gms | 12 ++++++++++ modules/30_crop/endo_apr21/preloop.gms | 18 +++++++++++--- modules/30_crop/endo_apr21/presolve.gms | 9 ++++++- modules/30_crop/endo_apr21/sets.gms | 11 +++++---- .../30_crop/penalty_apr22/declarations.gms | 7 +++++- modules/30_crop/penalty_apr22/equations.gms | 8 +++++++ modules/30_crop/penalty_apr22/input.gms | 9 +++++++ modules/30_crop/penalty_apr22/postsolve.gms | 4 ++++ modules/30_crop/penalty_apr22/preloop.gms | 16 +++++++++++-- modules/30_crop/penalty_apr22/presolve.gms | 7 ++++++ .../30_crop/rotation_apr22/declarations.gms | 9 +++++-- modules/30_crop/rotation_apr22/equations.gms | 8 +++++++ modules/30_crop/rotation_apr22/input.gms | 9 +++++++ modules/30_crop/rotation_apr22/postsolve.gms | 4 ++++ modules/30_crop/rotation_apr22/preloop.gms | 15 ++++++++++-- modules/30_crop/rotation_apr22/presolve.gms | 7 ++++++ modules/35_natveg/dynamic_feb21/preloop.gms | 2 +- .../agr_sector_aug13/preloop.gms | 2 +- .../all_sectors_aug13/preloop.gms | 2 +- .../44_biodiversity/bv_btc_mar21/preloop.gms | 2 +- 28 files changed, 210 insertions(+), 44 deletions(-) diff --git a/config/default.cfg b/config/default.cfg index 9795ec4b92..b3bd9a596e 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -565,7 +565,7 @@ cfg$gms$c20_scp_type <- "sugar" # def = sugar # * to exports cfg$gms$trade <- "selfsuff_reduced" # def = selfsuff_reduced -# * option for `exo` realization only: +# * option for `exo` realization only: # * fix `v21_manna_from_heaven` to zero (0) or not (1) # Note: Without fixing to zero, v21_manna_from_heaven might be used unnecessarily in runs started with highres.R cfg$gms$s21_manna_from_heaven <- 0 @@ -697,7 +697,7 @@ cfg$gms$c30_marginal_land <- "q33_marginal" # def = "q33_marginal" # * Share of available cropland that is withheld for maintaining semi-natural vegetation (SNV) # * in cropland areas, including grassland, forest and other land. For example, # * a share of 0.2 corresponds to 20 % of SNV in terms of the available cropland. -# * Accepted values are between 0 and 1 +# * Accepted sensible values are between 0 and 0.5 # Note: s30_snv_shr applies to countries selected in policy_countries30 # s30_snv_shr_noselect applies to all other countries. cfg$gms$s30_snv_shr <- 0 # def = 0 @@ -713,8 +713,8 @@ cfg$gms$s30_snv_scenario_target <- 2030 # def = 2030 # * "secdforest, past, other" etc. cfg$gms$land_snv <- "secdforest, forestry, past, other" #def = "secdforest, forestry, past, other" -# * Share of cropland used for AgroForestry at cluster level in target year. -# * AgroForestry is modelled as natural vegetation (secdforest, other) in cropland areas. +# * Share of cropland used for AgroForestry at cluster level in target year. +# * AgroForestry is modelled as natural vegetation (secdforest, other) in cropland areas. # * A share of 0.2 corresponds to 20 % of cropland used for AgroForestry. # * Accepted values are between 0 and 1 # Note: s30_agfor_shr applies to countries selected in policy_countries30 diff --git a/core/macros.gms b/core/macros.gms index 37e70b23f7..0cb9567bd1 100644 --- a/core/macros.gms +++ b/core/macros.gms @@ -73,21 +73,27 @@ $macro m_fillmissingyears(input,sets) loop(t_all, \ ct_all(t_all) = no; \ ); -* macro for linear interpolation -$macro m_linear_interpol(input,start_year,target_year,start_value,target_value) \ +*** Time interpolation +* macro for linear time interpolation +$macro m_linear_time_interpol(input,start_year,target_year,start_value,target_value) \ input(t_all)$(m_year(t_all) > start_year AND m_year(t_all) < target_year) = ((m_year(t_all)-start_year) / (target_year-start_year)); \ input(t_all) = start_value + input(t_all) * (target_value-start_value); \ input(t_all)$(m_year(t_all) <= start_year) = start_value; \ input(t_all)$(m_year(t_all) >= target_year) = target_value; -* macro for sigmoid interpolation (S-shaped curve) -$macro m_sigmoid_interpol(input,start_year,target_year,start_value,target_value) \ +* macro for sigmoid time interpolation (S-shaped curve) +$macro m_sigmoid_time_interpol(input,start_year,target_year,start_value,target_value) \ input(t_all)$(m_year(t_all) >= start_year AND m_year(t_all) <= target_year) = ((m_year(t_all)-start_year) / (target_year-start_year)); \ input(t_all) = 1 / (1 + exp(-10*(input(t_all)-0.5))); \ input(t_all) = start_value + input(t_all) * (target_value-start_value); \ input(t_all)$(m_year(t_all) <= start_year) = start_value; \ input(t_all)$(m_year(t_all) >= target_year) = target_value; +*** Data interpolation +* macro for linear cell data interpolation +$macro m_linear_cell_data_interpol(output,x,input_x1,input_x2,input_y1,input_y2) \ + output(j) = input_y1 + (input_y2 - input_y1)/(input_x2 - input_x1) * (x - input_x1); + * macro for simple carbon stocks $macro m_carbon_stock(land,carbon_density,item) \ (land(j2,item) * sum(ct,carbon_density(ct,j2,item,ag_pools)))$(sameas(stockType,"actual")) + \ diff --git a/literature.bib b/literature.bib index 6f31716a32..d4ee7ea751 100644 --- a/literature.bib +++ b/literature.bib @@ -1596,3 +1596,13 @@ @article{mishra_timbercities_2022 keywords = {Forestry, Climate-change mitigation}, pages = {4889}, } + +@dataset{buchhorn_copernicus_2020, + title = {Copernicus Global Land Service: {{Land}} Cover 100m: Collection 3: Epoch 2019: {{Globe}}}, + author = {Buchhorn, Marcel and Smets, Bruno and Bertels, Luc and Roo, Bert De and Lesiv, Myroslava and Tsendbazar, Nandin-Erdene and Herold, Martin and Fritz, Steffen}, + date = {2020-09}, + publisher = {{Zenodo}}, + doi = {10.5281/zenodo.3939050}, + url = {https://doi.org/10.5281/zenodo.3939050}, + version = {V3.0.1} +} diff --git a/main.gms b/main.gms index 20ea421f75..494328ca9d 100644 --- a/main.gms +++ b/main.gms @@ -149,24 +149,24 @@ $title magpie *##################### R SECTION START (VERSION INFO) ########################## * * Used data set: rev4.99_h12_magpie.tgz -* md5sum: NA -* Repository: scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output +* md5sum: 0f8f6939d94629ba33d20ea3bdbe63b7 +* Repository: /p/projects/rd3mod/mirror/rse.pik-potsdam.de/data/magpie/public * * Used data set: rev4.99_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz -* md5sum: NA -* Repository: scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output +* md5sum: 669ece88a78eb1b05fd624ad32f74485 +* Repository: /p/projects/rd3mod/mirror/rse.pik-potsdam.de/data/magpie/public * * Used data set: rev4.99_h12_validation.tgz -* md5sum: NA -* Repository: scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output +* md5sum: e815fe83dc4181c3cea883592c2e5321 +* Repository: /p/projects/rd3mod/mirror/rse.pik-potsdam.de/data/magpie/public * -* Used data set: additional_data_rev4.47.tgz -* md5sum: NA -* Repository: scp://cluster.pik-potsdam.de/p/projects/landuse/data/input/archive +* Used data set: additional_data_rev4.48.tgz +* md5sum: 0788a1d39cab12f89a9411c2636bffc7 +* Repository: /p/projects/rd3mod/mirror/rse.pik-potsdam.de/data/magpie/public * * Used data set: calibration_H12_per_ton_fao_may22_glo_08Aug23.tgz -* md5sum: NA -* Repository: https://rse.pik-potsdam.de/data/magpie/public +* md5sum: 5d34e4b54112db10f330f1e59dd60cc9 +* Repository: /p/projects/rd3mod/mirror/rse.pik-potsdam.de/data/magpie/public * * Low resolution: c200 * High resolution: 0.5 @@ -195,7 +195,7 @@ $title magpie * * Call: withCallingHandlers(expr, message = messageHandler, warning = warningHandler, error = errorHandler) * * -* Last modification (input data): Wed Feb 7 15:35:14 2024 +* Last modification (input data): Thu Feb 29 11:13:40 2024 * *###################### R SECTION END (VERSION INFO) ########################### diff --git a/modules/22_land_conservation/area_based_apr22/preloop.gms b/modules/22_land_conservation/area_based_apr22/preloop.gms index 965c36f7d2..3cfcbf4cbe 100644 --- a/modules/22_land_conservation/area_based_apr22/preloop.gms +++ b/modules/22_land_conservation/area_based_apr22/preloop.gms @@ -26,7 +26,7 @@ p22_country_weight(i) = sum(i_to_iso(i,iso), p22_country_dummy(iso) * i22_land_i ** Trajectory for implementation of land conservation * sigmoidal interpolation between 2020 and target year -m_sigmoid_interpol(p22_conservation_fader,s22_conservation_start,s22_conservation_target,0,1); +m_sigmoid_time_interpol(p22_conservation_fader,s22_conservation_start,s22_conservation_target,0,1); ** Initialise additional conservation area p22_add_consv(t,j,consv22_all,land) = 0; diff --git a/modules/30_crop/endo_apr21/declarations.gms b/modules/30_crop/endo_apr21/declarations.gms index 1a2a1d75e6..379c9c3327 100644 --- a/modules/30_crop/endo_apr21/declarations.gms +++ b/modules/30_crop/endo_apr21/declarations.gms @@ -9,8 +9,11 @@ parameters p30_avl_cropland(t,j) Total available land for crop cultivation (mio. ha) p30_country_weight(i) SNV and AgroForestry policy country weight per region (1) p30_snv_shr(t,j) Share of semi-natural vegetation in cropland areas (1) + i30_snv_relocation_target(j) Overall cropland area that requires relocation due SNV policy (mio. ha) + p30_snv_relocation(t,j) Cropland area that is actually relocated during time step (mio. ha) + p30_max_snv_relocation(t,j) Maximum cropland relocation during time step (mio. ha) p30_agfor_shr(t,j) Share of AgroForestry in cropland areas (1) - p30_country_dummy(iso) Dummy parameter indicating whether country is affected by selected SNV policy (1) + p30_country_dummy(iso) Dummy parameter indicating whether country is affected by selected cropland policy (1) i30_avl_cropland_iso(iso) Available land area for cropland at ISO level (mio. ha) p30_snv_scenario_fader(t_all) SNV scenario fader (1) p30_agfor_scenario_fader(t_all) AgroForestry scenario fader (1) @@ -36,6 +39,7 @@ equations q30_bv_ann(j,potnatveg) Biodiversity value of annual cropland (mio. ha) q30_bv_per(j,potnatveg) Biodiversity value of perennial cropland (mio. ha) q30_land_snv(j) Land constraint for the SNV policy in cropland areas (mio. ha) + q30_land_snv_trans(j) Land transition constraint for SNV policy in cropland areas (mio. ha) q30_land_agfor(j) Land constraint for AgroForestry policy in cropland areas (mio. ha) q30_land_agfor_trans(j) Land transition constraint for AgroForestry policy in cropland areas (mio. ha) ; @@ -54,6 +58,9 @@ parameters oq30_bv_ann(t,j,potnatveg,type) Biodiversity value of annual cropland (mio. ha) oq30_bv_per(t,j,potnatveg,type) Biodiversity value of perennial cropland (mio. ha) oq30_land_snv(t,j,type) Land constraint for the SNV policy in cropland areas (mio. ha) + oq30_land_snv_trans(t,j,type) Land transition constraint for SNV policy in cropland areas (mio. ha) + oq30_land_agfor(t,j,type) Land constraint for AgroForestry policy in cropland areas (mio. ha) + oq30_land_agfor_trans(t,j,type) Land transition constraint for AgroForestry policy in cropland areas (mio. ha) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/30_crop/endo_apr21/equations.gms b/modules/30_crop/endo_apr21/equations.gms index 9b786683c5..4dc0c33f2b 100644 --- a/modules/30_crop/endo_apr21/equations.gms +++ b/modules/30_crop/endo_apr21/equations.gms @@ -32,16 +32,26 @@ sum(ct, p30_snv_shr(ct,j2)) * vm_land(j2,"crop") + sum((ct,land_snv,consv_type), pm_land_conservation(ct,j2,land_snv,consv_type)); +*' The semi-natural vegetation constraint for cropland areas has been suggested at the per square +*' kilometer scale. The amount of cropland requiring relocation has therefor been derived from +*' exogeneous high-resolution land cover information from the Copernicus Global Land Service +*' (@buchhorn_copernicus_2020). + + q30_land_snv_trans(j2) .. + sum(land_snv, vm_lu_transitions(j2,"crop",land_snv)) =g= sum(ct, p30_snv_relocation(ct,j2)); + +*' Agroforestry constraints + q30_land_agfor(j2) .. sum(land_agfor, vm_land(j2,land_agfor) - p30_land_agfor_start_year(j2,land_agfor)) =g= sum(ct, p30_agfor_shr(ct,j2)) * vm_land(j2,"crop") - i30_cropland_treecover(j2); - + q30_land_agfor_trans(j2) .. sum(land_agfor, vm_lu_transitions(j2,"crop",land_agfor)) =g= vm_land(j2,"crop") * (sum(ct, p30_agfor_shr(ct,j2)) - sum(pt, p30_agfor_shr(pt,j2))); - + *' As additional constraints minimum and maximum rotational constraints limit diff --git a/modules/30_crop/endo_apr21/input.gms b/modules/30_crop/endo_apr21/input.gms index ef4fee8c21..c6da7389b4 100644 --- a/modules/30_crop/endo_apr21/input.gms +++ b/modules/30_crop/endo_apr21/input.gms @@ -25,6 +25,8 @@ s30_snv_shr Share of available cropland that is witheld for s30_snv_shr_noselect Share of available cropland that is witheld for other land cover types (1) / 0 / s30_snv_scenario_start SNV scenario start year / 2020 / s30_snv_scenario_target SNV scenario target year / 2030 / +s30_snv_relocation_data_x1 First reference value in SNV target cropland data (1) / 0.2 / +s30_snv_relocation_data_x2 Second reference value in SNV target cropland data (1) / 0.5 / s30_agfor_shr Share of cropland used for AgroForestry in target year (1) / 0.2 / s30_agfor_shr_noselect Share of cropland used for AgroForestry in target year (1) / 0 / @@ -119,10 +121,18 @@ $include "./modules/30_crop/endo_apr21/input/avl_cropland_iso.cs3" $offdelim ; -********* CroplandTreecover ******************************************* +********* CROPLAND TREECOVER ******************************************* table f30_cropland_treecover(j,crop_treecover30) Cropland area covered by trees (mio. ha) $ondelim $include "./modules/30_crop/endo_apr21/input/CroplandTreecover.cs3" $offdelim ; + +********* SNV TARGET CROPLAND ******************************************* + +table f30_snv_target_cropland(j,relocation_target30) Cropland in 2019 requiring relocation due to SNV policy (mio. ha) +$ondelim +$include "./modules/30_crop/endo_apr21/input/SNVTargetCropland.cs3" +$offdelim +; diff --git a/modules/30_crop/endo_apr21/postsolve.gms b/modules/30_crop/endo_apr21/postsolve.gms index 021717157d..56ef09450b 100644 --- a/modules/30_crop/endo_apr21/postsolve.gms +++ b/modules/30_crop/endo_apr21/postsolve.gms @@ -20,6 +20,9 @@ p30_land_agfor_start_year(j,land)$(m_year(t) = s30_agfor_scenario_start) = vm_la oq30_bv_ann(t,j,potnatveg,"marginal") = q30_bv_ann.m(j,potnatveg); oq30_bv_per(t,j,potnatveg,"marginal") = q30_bv_per.m(j,potnatveg); oq30_land_snv(t,j,"marginal") = q30_land_snv.m(j); + oq30_land_snv_trans(t,j,"marginal") = q30_land_snv_trans.m(j); + oq30_land_agfor(t,j,"marginal") = q30_land_agfor.m(j); + oq30_land_agfor_trans(t,j,"marginal") = q30_land_agfor_trans.m(j); ov_fallow(t,j,"level") = vm_fallow.l(j); ov_area(t,j,kcr,w,"level") = vm_area.l(j,kcr,w); ov_rotation_penalty(t,i,"level") = vm_rotation_penalty.l(i); @@ -32,6 +35,9 @@ p30_land_agfor_start_year(j,land)$(m_year(t) = s30_agfor_scenario_start) = vm_la oq30_bv_ann(t,j,potnatveg,"level") = q30_bv_ann.l(j,potnatveg); oq30_bv_per(t,j,potnatveg,"level") = q30_bv_per.l(j,potnatveg); oq30_land_snv(t,j,"level") = q30_land_snv.l(j); + oq30_land_snv_trans(t,j,"level") = q30_land_snv_trans.l(j); + oq30_land_agfor(t,j,"level") = q30_land_agfor.l(j); + oq30_land_agfor_trans(t,j,"level") = q30_land_agfor_trans.l(j); ov_fallow(t,j,"upper") = vm_fallow.up(j); ov_area(t,j,kcr,w,"upper") = vm_area.up(j,kcr,w); ov_rotation_penalty(t,i,"upper") = vm_rotation_penalty.up(i); @@ -44,6 +50,9 @@ p30_land_agfor_start_year(j,land)$(m_year(t) = s30_agfor_scenario_start) = vm_la oq30_bv_ann(t,j,potnatveg,"upper") = q30_bv_ann.up(j,potnatveg); oq30_bv_per(t,j,potnatveg,"upper") = q30_bv_per.up(j,potnatveg); oq30_land_snv(t,j,"upper") = q30_land_snv.up(j); + oq30_land_snv_trans(t,j,"upper") = q30_land_snv_trans.up(j); + oq30_land_agfor(t,j,"upper") = q30_land_agfor.up(j); + oq30_land_agfor_trans(t,j,"upper") = q30_land_agfor_trans.up(j); ov_fallow(t,j,"lower") = vm_fallow.lo(j); ov_area(t,j,kcr,w,"lower") = vm_area.lo(j,kcr,w); ov_rotation_penalty(t,i,"lower") = vm_rotation_penalty.lo(i); @@ -56,4 +65,7 @@ p30_land_agfor_start_year(j,land)$(m_year(t) = s30_agfor_scenario_start) = vm_la oq30_bv_ann(t,j,potnatveg,"lower") = q30_bv_ann.lo(j,potnatveg); oq30_bv_per(t,j,potnatveg,"lower") = q30_bv_per.lo(j,potnatveg); oq30_land_snv(t,j,"lower") = q30_land_snv.lo(j); + oq30_land_snv_trans(t,j,"lower") = q30_land_snv_trans.lo(j); + oq30_land_agfor(t,j,"lower") = q30_land_agfor.lo(j); + oq30_land_agfor_trans(t,j,"lower") = q30_land_agfor_trans.lo(j); *##################### R SECTION END (OUTPUT DEFINITIONS) ###################### diff --git a/modules/30_crop/endo_apr21/preloop.gms b/modules/30_crop/endo_apr21/preloop.gms index 7d0f2574b1..10d52c7e45 100644 --- a/modules/30_crop/endo_apr21/preloop.gms +++ b/modules/30_crop/endo_apr21/preloop.gms @@ -7,9 +7,21 @@ ** Trajectory for cropland scenarios * sigmoidal interpolation between start year and target year -m_sigmoid_interpol(p30_snv_scenario_fader,s30_snv_scenario_start,s30_snv_scenario_target,0,1); -m_sigmoid_interpol(p30_agfor_scenario_fader,s30_agfor_scenario_start,s30_agfor_scenario_target,0,1); -m_sigmoid_interpol(p30_rotation_scenario_fader,s30_rotation_scenario_start,s30_rotation_scenario_target,0,1); +m_sigmoid_time_interpol(p30_snv_scenario_fader,s30_snv_scenario_start,s30_snv_scenario_target,0,1); +m_sigmoid_time_interpol(p30_agfor_scenario_fader,s30_agfor_scenario_start,s30_agfor_scenario_target,0,1); +m_sigmoid_time_interpol(p30_rotation_scenario_fader,s30_rotation_scenario_start,s30_rotation_scenario_target,0,1); + +* linear interpolation to estimate the cropland that +* requires relocation due to SNV policy +if (s30_snv_shr = 0, +i30_snv_relocation_target(j) = 0; + +elseif s30_snv_shr <= s30_snv_relocation_data_x1, +m_linear_cell_data_interpol(i30_snv_relocation_target, s30_snv_shr,0,s30_snv_relocation_data_x1,0, f30_snv_target_cropland(j, "SNV20TargetCropland")); + +elseif s30_snv_shr > s30_snv_relocation_data_x1, +m_linear_cell_data_interpol(i30_snv_relocation_target, s30_snv_shr,s30_snv_relocation_data_x1, s30_snv_relocation_data_x2,f30_snv_target_cropland(j, "SNV20TargetCropland"), f30_snv_target_cropland(j, "SNV50TargetCropland")); +); *due to some rounding errors the input data currently may contain in some cases *very small, negative numbers. These numbers have to be set to 0 as area diff --git a/modules/30_crop/endo_apr21/presolve.gms b/modules/30_crop/endo_apr21/presolve.gms index 10f5f2eced..4e244641e2 100644 --- a/modules/30_crop/endo_apr21/presolve.gms +++ b/modules/30_crop/endo_apr21/presolve.gms @@ -33,7 +33,14 @@ p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * (s30_snv_shr * sum(cell(i,j), p30_country_weight(i)) + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_weight(i))); -*' Minimum semi-natural vegetation (SNV) share is fading in after 2020 +*' Cropland relocation in response to SNV policy is based on exogeneous land cover information +p30_snv_relocation(t,j) = (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * + (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_weight(i)) + + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_weight(i))); +p30_max_snv_relocation(t,j) = p30_snv_shr(t,j) * (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * pcm_land(j,"crop"); +p30_snv_relocation(t,j)$(p30_snv_relocation(t, j) > p30_max_snv_relocation(t,j)) = p30_max_snv_relocation(t,j); + +*' Minimum agroforestry share is fading in after 2020 p30_agfor_shr(t,j) = p30_agfor_scenario_fader(t) * (s30_agfor_shr * sum(cell(i,j), p30_country_weight(i)) + s30_agfor_shr_noselect * sum(cell(i,j), 1-p30_country_weight(i))); diff --git a/modules/30_crop/endo_apr21/sets.gms b/modules/30_crop/endo_apr21/sets.gms index 7912bea265..0322f95b59 100644 --- a/modules/30_crop/endo_apr21/sets.gms +++ b/modules/30_crop/endo_apr21/sets.gms @@ -53,11 +53,14 @@ sets policy_target30 Target year for cropland policy / none, by2030, by2050 / - - crop_treecover30 + + crop_treecover30 Cropland treecover data / CropTreecoverArea / - - land_agfor(land) land types allowed for AgroForestry policy + + relocation_target30 Cropland requiring relocation based on different SNV targets + / SNV20TargetCropland, SNV50TargetCropland / + + land_agfor(land) land types allowed for AgroForestry policy / secdforest, other / ; diff --git a/modules/30_crop/penalty_apr22/declarations.gms b/modules/30_crop/penalty_apr22/declarations.gms index 9f5120b9ca..20ff5440dc 100644 --- a/modules/30_crop/penalty_apr22/declarations.gms +++ b/modules/30_crop/penalty_apr22/declarations.gms @@ -9,7 +9,10 @@ parameters p30_avl_cropland(t,j) Total available land for crop cultivation (mio. ha) p30_country_snv_weight(i) SNV policy country weight per region (1) p30_snv_shr(t,j) Share of semi-natural vegetation in cropland areas (1) - p30_country_dummy(iso) Dummy parameter indicating whether country is affected by selected SNV policy (1) + i30_snv_relocation_target(j) Overall cropland area that requires relocation due SNV policy (mio. ha) + p30_snv_relocation(t,j) Cropland area that is actually relocated during time step (mio. ha) + p30_max_snv_relocation(t,j) Maximum cropland relocation during time step (mio. ha) + p30_country_dummy(iso) Dummy parameter indicating whether country is affected by selected cropland policy (1) i30_avl_cropland_iso(iso) Available land area for cropland at ISO level (mio. ha) i30_rotation_incentives(t_all,rota30) Penalty for violating rotational constraints (USD05MER per ha) p30_snv_scenario_fader(t_all) SNV scenario fader (1) @@ -37,6 +40,7 @@ equations q30_bv_ann(j,potnatveg) Biodiversity value of annual cropland (mio. ha) q30_bv_per(j,potnatveg) Biodiversity value of perennial cropland (mio. ha) q30_land_snv(j) Land constraint for the SNV policy in cropland areas (mio. ha) + q30_land_snv_trans(j) Land transition constraint for SNV policy in cropland areas (mio. ha) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### @@ -57,6 +61,7 @@ parameters oq30_bv_ann(t,j,potnatveg,type) Biodiversity value of annual cropland (mio. ha) oq30_bv_per(t,j,potnatveg,type) Biodiversity value of perennial cropland (mio. ha) oq30_land_snv(t,j,type) Land constraint for the SNV policy in cropland areas (mio. ha) + oq30_land_snv_trans(t,j,type) Land transition constraint for SNV policy in cropland areas (mio. ha) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/30_crop/penalty_apr22/equations.gms b/modules/30_crop/penalty_apr22/equations.gms index bb649fa47f..a409927be2 100644 --- a/modules/30_crop/penalty_apr22/equations.gms +++ b/modules/30_crop/penalty_apr22/equations.gms @@ -34,6 +34,14 @@ sum(ct, p30_snv_shr(ct,j2)) * vm_land(j2,"crop") + sum((ct,land_snv,consv_type), pm_land_conservation(ct,j2,land_snv,consv_type)); +*' The semi-natural vegetation constraint for cropland areas has been suggested at the per square +*' kilometer scale. The amount of cropland requiring relocation has therefor been derived from +*' exogeneous high-resolution land cover information from the Copernicus Global Land Service +*' (@buchhorn_copernicus_2020). + + q30_land_snv_trans(j2) .. + sum(land_snv, vm_lu_transitions(j2,"crop",land_snv)) =g= sum(ct, p30_snv_relocation(ct,j2)); + *' Rotational constraints prevent over-specialization. In this module realization, *' they are implemented via a penalty payment if the constraints are violated. diff --git a/modules/30_crop/penalty_apr22/input.gms b/modules/30_crop/penalty_apr22/input.gms index 22bc0de7d0..e0e7b8a006 100644 --- a/modules/30_crop/penalty_apr22/input.gms +++ b/modules/30_crop/penalty_apr22/input.gms @@ -33,6 +33,8 @@ s30_snv_scenario_start SNV scenario start year / 2020 / s30_snv_scenario_target SNV scenario target year / 2030 / s30_rotation_scenario_start Rotation scenario start year / 2020 / s30_rotation_scenario_target Rotation scenario target year / 2050 / +s30_snv_relocation_data_x1 First reference value in SNV target cropland data (1) / 0.2 / +s30_snv_relocation_data_x2 Second reference value in SNV target cropland data (1) / 0.5 / ; * Set-switch for countries affected by regional SNV policy @@ -115,3 +117,10 @@ $include "./modules/30_crop/penalty_apr22/input/avl_cropland_iso.cs3" $offdelim ; +********* SNV TARGET CROPLAND ******************************************* + +table f30_snv_target_cropland(j,relocation_target30) Cropland in 2019 requiring relocation due to SNV policy (mio. ha) +$ondelim +$include "./modules/30_crop/penalty_apr22/input/SNVTargetCropland.cs3" +$offdelim +; diff --git a/modules/30_crop/penalty_apr22/postsolve.gms b/modules/30_crop/penalty_apr22/postsolve.gms index 1f3170e857..390e3c5137 100644 --- a/modules/30_crop/penalty_apr22/postsolve.gms +++ b/modules/30_crop/penalty_apr22/postsolve.gms @@ -23,6 +23,7 @@ oq30_bv_ann(t,j,potnatveg,"marginal") = q30_bv_ann.m(j,potnatveg); oq30_bv_per(t,j,potnatveg,"marginal") = q30_bv_per.m(j,potnatveg); oq30_land_snv(t,j,"marginal") = q30_land_snv.m(j); + oq30_land_snv_trans(t,j,"marginal") = q30_land_snv_trans.m(j); ov_fallow(t,j,"level") = vm_fallow.l(j); ov_area(t,j,kcr,w,"level") = vm_area.l(j,kcr,w); ov_rotation_penalty(t,i,"level") = vm_rotation_penalty.l(i); @@ -39,6 +40,7 @@ oq30_bv_ann(t,j,potnatveg,"level") = q30_bv_ann.l(j,potnatveg); oq30_bv_per(t,j,potnatveg,"level") = q30_bv_per.l(j,potnatveg); oq30_land_snv(t,j,"level") = q30_land_snv.l(j); + oq30_land_snv_trans(t,j,"level") = q30_land_snv_trans.l(j); ov_fallow(t,j,"upper") = vm_fallow.up(j); ov_area(t,j,kcr,w,"upper") = vm_area.up(j,kcr,w); ov_rotation_penalty(t,i,"upper") = vm_rotation_penalty.up(i); @@ -55,6 +57,7 @@ oq30_bv_ann(t,j,potnatveg,"upper") = q30_bv_ann.up(j,potnatveg); oq30_bv_per(t,j,potnatveg,"upper") = q30_bv_per.up(j,potnatveg); oq30_land_snv(t,j,"upper") = q30_land_snv.up(j); + oq30_land_snv_trans(t,j,"upper") = q30_land_snv_trans.up(j); ov_fallow(t,j,"lower") = vm_fallow.lo(j); ov_area(t,j,kcr,w,"lower") = vm_area.lo(j,kcr,w); ov_rotation_penalty(t,i,"lower") = vm_rotation_penalty.lo(i); @@ -71,4 +74,5 @@ oq30_bv_ann(t,j,potnatveg,"lower") = q30_bv_ann.lo(j,potnatveg); oq30_bv_per(t,j,potnatveg,"lower") = q30_bv_per.lo(j,potnatveg); oq30_land_snv(t,j,"lower") = q30_land_snv.lo(j); + oq30_land_snv_trans(t,j,"lower") = q30_land_snv_trans.lo(j); *##################### R SECTION END (OUTPUT DEFINITIONS) ###################### diff --git a/modules/30_crop/penalty_apr22/preloop.gms b/modules/30_crop/penalty_apr22/preloop.gms index ee7f996e18..49e706ac28 100644 --- a/modules/30_crop/penalty_apr22/preloop.gms +++ b/modules/30_crop/penalty_apr22/preloop.gms @@ -7,8 +7,20 @@ ** Trajectory for cropland scenarios * sigmoidal interpolation between start year and target year -m_sigmoid_interpol(p30_snv_scenario_fader,s30_snv_scenario_start,s30_snv_scenario_target,0,1); -m_sigmoid_interpol(p30_rotation_scenario_fader,s30_rotation_scenario_start,s30_rotation_scenario_target,0,1); +m_sigmoid_time_interpol(p30_snv_scenario_fader,s30_snv_scenario_start,s30_snv_scenario_target,0,1); +m_sigmoid_time_interpol(p30_rotation_scenario_fader,s30_rotation_scenario_start,s30_rotation_scenario_target,0,1); + +* linear interpolation to estimate the cropland that +* requires relocation due to SNV policy +if (s30_snv_shr = 0, +i30_snv_relocation_target(j) = 0; + +elseif s30_snv_shr <= s30_snv_relocation_data_x1, +m_linear_cell_data_interpol(i30_snv_relocation_target, s30_snv_shr,0,s30_snv_relocation_data_x1,0, f30_snv_target_cropland(j, "SNV20TargetCropland")); + +elseif s30_snv_shr > s30_snv_relocation_data_x1, +m_linear_cell_data_interpol(i30_snv_relocation_target, s30_snv_shr,s30_snv_relocation_data_x1, s30_snv_relocation_data_x2,f30_snv_target_cropland(j, "SNV20TargetCropland"), f30_snv_target_cropland(j, "SNV50TargetCropland")); +); ** create crop rotation scenario diff --git a/modules/30_crop/penalty_apr22/presolve.gms b/modules/30_crop/penalty_apr22/presolve.gms index 35ec026f8a..7fcf38a1f5 100644 --- a/modules/30_crop/penalty_apr22/presolve.gms +++ b/modules/30_crop/penalty_apr22/presolve.gms @@ -25,6 +25,13 @@ p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * (s30_snv_shr * sum(cell(i,j), p30_country_snv_weight(i)) + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); +*' Cropland relocation in response to SNV policy is based on exogeneous land cover information +p30_snv_relocation(t,j) = (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * + (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_weight(i)) + + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_weight(i))); +p30_max_snv_relocation(t,j) = p30_snv_shr(t,j) * (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * pcm_land(j,"crop"); +p30_snv_relocation(t,j)$(p30_snv_relocation(t, j) > p30_max_snv_relocation(t,j)) = p30_max_snv_relocation(t,j); + *' Area potentially available for cropping p30_avl_cropland(t,j) = f30_avl_cropland(j,"%c30_marginal_land%") * (1 - p30_snv_shr(t,j)); *' @stop diff --git a/modules/30_crop/rotation_apr22/declarations.gms b/modules/30_crop/rotation_apr22/declarations.gms index 4fd7cb47e2..692bcc63ad 100644 --- a/modules/30_crop/rotation_apr22/declarations.gms +++ b/modules/30_crop/rotation_apr22/declarations.gms @@ -9,7 +9,10 @@ parameters p30_avl_cropland(t,j) Total available land for crop cultivation (mio. ha) p30_country_snv_weight(i) SNV policy country weight per region (1) p30_snv_shr(t,j) Share of semi-natural vegetation in cropland areas (1) - p30_country_dummy(iso) Dummy parameter indicating whether country is affected by selected SNV policy (1) + i30_snv_relocation_target(j) Overall cropland area that requires relocation due SNV policy (mio. ha) + p30_snv_relocation(t,j) Cropland area that is actually relocated during time step (mio. ha) + p30_max_snv_relocation(t,j) Maximum cropland relocation during time step (mio. ha) + p30_country_dummy(iso) Dummy parameter indicating whether country is affected by selected cropland policy (1) i30_avl_cropland_iso(iso) Available land area for cropland at ISO level (mio. ha) i30_rotation_max_shr(t_all,rotamax30) Maximum share of a certain crop group on cropland (ha per ha) i30_rotation_min_shr(t_all,rotamin30) Minimum share of a certain crop group on cropland (ha per ha) @@ -34,7 +37,8 @@ equations q30_carbon(j,ag_pools,stockType) Cropland above ground carbon content calculation (mio. tC) q30_bv_ann(j,potnatveg) Biodiversity value of annual cropland (mio. ha) q30_bv_per(j,potnatveg) Biodiversity value of perennial cropland (mio. ha) - q30_land_snv(j) Land constraint for the SNV policy in cropland areas (mio. ha) + q30_land_snv(j) Land constraint for the SNV policy in cropland areas (mio. ha) + q30_land_snv_trans(j) Land transition constraint for SNV policy in cropland areas (mio. ha) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### @@ -52,6 +56,7 @@ parameters oq30_bv_ann(t,j,potnatveg,type) Biodiversity value of annual cropland (mio. ha) oq30_bv_per(t,j,potnatveg,type) Biodiversity value of perennial cropland (mio. ha) oq30_land_snv(t,j,type) Land constraint for the SNV policy in cropland areas (mio. ha) + oq30_land_snv_trans(t,j,type) Land transition constraint for SNV policy in cropland areas (mio. ha) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/30_crop/rotation_apr22/equations.gms b/modules/30_crop/rotation_apr22/equations.gms index d3db06641a..a2163ff71f 100644 --- a/modules/30_crop/rotation_apr22/equations.gms +++ b/modules/30_crop/rotation_apr22/equations.gms @@ -34,6 +34,14 @@ sum(ct, p30_snv_shr(ct,j2)) * vm_land(j2,"crop") + sum((ct,land_snv,consv_type), pm_land_conservation(ct,j2,land_snv,consv_type)); +*' The semi-natural vegetation constraint for cropland areas has been suggested at the per square +*' kilometer scale. The amount of cropland requiring relocation has therefor been derived from +*' exogeneous high-resolution land cover information from the Copernicus Global Land Service +*' (@buchhorn_copernicus_2020). + + q30_land_snv_trans(j2) .. + sum(land_snv, vm_lu_transitions(j2,"crop",land_snv)) =g= sum(ct, p30_snv_relocation(ct,j2)); + *' As additional constraints minimum and maximum rotational constraints limit *' the placing of crops. On the one hand, these rotational constraints reflect *' crop rotations limiting the share a specific crop can cover of the total area diff --git a/modules/30_crop/rotation_apr22/input.gms b/modules/30_crop/rotation_apr22/input.gms index 38c2288b78..65b1e9054c 100644 --- a/modules/30_crop/rotation_apr22/input.gms +++ b/modules/30_crop/rotation_apr22/input.gms @@ -33,6 +33,8 @@ s30_snv_scenario_start SNV scenario start year / 2020 / s30_snv_scenario_target SNV scenario target year / 2030 / s30_rotation_scenario_start Rotation scenario start year / 2020 / s30_rotation_scenario_target Rotation scenario target year / 2050 / +s30_snv_relocation_data_x1 First reference value in SNV target cropland data (1) / 0.2 / +s30_snv_relocation_data_x2 Second reference value in SNV target cropland data (1) / 0.5 / ; * Set-switch for countries affected by regional SNV policy @@ -116,3 +118,10 @@ $include "./modules/30_crop/rotation_apr22/input/avl_cropland_iso.cs3" $offdelim ; +********* SNV TARGET CROPLAND ******************************************* + +table f30_snv_target_cropland(j,relocation_target30) Cropland in 2019 requiring relocation due to SNV policy (mio. ha) +$ondelim +$include "./modules/30_crop/rotation_apr22/input/SNVTargetCropland.cs3" +$offdelim +; diff --git a/modules/30_crop/rotation_apr22/postsolve.gms b/modules/30_crop/rotation_apr22/postsolve.gms index f0dddfe6f9..0afa7e8dec 100644 --- a/modules/30_crop/rotation_apr22/postsolve.gms +++ b/modules/30_crop/rotation_apr22/postsolve.gms @@ -20,6 +20,7 @@ oq30_bv_ann(t,j,potnatveg,"marginal") = q30_bv_ann.m(j,potnatveg); oq30_bv_per(t,j,potnatveg,"marginal") = q30_bv_per.m(j,potnatveg); oq30_land_snv(t,j,"marginal") = q30_land_snv.m(j); + oq30_land_snv_trans(t,j,"marginal") = q30_land_snv_trans.m(j); ov_fallow(t,j,"level") = vm_fallow.l(j); ov_area(t,j,kcr,w,"level") = vm_area.l(j,kcr,w); ov_rotation_penalty(t,i,"level") = vm_rotation_penalty.l(i); @@ -33,6 +34,7 @@ oq30_bv_ann(t,j,potnatveg,"level") = q30_bv_ann.l(j,potnatveg); oq30_bv_per(t,j,potnatveg,"level") = q30_bv_per.l(j,potnatveg); oq30_land_snv(t,j,"level") = q30_land_snv.l(j); + oq30_land_snv_trans(t,j,"level") = q30_land_snv_trans.l(j); ov_fallow(t,j,"upper") = vm_fallow.up(j); ov_area(t,j,kcr,w,"upper") = vm_area.up(j,kcr,w); ov_rotation_penalty(t,i,"upper") = vm_rotation_penalty.up(i); @@ -46,6 +48,7 @@ oq30_bv_ann(t,j,potnatveg,"upper") = q30_bv_ann.up(j,potnatveg); oq30_bv_per(t,j,potnatveg,"upper") = q30_bv_per.up(j,potnatveg); oq30_land_snv(t,j,"upper") = q30_land_snv.up(j); + oq30_land_snv_trans(t,j,"upper") = q30_land_snv_trans.up(j); ov_fallow(t,j,"lower") = vm_fallow.lo(j); ov_area(t,j,kcr,w,"lower") = vm_area.lo(j,kcr,w); ov_rotation_penalty(t,i,"lower") = vm_rotation_penalty.lo(i); @@ -59,4 +62,5 @@ oq30_bv_ann(t,j,potnatveg,"lower") = q30_bv_ann.lo(j,potnatveg); oq30_bv_per(t,j,potnatveg,"lower") = q30_bv_per.lo(j,potnatveg); oq30_land_snv(t,j,"lower") = q30_land_snv.lo(j); + oq30_land_snv_trans(t,j,"lower") = q30_land_snv_trans.lo(j); *##################### R SECTION END (OUTPUT DEFINITIONS) ###################### diff --git a/modules/30_crop/rotation_apr22/preloop.gms b/modules/30_crop/rotation_apr22/preloop.gms index feaa2aeed3..28af80e373 100644 --- a/modules/30_crop/rotation_apr22/preloop.gms +++ b/modules/30_crop/rotation_apr22/preloop.gms @@ -8,9 +8,20 @@ ** Trajectory for cropland scenarios * sigmoidal interpolation between start year and target year -m_sigmoid_interpol(p30_snv_scenario_fader,s30_snv_scenario_start,s30_snv_scenario_target,0,1); -m_sigmoid_interpol(p30_rotation_scenario_fader,s30_rotation_scenario_start,s30_rotation_scenario_target,0,1); +m_sigmoid_time_interpol(p30_snv_scenario_fader,s30_snv_scenario_start,s30_snv_scenario_target,0,1); +m_sigmoid_time_interpol(p30_rotation_scenario_fader,s30_rotation_scenario_start,s30_rotation_scenario_target,0,1); +* linear interpolation to estimate the cropland that +* requires relocation due to SNV policy +if (s30_snv_shr = 0, +i30_snv_relocation_target(j) = 0; + +elseif s30_snv_shr <= s30_snv_relocation_data_x1, +m_linear_cell_data_interpol(i30_snv_relocation_target, s30_snv_shr,0,s30_snv_relocation_data_x1,0, f30_snv_target_cropland(j, "SNV20TargetCropland")); + +elseif s30_snv_shr > s30_snv_relocation_data_x1, +m_linear_cell_data_interpol(i30_snv_relocation_target, s30_snv_shr,s30_snv_relocation_data_x1, s30_snv_relocation_data_x2,f30_snv_target_cropland(j, "SNV20TargetCropland"), f30_snv_target_cropland(j, "SNV50TargetCropland")); +); ** create crop rotation scenario i30_rotation_max_shr(t_all,rotamax30)= diff --git a/modules/30_crop/rotation_apr22/presolve.gms b/modules/30_crop/rotation_apr22/presolve.gms index 989bc33c34..225b681b18 100644 --- a/modules/30_crop/rotation_apr22/presolve.gms +++ b/modules/30_crop/rotation_apr22/presolve.gms @@ -25,6 +25,13 @@ p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * (s30_snv_shr * sum(cell(i,j), p30_country_snv_weight(i)) + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); +*' Cropland relocation in response to SNV policy is based on exogeneous land cover information +p30_snv_relocation(t,j) = (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * + (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_weight(i)) + + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_weight(i))); +p30_max_snv_relocation(t,j) = p30_snv_shr(t,j) * (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * pcm_land(j,"crop"); +p30_snv_relocation(t,j)$(p30_snv_relocation(t, j) > p30_max_snv_relocation(t,j)) = p30_max_snv_relocation(t,j); + *' Area potentially available for cropping p30_avl_cropland(t,j) = f30_avl_cropland(j,"%c30_marginal_land%") * (1 - p30_snv_shr(t,j)); *' @stop diff --git a/modules/35_natveg/dynamic_feb21/preloop.gms b/modules/35_natveg/dynamic_feb21/preloop.gms index e277913b3b..75ed687dd8 100644 --- a/modules/35_natveg/dynamic_feb21/preloop.gms +++ b/modules/35_natveg/dynamic_feb21/preloop.gms @@ -65,4 +65,4 @@ p35_land_start_ac(j,ac,"secdforest") = i35_secdforest(j,ac); * ----------------------------- * Set forest damage trajectory * ----------------------------- -m_sigmoid_interpol(p35_damage_fader,sm_fix_SSP2,s35_forest_damage_end,0,1); +m_sigmoid_time_interpol(p35_damage_fader,sm_fix_SSP2,s35_forest_damage_end,0,1); diff --git a/modules/42_water_demand/agr_sector_aug13/preloop.gms b/modules/42_water_demand/agr_sector_aug13/preloop.gms index 351a33dac8..fbf5faba06 100644 --- a/modules/42_water_demand/agr_sector_aug13/preloop.gms +++ b/modules/42_water_demand/agr_sector_aug13/preloop.gms @@ -13,5 +13,5 @@ i42_wat_req_k(t,j,kli) = f42_wat_req_kli(kli); * Trajectory for environmental flow policy * (linear interpolation from start year to target year) p42_efp(t_all,"off") = 0; -m_linear_interpol(p42_efp_fader, s42_efp_startyear, s42_efp_targetyear, 0, 1); +m_linear_time_interpol(p42_efp_fader, s42_efp_startyear, s42_efp_targetyear, 0, 1); p42_efp(t_all, "on") = p42_efp_fader(t_all); diff --git a/modules/42_water_demand/all_sectors_aug13/preloop.gms b/modules/42_water_demand/all_sectors_aug13/preloop.gms index 351a33dac8..fbf5faba06 100644 --- a/modules/42_water_demand/all_sectors_aug13/preloop.gms +++ b/modules/42_water_demand/all_sectors_aug13/preloop.gms @@ -13,5 +13,5 @@ i42_wat_req_k(t,j,kli) = f42_wat_req_kli(kli); * Trajectory for environmental flow policy * (linear interpolation from start year to target year) p42_efp(t_all,"off") = 0; -m_linear_interpol(p42_efp_fader, s42_efp_startyear, s42_efp_targetyear, 0, 1); +m_linear_time_interpol(p42_efp_fader, s42_efp_startyear, s42_efp_targetyear, 0, 1); p42_efp(t_all, "on") = p42_efp_fader(t_all); diff --git a/modules/44_biodiversity/bv_btc_mar21/preloop.gms b/modules/44_biodiversity/bv_btc_mar21/preloop.gms index e8fdf5e457..9a070d91b3 100644 --- a/modules/44_biodiversity/bv_btc_mar21/preloop.gms +++ b/modules/44_biodiversity/bv_btc_mar21/preloop.gms @@ -6,6 +6,6 @@ *** | Contact: magpie@pik-potsdam.de v44_bv_weighted.l(j) = 0.3; -m_linear_interpol(p44_price_bv_loss,s44_start_year,s44_target_year,s44_start_price,s44_target_price); +m_linear_time_interpol(p44_price_bv_loss,s44_start_year,s44_target_year,s44_start_price,s44_target_price); p44_price_bv_loss(t_all)$(m_year(t_all) < s44_start_year) = 0; display p44_price_bv_loss; From 4f4cb7d085fe1fe456eba51e7c2df76d50acdf11 Mon Sep 17 00:00:00 2001 From: florianh Date: Fri, 1 Mar 2024 11:40:27 +0100 Subject: [PATCH 08/21] removed AgroForestry code --- config/default.cfg | 14 -------------- modules/30_crop/endo_apr21/declarations.gms | 10 +--------- modules/30_crop/endo_apr21/equations.gms | 14 -------------- modules/30_crop/endo_apr21/input.gms | 14 -------------- modules/30_crop/endo_apr21/input/files | 3 --- modules/30_crop/endo_apr21/postsolve.gms | 10 ---------- modules/30_crop/endo_apr21/preloop.gms | 7 +------ modules/30_crop/endo_apr21/presolve.gms | 13 ++++--------- modules/30_crop/endo_apr21/sets.gms | 6 ------ modules/30_crop/penalty_apr22/input/files | 3 --- modules/30_crop/penalty_apr22/presolve.gms | 4 ++-- modules/30_crop/rotation_apr22/input/files | 3 --- modules/30_crop/rotation_apr22/presolve.gms | 4 ++-- 13 files changed, 10 insertions(+), 95 deletions(-) diff --git a/config/default.cfg b/config/default.cfg index b3bd9a596e..8c4de808f5 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -713,20 +713,6 @@ cfg$gms$s30_snv_scenario_target <- 2030 # def = 2030 # * "secdforest, past, other" etc. cfg$gms$land_snv <- "secdforest, forestry, past, other" #def = "secdforest, forestry, past, other" -# * Share of cropland used for AgroForestry at cluster level in target year. -# * AgroForestry is modelled as natural vegetation (secdforest, other) in cropland areas. -# * A share of 0.2 corresponds to 20 % of cropland used for AgroForestry. -# * Accepted values are between 0 and 1 -# Note: s30_agfor_shr applies to countries selected in policy_countries30 -# s30_agfor_shr_noselect applies to all other countries. -cfg$gms$s30_agfor_shr <- 0 # def = 0 -cfg$gms$s30_agfor_shr_noselect <- 0 # def = 0 -# * Year by which agfor policy ('s30_agfor_shr') is fully implemented. -# * Start year: -cfg$gms$s30_agfor_scenario_start <- 2020 # def = 2020 -# * Target year (year when full implementation is reached): -cfg$gms$s30_agfor_scenario_target <- 2030 # def = 2030 - # * Switch and specification of countries for which SNV and AgroForestry policies in # * s30_snv_shr and s30_agfor_shr apply. # * Options: list of iso-codes of countries where SNV and AgroForestry policies should be applied diff --git a/modules/30_crop/endo_apr21/declarations.gms b/modules/30_crop/endo_apr21/declarations.gms index 379c9c3327..bf1c907cbc 100644 --- a/modules/30_crop/endo_apr21/declarations.gms +++ b/modules/30_crop/endo_apr21/declarations.gms @@ -7,19 +7,15 @@ parameters p30_avl_cropland(t,j) Total available land for crop cultivation (mio. ha) - p30_country_weight(i) SNV and AgroForestry policy country weight per region (1) + p30_country_snv_weight(i) SNV policy country weight per region (1) p30_snv_shr(t,j) Share of semi-natural vegetation in cropland areas (1) i30_snv_relocation_target(j) Overall cropland area that requires relocation due SNV policy (mio. ha) p30_snv_relocation(t,j) Cropland area that is actually relocated during time step (mio. ha) p30_max_snv_relocation(t,j) Maximum cropland relocation during time step (mio. ha) - p30_agfor_shr(t,j) Share of AgroForestry in cropland areas (1) p30_country_dummy(iso) Dummy parameter indicating whether country is affected by selected cropland policy (1) i30_avl_cropland_iso(iso) Available land area for cropland at ISO level (mio. ha) p30_snv_scenario_fader(t_all) SNV scenario fader (1) - p30_agfor_scenario_fader(t_all) AgroForestry scenario fader (1) p30_rotation_scenario_fader(t_all) Crop rotation scenario fader (1) - i30_cropland_treecover(j) Cropland area covered by trees (mio. ha) - p30_land_agfor_start_year(j,land) Land area in start year of AgroForestry policy (mio. ha) ; positive variables @@ -40,8 +36,6 @@ equations q30_bv_per(j,potnatveg) Biodiversity value of perennial cropland (mio. ha) q30_land_snv(j) Land constraint for the SNV policy in cropland areas (mio. ha) q30_land_snv_trans(j) Land transition constraint for SNV policy in cropland areas (mio. ha) - q30_land_agfor(j) Land constraint for AgroForestry policy in cropland areas (mio. ha) - q30_land_agfor_trans(j) Land transition constraint for AgroForestry policy in cropland areas (mio. ha) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### @@ -59,8 +53,6 @@ parameters oq30_bv_per(t,j,potnatveg,type) Biodiversity value of perennial cropland (mio. ha) oq30_land_snv(t,j,type) Land constraint for the SNV policy in cropland areas (mio. ha) oq30_land_snv_trans(t,j,type) Land transition constraint for SNV policy in cropland areas (mio. ha) - oq30_land_agfor(t,j,type) Land constraint for AgroForestry policy in cropland areas (mio. ha) - oq30_land_agfor_trans(t,j,type) Land transition constraint for AgroForestry policy in cropland areas (mio. ha) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/30_crop/endo_apr21/equations.gms b/modules/30_crop/endo_apr21/equations.gms index 4dc0c33f2b..22e3f41b7f 100644 --- a/modules/30_crop/endo_apr21/equations.gms +++ b/modules/30_crop/endo_apr21/equations.gms @@ -40,20 +40,6 @@ q30_land_snv_trans(j2) .. sum(land_snv, vm_lu_transitions(j2,"crop",land_snv)) =g= sum(ct, p30_snv_relocation(ct,j2)); -*' Agroforestry constraints - - q30_land_agfor(j2) .. - sum(land_agfor, vm_land(j2,land_agfor) - p30_land_agfor_start_year(j2,land_agfor)) - =g= - sum(ct, p30_agfor_shr(ct,j2)) * vm_land(j2,"crop") - i30_cropland_treecover(j2); - - q30_land_agfor_trans(j2) .. - sum(land_agfor, vm_lu_transitions(j2,"crop",land_agfor)) - =g= - vm_land(j2,"crop") * (sum(ct, p30_agfor_shr(ct,j2)) - sum(pt, p30_agfor_shr(pt,j2))); - - - *' As additional constraints minimum and maximum rotational constraints limit *' the placing of crops. On the one hand, these rotational constraints reflect *' crop rotations limiting the share a specific crop can cover of the total area diff --git a/modules/30_crop/endo_apr21/input.gms b/modules/30_crop/endo_apr21/input.gms index c6da7389b4..a8c1656d83 100644 --- a/modules/30_crop/endo_apr21/input.gms +++ b/modules/30_crop/endo_apr21/input.gms @@ -27,12 +27,6 @@ s30_snv_scenario_start SNV scenario start year / 2020 / s30_snv_scenario_target SNV scenario target year / 2030 / s30_snv_relocation_data_x1 First reference value in SNV target cropland data (1) / 0.2 / s30_snv_relocation_data_x2 Second reference value in SNV target cropland data (1) / 0.5 / - -s30_agfor_shr Share of cropland used for AgroForestry in target year (1) / 0.2 / -s30_agfor_shr_noselect Share of cropland used for AgroForestry in target year (1) / 0 / -s30_agfor_scenario_start AgroForestry scenario start year / 2020 / -s30_agfor_scenario_target AgroForestry scenario target year / 2050 / - s30_rotation_scenario_start Rotation scenario start year / 2020 / s30_rotation_scenario_target Rotation scenario target year / 2050 / ; @@ -121,14 +115,6 @@ $include "./modules/30_crop/endo_apr21/input/avl_cropland_iso.cs3" $offdelim ; -********* CROPLAND TREECOVER ******************************************* - -table f30_cropland_treecover(j,crop_treecover30) Cropland area covered by trees (mio. ha) -$ondelim -$include "./modules/30_crop/endo_apr21/input/CroplandTreecover.cs3" -$offdelim -; - ********* SNV TARGET CROPLAND ******************************************* table f30_snv_target_cropland(j,relocation_target30) Cropland in 2019 requiring relocation due to SNV policy (mio. ha) diff --git a/modules/30_crop/endo_apr21/input/files b/modules/30_crop/endo_apr21/input/files index 51ae5943da..4dbb9f81fa 100644 --- a/modules/30_crop/endo_apr21/input/files +++ b/modules/30_crop/endo_apr21/input/files @@ -8,6 +8,3 @@ avl_cropland_iso.cs3 SNVTargetCropland.cs3 SNVTargetCropland_iso.cs3 SNVTargetCropland_0.5.mz -CroplandTreecover.cs3 -CroplandTreecover_iso.cs3 -CroplandTreecover_0.5.mz diff --git a/modules/30_crop/endo_apr21/postsolve.gms b/modules/30_crop/endo_apr21/postsolve.gms index 56ef09450b..3fb2a2b4a8 100644 --- a/modules/30_crop/endo_apr21/postsolve.gms +++ b/modules/30_crop/endo_apr21/postsolve.gms @@ -5,8 +5,6 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -p30_land_agfor_start_year(j,land)$(m_year(t) = s30_agfor_scenario_start) = vm_land.l(j,land); - *#################### R SECTION START (OUTPUT DEFINITIONS) ##################### ov_fallow(t,j,"marginal") = vm_fallow.m(j); ov_area(t,j,kcr,w,"marginal") = vm_area.m(j,kcr,w); @@ -21,8 +19,6 @@ p30_land_agfor_start_year(j,land)$(m_year(t) = s30_agfor_scenario_start) = vm_la oq30_bv_per(t,j,potnatveg,"marginal") = q30_bv_per.m(j,potnatveg); oq30_land_snv(t,j,"marginal") = q30_land_snv.m(j); oq30_land_snv_trans(t,j,"marginal") = q30_land_snv_trans.m(j); - oq30_land_agfor(t,j,"marginal") = q30_land_agfor.m(j); - oq30_land_agfor_trans(t,j,"marginal") = q30_land_agfor_trans.m(j); ov_fallow(t,j,"level") = vm_fallow.l(j); ov_area(t,j,kcr,w,"level") = vm_area.l(j,kcr,w); ov_rotation_penalty(t,i,"level") = vm_rotation_penalty.l(i); @@ -36,8 +32,6 @@ p30_land_agfor_start_year(j,land)$(m_year(t) = s30_agfor_scenario_start) = vm_la oq30_bv_per(t,j,potnatveg,"level") = q30_bv_per.l(j,potnatveg); oq30_land_snv(t,j,"level") = q30_land_snv.l(j); oq30_land_snv_trans(t,j,"level") = q30_land_snv_trans.l(j); - oq30_land_agfor(t,j,"level") = q30_land_agfor.l(j); - oq30_land_agfor_trans(t,j,"level") = q30_land_agfor_trans.l(j); ov_fallow(t,j,"upper") = vm_fallow.up(j); ov_area(t,j,kcr,w,"upper") = vm_area.up(j,kcr,w); ov_rotation_penalty(t,i,"upper") = vm_rotation_penalty.up(i); @@ -51,8 +45,6 @@ p30_land_agfor_start_year(j,land)$(m_year(t) = s30_agfor_scenario_start) = vm_la oq30_bv_per(t,j,potnatveg,"upper") = q30_bv_per.up(j,potnatveg); oq30_land_snv(t,j,"upper") = q30_land_snv.up(j); oq30_land_snv_trans(t,j,"upper") = q30_land_snv_trans.up(j); - oq30_land_agfor(t,j,"upper") = q30_land_agfor.up(j); - oq30_land_agfor_trans(t,j,"upper") = q30_land_agfor_trans.up(j); ov_fallow(t,j,"lower") = vm_fallow.lo(j); ov_area(t,j,kcr,w,"lower") = vm_area.lo(j,kcr,w); ov_rotation_penalty(t,i,"lower") = vm_rotation_penalty.lo(i); @@ -66,6 +58,4 @@ p30_land_agfor_start_year(j,land)$(m_year(t) = s30_agfor_scenario_start) = vm_la oq30_bv_per(t,j,potnatveg,"lower") = q30_bv_per.lo(j,potnatveg); oq30_land_snv(t,j,"lower") = q30_land_snv.lo(j); oq30_land_snv_trans(t,j,"lower") = q30_land_snv_trans.lo(j); - oq30_land_agfor(t,j,"lower") = q30_land_agfor.lo(j); - oq30_land_agfor_trans(t,j,"lower") = q30_land_agfor_trans.lo(j); *##################### R SECTION END (OUTPUT DEFINITIONS) ###################### diff --git a/modules/30_crop/endo_apr21/preloop.gms b/modules/30_crop/endo_apr21/preloop.gms index 10d52c7e45..d321776d66 100644 --- a/modules/30_crop/endo_apr21/preloop.gms +++ b/modules/30_crop/endo_apr21/preloop.gms @@ -8,7 +8,6 @@ ** Trajectory for cropland scenarios * sigmoidal interpolation between start year and target year m_sigmoid_time_interpol(p30_snv_scenario_fader,s30_snv_scenario_start,s30_snv_scenario_target,0,1); -m_sigmoid_time_interpol(p30_agfor_scenario_fader,s30_agfor_scenario_start,s30_agfor_scenario_target,0,1); m_sigmoid_time_interpol(p30_rotation_scenario_fader,s30_rotation_scenario_start,s30_rotation_scenario_target,0,1); * linear interpolation to estimate the cropland that @@ -37,8 +36,4 @@ p30_country_dummy(policy_countries30) = 1; * share is calculated that translates the countries' influence to regional level. * Countries are weighted by available cropland area. i30_avl_cropland_iso(iso) = f30_avl_cropland_iso(iso,"%c30_marginal_land%"); -p30_country_weight(i) = sum(i_to_iso(i,iso), p30_country_dummy(iso) * i30_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), i30_avl_cropland_iso(iso)); - -i30_cropland_treecover(j) = f30_cropland_treecover(j,"CropTreecoverArea"); - -p30_land_agfor_start_year(j,land) = 0; +p30_country_snv_weight(i) = sum(i_to_iso(i,iso), p30_country_dummy(iso) * i30_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), i30_avl_cropland_iso(iso)); diff --git a/modules/30_crop/endo_apr21/presolve.gms b/modules/30_crop/endo_apr21/presolve.gms index 4e244641e2..2dc734a300 100644 --- a/modules/30_crop/endo_apr21/presolve.gms +++ b/modules/30_crop/endo_apr21/presolve.gms @@ -30,21 +30,16 @@ crpmin30(crp30) = yes$(f30_rotation_min_shr(crp30) > 0); *' @code *' Minimum semi-natural vegetation (SNV) share is fading in after 2020 p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * - (s30_snv_shr * sum(cell(i,j), p30_country_weight(i)) - + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_weight(i))); + (s30_snv_shr * sum(cell(i,j), p30_country_snv_weight(i)) + + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); *' Cropland relocation in response to SNV policy is based on exogeneous land cover information p30_snv_relocation(t,j) = (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * - (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_weight(i)) - + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_weight(i))); + (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_snv_weight(i)) + + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); p30_max_snv_relocation(t,j) = p30_snv_shr(t,j) * (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * pcm_land(j,"crop"); p30_snv_relocation(t,j)$(p30_snv_relocation(t, j) > p30_max_snv_relocation(t,j)) = p30_max_snv_relocation(t,j); -*' Minimum agroforestry share is fading in after 2020 -p30_agfor_shr(t,j) = p30_agfor_scenario_fader(t) * - (s30_agfor_shr * sum(cell(i,j), p30_country_weight(i)) - + s30_agfor_shr_noselect * sum(cell(i,j), 1-p30_country_weight(i))); - *' Area potentially available for cropping p30_avl_cropland(t,j) = f30_avl_cropland(j,"%c30_marginal_land%") * (1 - p30_snv_shr(t,j)); *' @stop diff --git a/modules/30_crop/endo_apr21/sets.gms b/modules/30_crop/endo_apr21/sets.gms index 0322f95b59..bbef560d17 100644 --- a/modules/30_crop/endo_apr21/sets.gms +++ b/modules/30_crop/endo_apr21/sets.gms @@ -54,13 +54,7 @@ sets policy_target30 Target year for cropland policy / none, by2030, by2050 / - crop_treecover30 Cropland treecover data - / CropTreecoverArea / - relocation_target30 Cropland requiring relocation based on different SNV targets / SNV20TargetCropland, SNV50TargetCropland / - land_agfor(land) land types allowed for AgroForestry policy - / secdforest, other / - ; diff --git a/modules/30_crop/penalty_apr22/input/files b/modules/30_crop/penalty_apr22/input/files index e9e1ff7721..3d79b3e002 100644 --- a/modules/30_crop/penalty_apr22/input/files +++ b/modules/30_crop/penalty_apr22/input/files @@ -8,6 +8,3 @@ avl_cropland_iso.cs3 SNVTargetCropland.cs3 SNVTargetCropland_iso.cs3 SNVTargetCropland_0.5.mz -CroplandTreecover.cs3 -CroplandTreecover_iso.cs3 -CroplandTreecover_0.5.mz diff --git a/modules/30_crop/penalty_apr22/presolve.gms b/modules/30_crop/penalty_apr22/presolve.gms index 7fcf38a1f5..d4477de528 100644 --- a/modules/30_crop/penalty_apr22/presolve.gms +++ b/modules/30_crop/penalty_apr22/presolve.gms @@ -27,8 +27,8 @@ p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * *' Cropland relocation in response to SNV policy is based on exogeneous land cover information p30_snv_relocation(t,j) = (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * - (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_weight(i)) - + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_weight(i))); + (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_snv_weight(i)) + + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); p30_max_snv_relocation(t,j) = p30_snv_shr(t,j) * (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * pcm_land(j,"crop"); p30_snv_relocation(t,j)$(p30_snv_relocation(t, j) > p30_max_snv_relocation(t,j)) = p30_max_snv_relocation(t,j); diff --git a/modules/30_crop/rotation_apr22/input/files b/modules/30_crop/rotation_apr22/input/files index 1a20d41818..4353b64e69 100644 --- a/modules/30_crop/rotation_apr22/input/files +++ b/modules/30_crop/rotation_apr22/input/files @@ -8,6 +8,3 @@ avl_cropland_iso.cs3 SNVTargetCropland.cs3 SNVTargetCropland_iso.cs3 SNVTargetCropland_0.5.mz -CroplandTreecover.cs3 -CroplandTreecover_iso.cs3 -CroplandTreecover_0.5.mz diff --git a/modules/30_crop/rotation_apr22/presolve.gms b/modules/30_crop/rotation_apr22/presolve.gms index 225b681b18..f1709b313c 100644 --- a/modules/30_crop/rotation_apr22/presolve.gms +++ b/modules/30_crop/rotation_apr22/presolve.gms @@ -27,8 +27,8 @@ p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * *' Cropland relocation in response to SNV policy is based on exogeneous land cover information p30_snv_relocation(t,j) = (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * - (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_weight(i)) - + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_weight(i))); + (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_snv_weight(i)) + + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); p30_max_snv_relocation(t,j) = p30_snv_shr(t,j) * (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * pcm_land(j,"crop"); p30_snv_relocation(t,j)$(p30_snv_relocation(t, j) > p30_max_snv_relocation(t,j)) = p30_max_snv_relocation(t,j); From a75c911a9929d7b2038fb591f44677dec9fcb931 Mon Sep 17 00:00:00 2001 From: florianh Date: Fri, 1 Mar 2024 11:42:57 +0100 Subject: [PATCH 09/21] revert --- config/default.cfg | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/config/default.cfg b/config/default.cfg index 8c4de808f5..ae068275e9 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -707,18 +707,17 @@ cfg$gms$s30_snv_shr_noselect <- 0 # def = 0 cfg$gms$s30_snv_scenario_start <- 2020 # def = 2020 # * Target year (year when full implementation is reached): cfg$gms$s30_snv_scenario_target <- 2030 # def = 2030 -# * Land types included in the SNV policy. This option allows for sensitivity analyses. -# * plausible options: "secdforest, forestry, past, other", -# * "secdforest, other", -# * "secdforest, past, other" etc. -cfg$gms$land_snv <- "secdforest, forestry, past, other" #def = "secdforest, forestry, past, other" - # * Switch and specification of countries for which SNV and AgroForestry policies in # * s30_snv_shr and s30_agfor_shr apply. # * Options: list of iso-codes of countries where SNV and AgroForestry policies should be applied # * Note: must be written in the format: "IND, BRA, DEU" # * Default: all iso countries cfg$gms$policy_countries30 <- all_iso_countries +# * Land types included in the SNV policy. This option allows for sensitivity analyses. +# * plausible options: "secdforest, forestry, past, other", +# * "secdforest, other", +# * "secdforest, past, other" etc. +cfg$gms$land_snv <- "secdforest, forestry, past, other" #def = "secdforest, forestry, past, other" # ***--------------------- 31_past --------------------------------------- # * (static): static pasture From 948e050ba6a95e5962a66b72b56ffcf7d1473398 Mon Sep 17 00:00:00 2001 From: florianh Date: Fri, 1 Mar 2024 11:44:07 +0100 Subject: [PATCH 10/21] revert --- config/default.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/default.cfg b/config/default.cfg index ae068275e9..c81ddb8f8a 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -707,9 +707,9 @@ cfg$gms$s30_snv_shr_noselect <- 0 # def = 0 cfg$gms$s30_snv_scenario_start <- 2020 # def = 2020 # * Target year (year when full implementation is reached): cfg$gms$s30_snv_scenario_target <- 2030 # def = 2030 -# * Switch and specification of countries for which SNV and AgroForestry policies in +# * Switch and specification of countries for which SNV policy in # * s30_snv_shr and s30_agfor_shr apply. -# * Options: list of iso-codes of countries where SNV and AgroForestry policies should be applied +# * Options: list of iso-codes of countries where SNV policy should be applied # * Note: must be written in the format: "IND, BRA, DEU" # * Default: all iso countries cfg$gms$policy_countries30 <- all_iso_countries From d3814696abc0e22adbcb8edb1fb6cff49145e1d4 Mon Sep 17 00:00:00 2001 From: florianh Date: Fri, 1 Mar 2024 11:44:43 +0100 Subject: [PATCH 11/21] revert --- config/default.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/default.cfg b/config/default.cfg index c81ddb8f8a..2a0b3a32b8 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -708,7 +708,7 @@ cfg$gms$s30_snv_scenario_start <- 2020 # def = 2020 # * Target year (year when full implementation is reached): cfg$gms$s30_snv_scenario_target <- 2030 # def = 2030 # * Switch and specification of countries for which SNV policy in -# * s30_snv_shr and s30_agfor_shr apply. +# * s30_snv_shr apply. # * Options: list of iso-codes of countries where SNV policy should be applied # * Note: must be written in the format: "IND, BRA, DEU" # * Default: all iso countries From 91185de4c96fd45657fdd455b5f7ab97ec78b830 Mon Sep 17 00:00:00 2001 From: florianh Date: Fri, 1 Mar 2024 11:47:39 +0100 Subject: [PATCH 12/21] revert --- modules/30_crop/endo_apr21/postsolve.gms | 1 + modules/30_crop/endo_apr21/preloop.gms | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/30_crop/endo_apr21/postsolve.gms b/modules/30_crop/endo_apr21/postsolve.gms index 3fb2a2b4a8..d15f95065c 100644 --- a/modules/30_crop/endo_apr21/postsolve.gms +++ b/modules/30_crop/endo_apr21/postsolve.gms @@ -5,6 +5,7 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de + *#################### R SECTION START (OUTPUT DEFINITIONS) ##################### ov_fallow(t,j,"marginal") = vm_fallow.m(j); ov_area(t,j,kcr,w,"marginal") = vm_area.m(j,kcr,w); diff --git a/modules/30_crop/endo_apr21/preloop.gms b/modules/30_crop/endo_apr21/preloop.gms index d321776d66..8c21fb8401 100644 --- a/modules/30_crop/endo_apr21/preloop.gms +++ b/modules/30_crop/endo_apr21/preloop.gms @@ -28,8 +28,8 @@ m_linear_cell_data_interpol(i30_snv_relocation_target, s30_snv_shr,s30_snv_reloc fm_croparea(t_past,j,w,kcr)$(fm_croparea(t_past,j,w,kcr)<0) = 0; ****** Regional share of semi-natural vegetation (SNV) in cropland areas for selective countries: -* Country switch to determine countries for which a SNV or AgroForestry policy shall be applied. -* In the default case, the SNV and AgroForestry policies affect all countries when activated. +* Country switch to determine countries for which a SNV policy shall be applied. +* In the default case, the SNV policy affect all countries when activated. p30_country_dummy(iso) = 0; p30_country_dummy(policy_countries30) = 1; * Because MAgPIE is not run at country-level, but at region level, a region From 557c97aa393121cd94226d45ee2a736cb81093c5 Mon Sep 17 00:00:00 2001 From: florianh Date: Fri, 1 Mar 2024 11:50:07 +0100 Subject: [PATCH 13/21] revert --- modules/30_crop/endo_apr21/preloop.gms | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/30_crop/endo_apr21/preloop.gms b/modules/30_crop/endo_apr21/preloop.gms index 8c21fb8401..12c01058e1 100644 --- a/modules/30_crop/endo_apr21/preloop.gms +++ b/modules/30_crop/endo_apr21/preloop.gms @@ -29,7 +29,7 @@ fm_croparea(t_past,j,w,kcr)$(fm_croparea(t_past,j,w,kcr)<0) = 0; ****** Regional share of semi-natural vegetation (SNV) in cropland areas for selective countries: * Country switch to determine countries for which a SNV policy shall be applied. -* In the default case, the SNV policy affect all countries when activated. +* In the default case, the SNV policy affects all countries when activated. p30_country_dummy(iso) = 0; p30_country_dummy(policy_countries30) = 1; * Because MAgPIE is not run at country-level, but at region level, a region From c189d33157088db126de7a5592c127bd90a99265 Mon Sep 17 00:00:00 2001 From: pvjeetze Date: Fri, 1 Mar 2024 13:12:40 +0100 Subject: [PATCH 14/21] description fixes --- modules/30_crop/endo_apr21/equations.gms | 2 +- modules/30_crop/endo_apr21/presolve.gms | 6 +++++- modules/30_crop/penalty_apr22/equations.gms | 2 +- modules/30_crop/penalty_apr22/presolve.gms | 6 +++++- modules/30_crop/rotation_apr22/equations.gms | 2 +- modules/30_crop/rotation_apr22/presolve.gms | 6 +++++- 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/30_crop/endo_apr21/equations.gms b/modules/30_crop/endo_apr21/equations.gms index 22e3f41b7f..a4c495c099 100644 --- a/modules/30_crop/endo_apr21/equations.gms +++ b/modules/30_crop/endo_apr21/equations.gms @@ -33,7 +33,7 @@ + sum((ct,land_snv,consv_type), pm_land_conservation(ct,j2,land_snv,consv_type)); *' The semi-natural vegetation constraint for cropland areas has been suggested at the per square -*' kilometer scale. The amount of cropland requiring relocation has therefor been derived from +*' kilometer scale. The amount of cropland requiring relocation has therefore been derived from *' exogeneous high-resolution land cover information from the Copernicus Global Land Service *' (@buchhorn_copernicus_2020). diff --git a/modules/30_crop/endo_apr21/presolve.gms b/modules/30_crop/endo_apr21/presolve.gms index 2dc734a300..a3a4026cd4 100644 --- a/modules/30_crop/endo_apr21/presolve.gms +++ b/modules/30_crop/endo_apr21/presolve.gms @@ -33,10 +33,14 @@ p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * (s30_snv_shr * sum(cell(i,j), p30_country_snv_weight(i)) + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); -*' Cropland relocation in response to SNV policy is based on exogeneous land cover information +*' Cropland relocation in response to SNV policy is based on exogeneous land +*' cover information. The rate of the policy implementation is derived based +*' on the difference of scenario fader values in consecutive time steps p30_snv_relocation(t,j) = (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_snv_weight(i)) + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); +*' The following lines take care of mismatches in the input +*' data (derived from satellite imagery) and cropland reduction p30_max_snv_relocation(t,j) = p30_snv_shr(t,j) * (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * pcm_land(j,"crop"); p30_snv_relocation(t,j)$(p30_snv_relocation(t, j) > p30_max_snv_relocation(t,j)) = p30_max_snv_relocation(t,j); diff --git a/modules/30_crop/penalty_apr22/equations.gms b/modules/30_crop/penalty_apr22/equations.gms index a409927be2..5dd3f2c2bc 100644 --- a/modules/30_crop/penalty_apr22/equations.gms +++ b/modules/30_crop/penalty_apr22/equations.gms @@ -35,7 +35,7 @@ + sum((ct,land_snv,consv_type), pm_land_conservation(ct,j2,land_snv,consv_type)); *' The semi-natural vegetation constraint for cropland areas has been suggested at the per square -*' kilometer scale. The amount of cropland requiring relocation has therefor been derived from +*' kilometer scale. The amount of cropland requiring relocation has therefore been derived from *' exogeneous high-resolution land cover information from the Copernicus Global Land Service *' (@buchhorn_copernicus_2020). diff --git a/modules/30_crop/penalty_apr22/presolve.gms b/modules/30_crop/penalty_apr22/presolve.gms index d4477de528..9527048f8e 100644 --- a/modules/30_crop/penalty_apr22/presolve.gms +++ b/modules/30_crop/penalty_apr22/presolve.gms @@ -25,10 +25,14 @@ p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * (s30_snv_shr * sum(cell(i,j), p30_country_snv_weight(i)) + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); -*' Cropland relocation in response to SNV policy is based on exogeneous land cover information +*' Cropland relocation in response to SNV policy is based on exogeneous land +*' cover information. The rate of the policy implementation is derived based +*' on the difference of scenario fader values in consecutive time steps p30_snv_relocation(t,j) = (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_snv_weight(i)) + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); +*' The following lines take care of mismatches in the input +*' data (derived from satellite imagery) and cropland reduction p30_max_snv_relocation(t,j) = p30_snv_shr(t,j) * (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * pcm_land(j,"crop"); p30_snv_relocation(t,j)$(p30_snv_relocation(t, j) > p30_max_snv_relocation(t,j)) = p30_max_snv_relocation(t,j); diff --git a/modules/30_crop/rotation_apr22/equations.gms b/modules/30_crop/rotation_apr22/equations.gms index a2163ff71f..c208b6e5b3 100644 --- a/modules/30_crop/rotation_apr22/equations.gms +++ b/modules/30_crop/rotation_apr22/equations.gms @@ -35,7 +35,7 @@ + sum((ct,land_snv,consv_type), pm_land_conservation(ct,j2,land_snv,consv_type)); *' The semi-natural vegetation constraint for cropland areas has been suggested at the per square -*' kilometer scale. The amount of cropland requiring relocation has therefor been derived from +*' kilometer scale. The amount of cropland requiring relocation has therefore been derived from *' exogeneous high-resolution land cover information from the Copernicus Global Land Service *' (@buchhorn_copernicus_2020). diff --git a/modules/30_crop/rotation_apr22/presolve.gms b/modules/30_crop/rotation_apr22/presolve.gms index f1709b313c..913d8f845e 100644 --- a/modules/30_crop/rotation_apr22/presolve.gms +++ b/modules/30_crop/rotation_apr22/presolve.gms @@ -25,10 +25,14 @@ p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * (s30_snv_shr * sum(cell(i,j), p30_country_snv_weight(i)) + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); -*' Cropland relocation in response to SNV policy is based on exogeneous land cover information +*' Cropland relocation in response to SNV policy is based on exogeneous land +*' cover information. The rate of the policy implementation is derived based +*' on the difference of scenario fader values in consecutive time steps p30_snv_relocation(t,j) = (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_snv_weight(i)) + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); +*' The following lines take care of mismatches in the input +*' data (derived from satellite imagery) and cropland reduction p30_max_snv_relocation(t,j) = p30_snv_shr(t,j) * (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * pcm_land(j,"crop"); p30_snv_relocation(t,j)$(p30_snv_relocation(t, j) > p30_max_snv_relocation(t,j)) = p30_max_snv_relocation(t,j); From f7656acb0eede61c42ed00eaa2ce1b3220ba29c2 Mon Sep 17 00:00:00 2001 From: pvjeetze Date: Fri, 1 Mar 2024 13:25:01 +0100 Subject: [PATCH 15/21] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e5a622fb5..0ab88fa8fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - **21_trade** s21_trade_bal_damper for roundwood changed from 0.75 to 0.65 ### added +- **30_crop** Improved representation of cropland requiring relocation in response to introducing semi-natural habitat at the 1 km level based on high-resolution satellite imagery. - **32_forestry** new interfaces `vm_land_forestry`, `pcm_land_forestry` `vm_landexpansion_forestry` and `vm_landreduction_forestry` - **scripts** added peatland to output/extra/disaggregation.R - **56_ghg_policy_** added new trajectories for R32M46 From 111fb0739a3c7cc0b9c3c8f1de16f8dd34aaf76c Mon Sep 17 00:00:00 2001 From: florianh Date: Mon, 4 Mar 2024 17:34:43 +0100 Subject: [PATCH 16/21] removed not needed iso files --- modules/30_crop/endo_apr21/input/files | 1 - modules/30_crop/penalty_apr22/input/files | 1 - modules/30_crop/rotation_apr22/input/files | 1 - 3 files changed, 3 deletions(-) diff --git a/modules/30_crop/endo_apr21/input/files b/modules/30_crop/endo_apr21/input/files index 4dbb9f81fa..d0cfbda228 100644 --- a/modules/30_crop/endo_apr21/input/files +++ b/modules/30_crop/endo_apr21/input/files @@ -6,5 +6,4 @@ avl_cropland_0.5.mz f30_croparea_w_initialisation.cs3 avl_cropland_iso.cs3 SNVTargetCropland.cs3 -SNVTargetCropland_iso.cs3 SNVTargetCropland_0.5.mz diff --git a/modules/30_crop/penalty_apr22/input/files b/modules/30_crop/penalty_apr22/input/files index 3d79b3e002..b1795d1c21 100644 --- a/modules/30_crop/penalty_apr22/input/files +++ b/modules/30_crop/penalty_apr22/input/files @@ -6,5 +6,4 @@ avl_cropland_0.5.mz f30_croparea_w_initialisation.cs3 avl_cropland_iso.cs3 SNVTargetCropland.cs3 -SNVTargetCropland_iso.cs3 SNVTargetCropland_0.5.mz diff --git a/modules/30_crop/rotation_apr22/input/files b/modules/30_crop/rotation_apr22/input/files index 4353b64e69..6fe1594cf5 100644 --- a/modules/30_crop/rotation_apr22/input/files +++ b/modules/30_crop/rotation_apr22/input/files @@ -6,5 +6,4 @@ avl_cropland_0.5.mz f30_croparea_w_initialisation.cs3 avl_cropland_iso.cs3 SNVTargetCropland.cs3 -SNVTargetCropland_iso.cs3 SNVTargetCropland_0.5.mz From 577b558b5d340f65ecdfb037d12ac6204b34e078 Mon Sep 17 00:00:00 2001 From: florianh Date: Tue, 5 Mar 2024 14:07:58 +0100 Subject: [PATCH 17/21] sm_fix_cc correction, which makes sure that before 2020 the same values are used irrespective of the choosen RCP --- CHANGELOG.md | 4 ++-- modules/52_carbon/normal_dec17/input.gms | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9884ad901e..c060e6a59e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,12 +12,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### added - **scripts** added a new validation_cell.R output script that generates a pdf with the comparison of magpie land use and crop type outputs with LUH and MAPSPAM historical data at cellular resolution. - **config** added `.codeCheck` with additonal configuration when running `gms::codeCheck` +- **30_crop** Improved representation of cropland requiring relocation in response to introducing semi-natural habitat at the 1 km level based on high-resolution satellite imagery. ### removed - ### fixed -- +- **52_carbon** i52_land_carbon_sink was not identical before 2020 for different RCPs. Fixed by setting to RCPBU until the year defined in sm_fix_cc. ## [4.7.1] - 2024-02-28 @@ -38,7 +39,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - **start_functions** Check if cfg$recalibrate is consistent with cfg$gms$s14_use_yield_calib ### added -- **30_crop** Improved representation of cropland requiring relocation in response to introducing semi-natural habitat at the 1 km level based on high-resolution satellite imagery. - **32_forestry** new interfaces `vm_land_forestry`, `pcm_land_forestry` `vm_landexpansion_forestry` and `vm_landreduction_forestry` - **56_ghg_policy_** added new trajectories for R32M46 - **60_bioenergy** added new trajectories for R32M46 diff --git a/modules/52_carbon/normal_dec17/input.gms b/modules/52_carbon/normal_dec17/input.gms index f9e9d2f35d..cca246899a 100644 --- a/modules/52_carbon/normal_dec17/input.gms +++ b/modules/52_carbon/normal_dec17/input.gms @@ -55,4 +55,5 @@ $elseif "%c52_land_carbon_sink_rcp%" == "nocc_hist" i52_land_carbon_sink(t_all,i)$(m_year(t_all) > sm_fix_cc) = f52_land_carbon_sink(t_all,i,"RCPBU")$(m_year(t_all) = sm_fix_cc); $else i52_land_carbon_sink(t_all,i) = f52_land_carbon_sink(t_all,i,"%c52_land_carbon_sink_rcp%"); + i52_land_carbon_sink(t_all,i)$(m_year(t_all) <= sm_fix_cc) = f52_land_carbon_sink(t_all,i,"RCPBU")$(m_year(t_all) <= sm_fix_cc); $endif From ac23b7ae72ad3aee296e75225e12cee5c917ac98 Mon Sep 17 00:00:00 2001 From: florianh Date: Tue, 5 Mar 2024 15:40:35 +0100 Subject: [PATCH 18/21] si set removed --- CHANGELOG.md | 2 +- core/sets.gms | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c060e6a59e..238acdb96c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - **30_crop** Improved representation of cropland requiring relocation in response to introducing semi-natural habitat at the 1 km level based on high-resolution satellite imagery. ### removed -- +- **core** removed no longer needed set `si` Suitability classes ### fixed - **52_carbon** i52_land_carbon_sink was not identical before 2020 for different RCPs. Fixed by setting to RCPBU until the year defined in sm_fix_cc. diff --git a/core/sets.gms b/core/sets.gms index 4e35a355a6..a6bb829812 100644 --- a/core/sets.gms +++ b/core/sets.gms @@ -256,9 +256,6 @@ sets forest_type forest type / plantations, natveg / - si Suitability classes - / si0, nsi0 / - ***Forestry** ac Age classes / ac0,ac5,ac10,ac15,ac20,ac25,ac30,ac35,ac40,ac45,ac50, ac55,ac60,ac65,ac70,ac75,ac80,ac85,ac90,ac95,ac100, From 1eabaf507ff0b5a3105cbf58d1495d9d92d2a077 Mon Sep 17 00:00:00 2001 From: pvjeetze Date: Wed, 6 Mar 2024 20:03:18 +0100 Subject: [PATCH 19/21] minor fixes --- config/default.cfg | 6 ++++-- main.gms | 4 ++-- modules/30_crop/endo_apr21/declarations.gms | 2 +- modules/30_crop/endo_apr21/presolve.gms | 7 +++++-- modules/30_crop/penalty_apr22/declarations.gms | 2 +- modules/30_crop/penalty_apr22/presolve.gms | 7 +++++-- modules/30_crop/rotation_apr22/presolve.gms | 6 ++++-- 7 files changed, 22 insertions(+), 12 deletions(-) diff --git a/config/default.cfg b/config/default.cfg index 2a0b3a32b8..7d9e8a4e5f 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -695,15 +695,17 @@ cfg$gms$s30_rotation_scenario_target <- 2050 # def = 2050 cfg$gms$c30_marginal_land <- "q33_marginal" # def = "q33_marginal" # * Share of available cropland that is withheld for maintaining semi-natural vegetation (SNV) -# * in cropland areas, including grassland, forest and other land. For example, +# * in each square km in cropland areas, including grassland, forest and other land. For example, # * a share of 0.2 corresponds to 20 % of SNV in terms of the available cropland. +# * The amount of cropland relocation is estimated based on external high resolution +# * land cover information from the Copernicus Global Land Service for the year 2019. # * Accepted sensible values are between 0 and 0.5 # Note: s30_snv_shr applies to countries selected in policy_countries30 # s30_snv_shr_noselect applies to all other countries. cfg$gms$s30_snv_shr <- 0 # def = 0 cfg$gms$s30_snv_shr_noselect <- 0 # def = 0 # * Year by which SNV policy ('s30_snv_shr') is fully implemented. -# * Start year: +# * Start year (should be close to 2019): cfg$gms$s30_snv_scenario_start <- 2020 # def = 2020 # * Target year (year when full implementation is reached): cfg$gms$s30_snv_scenario_target <- 2030 # def = 2030 diff --git a/main.gms b/main.gms index 494328ca9d..a758d51937 100644 --- a/main.gms +++ b/main.gms @@ -221,7 +221,7 @@ $offlisting $setglobal c_timesteps coup2100 $setglobal c_past till_2010 -$setglobal c_title default +$setglobal c_title rev2_SNVTests_PR637_SNV50 scalars s_use_gdx use of gdx files / 0 / @@ -259,7 +259,7 @@ $setglobal natveg dynamic_feb21 $setglobal employment exo_may22 $setglobal labor_prod off -$setglobal factor_costs per_ton_fao_may22 +$setglobal factor_costs sticky_feb18 $setglobal landconversion calib $setglobal transport gtap_nov12 diff --git a/modules/30_crop/endo_apr21/declarations.gms b/modules/30_crop/endo_apr21/declarations.gms index bf1c907cbc..0ab0da5cad 100644 --- a/modules/30_crop/endo_apr21/declarations.gms +++ b/modules/30_crop/endo_apr21/declarations.gms @@ -9,7 +9,7 @@ parameters p30_avl_cropland(t,j) Total available land for crop cultivation (mio. ha) p30_country_snv_weight(i) SNV policy country weight per region (1) p30_snv_shr(t,j) Share of semi-natural vegetation in cropland areas (1) - i30_snv_relocation_target(j) Overall cropland area that requires relocation due SNV policy (mio. ha) + i30_snv_relocation_target(j) Overall cropland area that requires relocation due to SNV policy (mio. ha) p30_snv_relocation(t,j) Cropland area that is actually relocated during time step (mio. ha) p30_max_snv_relocation(t,j) Maximum cropland relocation during time step (mio. ha) p30_country_dummy(iso) Dummy parameter indicating whether country is affected by selected cropland policy (1) diff --git a/modules/30_crop/endo_apr21/presolve.gms b/modules/30_crop/endo_apr21/presolve.gms index a3a4026cd4..b88ac26965 100644 --- a/modules/30_crop/endo_apr21/presolve.gms +++ b/modules/30_crop/endo_apr21/presolve.gms @@ -34,13 +34,16 @@ p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); *' Cropland relocation in response to SNV policy is based on exogeneous land -*' cover information. The rate of the policy implementation is derived based +*' cover information from the Copernicus Global Land Service (@buchhorn_copernicus_2020). +*' The rate of the policy implementation is derived based *' on the difference of scenario fader values in consecutive time steps p30_snv_relocation(t,j) = (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_snv_weight(i)) + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); *' The following lines take care of mismatches in the input -*' data (derived from satellite imagery) and cropland reduction +*' data (derived from satellite imagery from the Copernicus +*' Global Land Service (@buchhorn_copernicus_2020)) and in +*' cases of cropland reduction p30_max_snv_relocation(t,j) = p30_snv_shr(t,j) * (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * pcm_land(j,"crop"); p30_snv_relocation(t,j)$(p30_snv_relocation(t, j) > p30_max_snv_relocation(t,j)) = p30_max_snv_relocation(t,j); diff --git a/modules/30_crop/penalty_apr22/declarations.gms b/modules/30_crop/penalty_apr22/declarations.gms index 20ff5440dc..7c8bd35d8a 100644 --- a/modules/30_crop/penalty_apr22/declarations.gms +++ b/modules/30_crop/penalty_apr22/declarations.gms @@ -9,7 +9,7 @@ parameters p30_avl_cropland(t,j) Total available land for crop cultivation (mio. ha) p30_country_snv_weight(i) SNV policy country weight per region (1) p30_snv_shr(t,j) Share of semi-natural vegetation in cropland areas (1) - i30_snv_relocation_target(j) Overall cropland area that requires relocation due SNV policy (mio. ha) + i30_snv_relocation_target(j) Overall cropland area that requires relocation due to SNV policy (mio. ha) p30_snv_relocation(t,j) Cropland area that is actually relocated during time step (mio. ha) p30_max_snv_relocation(t,j) Maximum cropland relocation during time step (mio. ha) p30_country_dummy(iso) Dummy parameter indicating whether country is affected by selected cropland policy (1) diff --git a/modules/30_crop/penalty_apr22/presolve.gms b/modules/30_crop/penalty_apr22/presolve.gms index 9527048f8e..774dc7efa7 100644 --- a/modules/30_crop/penalty_apr22/presolve.gms +++ b/modules/30_crop/penalty_apr22/presolve.gms @@ -26,13 +26,16 @@ p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); *' Cropland relocation in response to SNV policy is based on exogeneous land -*' cover information. The rate of the policy implementation is derived based +*' cover information from the Copernicus Global Land Service (@buchhorn_copernicus_2020). +*' The rate of the policy implementation is derived based *' on the difference of scenario fader values in consecutive time steps p30_snv_relocation(t,j) = (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_snv_weight(i)) + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); *' The following lines take care of mismatches in the input -*' data (derived from satellite imagery) and cropland reduction +*' data (derived from satellite imagery from the Copernicus +*' Global Land Service (@buchhorn_copernicus_2020)) and in +*' cases of cropland reduction p30_max_snv_relocation(t,j) = p30_snv_shr(t,j) * (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * pcm_land(j,"crop"); p30_snv_relocation(t,j)$(p30_snv_relocation(t, j) > p30_max_snv_relocation(t,j)) = p30_max_snv_relocation(t,j); diff --git a/modules/30_crop/rotation_apr22/presolve.gms b/modules/30_crop/rotation_apr22/presolve.gms index 913d8f845e..3807e586c1 100644 --- a/modules/30_crop/rotation_apr22/presolve.gms +++ b/modules/30_crop/rotation_apr22/presolve.gms @@ -26,13 +26,15 @@ p30_snv_shr(t,j) = p30_snv_scenario_fader(t) * + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); *' Cropland relocation in response to SNV policy is based on exogeneous land -*' cover information. The rate of the policy implementation is derived based +*' cover information from the Copernicus Global Land Service (@buchhorn_copernicus_2020). +*' The rate of the policy implementation is derived based *' on the difference of scenario fader values in consecutive time steps p30_snv_relocation(t,j) = (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * (i30_snv_relocation_target(j) * sum(cell(i,j), p30_country_snv_weight(i)) + s30_snv_shr_noselect * sum(cell(i,j), 1-p30_country_snv_weight(i))); *' The following lines take care of mismatches in the input -*' data (derived from satellite imagery) and cropland reduction +*' data (derived from satellite imagery) and in +*' cases of cropland reduction p30_max_snv_relocation(t,j) = p30_snv_shr(t,j) * (p30_snv_scenario_fader(t) - p30_snv_scenario_fader(t-1)) * pcm_land(j,"crop"); p30_snv_relocation(t,j)$(p30_snv_relocation(t, j) > p30_max_snv_relocation(t,j)) = p30_max_snv_relocation(t,j); From 53d759435d1c4bca1c153fa655e30b99e9f6894f Mon Sep 17 00:00:00 2001 From: pvjeetze Date: Mon, 11 Mar 2024 12:37:30 +0100 Subject: [PATCH 20/21] main.gms revert --- main.gms | 72 ++++++++++++++++++++++++++++---------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/main.gms b/main.gms index a758d51937..bc9b0bacfc 100644 --- a/main.gms +++ b/main.gms @@ -147,56 +147,56 @@ $title magpie *' * Always try to access model outputs through the corresponding magpie package instead of accessing them directly with readGDX. It cannot be guaranteed that your script will work in the future if you do otherwise (as only the corresponding magpie package will be continuously adapted to changes in the GAMS code). *##################### R SECTION START (VERSION INFO) ########################## -* -* Used data set: rev4.99_h12_magpie.tgz -* md5sum: 0f8f6939d94629ba33d20ea3bdbe63b7 -* Repository: /p/projects/rd3mod/mirror/rse.pik-potsdam.de/data/magpie/public -* -* Used data set: rev4.99_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz -* md5sum: 669ece88a78eb1b05fd624ad32f74485 -* Repository: /p/projects/rd3mod/mirror/rse.pik-potsdam.de/data/magpie/public -* -* Used data set: rev4.99_h12_validation.tgz -* md5sum: e815fe83dc4181c3cea883592c2e5321 -* Repository: /p/projects/rd3mod/mirror/rse.pik-potsdam.de/data/magpie/public -* -* Used data set: additional_data_rev4.48.tgz -* md5sum: 0788a1d39cab12f89a9411c2636bffc7 -* Repository: /p/projects/rd3mod/mirror/rse.pik-potsdam.de/data/magpie/public -* +* +* Used data set: rev4.96_h12_magpie.tgz +* md5sum: NA +* Repository: scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output +* +* Used data set: rev4.96_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz +* md5sum: NA +* Repository: scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output +* +* Used data set: rev4.96_h12_validation.tgz +* md5sum: NA +* Repository: scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output +* +* Used data set: additional_data_rev4.47.tgz +* md5sum: NA +* Repository: scp://cluster.pik-potsdam.de/p/projects/landuse/data/input/archive +* * Used data set: calibration_H12_per_ton_fao_may22_glo_08Aug23.tgz -* md5sum: 5d34e4b54112db10f330f1e59dd60cc9 -* Repository: /p/projects/rd3mod/mirror/rse.pik-potsdam.de/data/magpie/public -* +* md5sum: NA +* Repository: https://rse.pik-potsdam.de/data/magpie/public +* * Low resolution: c200 * High resolution: 0.5 -* +* * Total number of cells: 200 -* +* * Number of cells per region: * CAZ CHA EUR IND JPN LAM MEA NEU OAS REF SSA USA -* 14 23 10 7 4 26 21 9 16 23 32 15 -* +* 5 16 8 7 2 41 30 8 11 12 39 21 +* * Regionscode: 62eff8f7 -* -* Regions data revision: 4.99 -* +* +* Regions data revision: 4.96 +* * lpj2magpie settings: * * LPJmL data: MRI-ESM2-0:ssp370 -* * Revision: 4.99 -* +* * Revision: 4.96 +* * aggregation settings: * * Input resolution: 0.5 * * Output resolution: c200 * * Regionscode: 62eff8f7 * * Number of clusters per region: * CAZ CHA EUR IND JPN LAM MEA NEU OAS REF SSA USA -* 14 23 10 7 4 26 21 9 16 23 32 15 +* 5 16 8 7 2 41 30 8 11 12 39 21 * * Call: withCallingHandlers(expr, message = messageHandler, warning = warningHandler, error = errorHandler) -* -* -* Last modification (input data): Thu Feb 29 11:13:40 2024 -* +* +* +* Last modification (input data): Fri Dec 22 16:58:47 2023 +* *###################### R SECTION END (VERSION INFO) ########################### $offupper @@ -221,7 +221,7 @@ $offlisting $setglobal c_timesteps coup2100 $setglobal c_past till_2010 -$setglobal c_title rev2_SNVTests_PR637_SNV50 +$setglobal c_title default scalars s_use_gdx use of gdx files / 0 / @@ -259,7 +259,7 @@ $setglobal natveg dynamic_feb21 $setglobal employment exo_may22 $setglobal labor_prod off -$setglobal factor_costs sticky_feb18 +$setglobal factor_costs per_ton_fao_may22 $setglobal landconversion calib $setglobal transport gtap_nov12 From e44fded5033bacedfa3eb9f09c2ff1ef45ad0ea9 Mon Sep 17 00:00:00 2001 From: pvjeetze Date: Mon, 11 Mar 2024 13:28:56 +0100 Subject: [PATCH 21/21] main.gms revert --- main.gms | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main.gms b/main.gms index bc9b0bacfc..5bd9215929 100644 --- a/main.gms +++ b/main.gms @@ -148,15 +148,15 @@ $title magpie *##################### R SECTION START (VERSION INFO) ########################## * -* Used data set: rev4.96_h12_magpie.tgz +* Used data set: rev4.99_h12_magpie.tgz * md5sum: NA * Repository: scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output * -* Used data set: rev4.96_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz +* Used data set: rev4.99_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz * md5sum: NA * Repository: scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output * -* Used data set: rev4.96_h12_validation.tgz +* Used data set: rev4.99_h12_validation.tgz * md5sum: NA * Repository: scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output * @@ -175,15 +175,15 @@ $title magpie * * Number of cells per region: * CAZ CHA EUR IND JPN LAM MEA NEU OAS REF SSA USA -* 5 16 8 7 2 41 30 8 11 12 39 21 +* 14 23 10 7 4 26 21 9 16 23 32 15 * * Regionscode: 62eff8f7 * -* Regions data revision: 4.96 +* Regions data revision: 4.99 * * lpj2magpie settings: * * LPJmL data: MRI-ESM2-0:ssp370 -* * Revision: 4.96 +* * Revision: 4.99 * * aggregation settings: * * Input resolution: 0.5 @@ -191,11 +191,11 @@ $title magpie * * Regionscode: 62eff8f7 * * Number of clusters per region: * CAZ CHA EUR IND JPN LAM MEA NEU OAS REF SSA USA -* 5 16 8 7 2 41 30 8 11 12 39 21 +* 14 23 10 7 4 26 21 9 16 23 32 15 * * Call: withCallingHandlers(expr, message = messageHandler, warning = warningHandler, error = errorHandler) * * -* Last modification (input data): Fri Dec 22 16:58:47 2023 +* Last modification (input data): Wed Feb 7 15:35:14 2024 * *###################### R SECTION END (VERSION INFO) ###########################