From 809841f25c6741734fbb8a0ff5bf3fce47c805bd Mon Sep 17 00:00:00 2001 From: florianh Date: Mon, 10 Jul 2023 15:29:32 +0200 Subject: [PATCH 01/23] linear version --- modules/14_yields/managementcalib_aug19/preloop.gms | 1 + modules/17_production/flexreg_apr16/declarations.gms | 2 +- modules/17_production/flexreg_apr16/presolve.gms | 1 + .../71_disagg_lvst/foragebased_aug18/declarations.gms | 1 + .../71_disagg_lvst/foragebased_aug18/equations.gms | 2 +- modules/71_disagg_lvst/foragebased_aug18/preloop.gms | 2 +- modules/71_disagg_lvst/foragebased_aug18/presolve.gms | 11 +++++++++++ .../71_disagg_lvst/foragebased_aug18/realization.gms | 1 + modules/71_disagg_lvst/off/not_used.txt | 1 + 9 files changed, 19 insertions(+), 3 deletions(-) create mode 100644 modules/71_disagg_lvst/foragebased_aug18/presolve.gms diff --git a/modules/14_yields/managementcalib_aug19/preloop.gms b/modules/14_yields/managementcalib_aug19/preloop.gms index b674237a64..005966b8b8 100644 --- a/modules/14_yields/managementcalib_aug19/preloop.gms +++ b/modules/14_yields/managementcalib_aug19/preloop.gms @@ -136,6 +136,7 @@ if ((s14_calib_ir2rf = 1), i14_yields_calib(t,j,knbe14,w); pm_yields_semi_calib(j,knbe14,w) = i14_yields_calib("y1995",j,knbe14,w); + pm_yields_semi_calib(j,"pasture",w) = i14_yields_calib("y1995",j,"pasture",w); ); *' @stop diff --git a/modules/17_production/flexreg_apr16/declarations.gms b/modules/17_production/flexreg_apr16/declarations.gms index 235855f322..8187fd3fa9 100644 --- a/modules/17_production/flexreg_apr16/declarations.gms +++ b/modules/17_production/flexreg_apr16/declarations.gms @@ -15,7 +15,7 @@ equations ; parameters -pm_prod_init(j,kcr) Production initialization for year 1995 (tDM per yr) +pm_prod_init(j,k) Production initialization for year 1995 (tDM per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### diff --git a/modules/17_production/flexreg_apr16/presolve.gms b/modules/17_production/flexreg_apr16/presolve.gms index 09413ece73..c28ba01644 100644 --- a/modules/17_production/flexreg_apr16/presolve.gms +++ b/modules/17_production/flexreg_apr16/presolve.gms @@ -8,6 +8,7 @@ pm_prod_init(j,kcr)=sum(w,fm_croparea("y1995",j,w,kcr)*pm_yields_semi_calib(j,kcr,w)); +pm_prod_init(j,"pasture")=sum(w,pm_land_start(j,"past")*pm_yields_semi_calib(j,"pasture",w)); if (ord(t) = 1, diff --git a/modules/71_disagg_lvst/foragebased_aug18/declarations.gms b/modules/71_disagg_lvst/foragebased_aug18/declarations.gms index 0bbcb46044..f22e4c9527 100644 --- a/modules/71_disagg_lvst/foragebased_aug18/declarations.gms +++ b/modules/71_disagg_lvst/foragebased_aug18/declarations.gms @@ -26,6 +26,7 @@ equations parameters i71_urban_area_share(j) Share of urban area within a region (1) + i71_forage_cell_prod_share(j,kforage) Cellular share of forage production within a region (1) ; scalars diff --git a/modules/71_disagg_lvst/foragebased_aug18/equations.gms b/modules/71_disagg_lvst/foragebased_aug18/equations.gms index e220bc9a52..a80b344d80 100644 --- a/modules/71_disagg_lvst/foragebased_aug18/equations.gms +++ b/modules/71_disagg_lvst/foragebased_aug18/equations.gms @@ -35,7 +35,7 @@ q71_feed_forage(j2) .. q71_feed_balanceflow_nlp(j2)$(s71_lp_fix=0) .. sum(kforage, v71_feed_balanceflow(j2,kforage)) =e= sum((ct,cell(i2,j2),kli_rum,kforage), fm_feed_balanceflow(ct,i2,kli_rum,kforage) - * (vm_prod(j2,kli_rum) / (vm_prod_reg(i2,kli_rum)))); + * i71_forage_cell_prod_share(j2,kforage)); *' @stop diff --git a/modules/71_disagg_lvst/foragebased_aug18/preloop.gms b/modules/71_disagg_lvst/foragebased_aug18/preloop.gms index b4a0510e06..2828009296 100644 --- a/modules/71_disagg_lvst/foragebased_aug18/preloop.gms +++ b/modules/71_disagg_lvst/foragebased_aug18/preloop.gms @@ -14,4 +14,4 @@ s71_scale_mon = 1.10; s71_punish_additional_mon = 15000; * Minimal regional production of `kli_rum` to avoid division by zero in `q71_feed_balanceflow_nlp`. -vm_prod_reg.lo(i,kli_rum)$(s71_lp_fix=0) = 10**(-6); +*vm_prod_reg.lo(i,kli_rum)$(s71_lp_fix=0) = 10**(-6); diff --git a/modules/71_disagg_lvst/foragebased_aug18/presolve.gms b/modules/71_disagg_lvst/foragebased_aug18/presolve.gms new file mode 100644 index 0000000000..4f4d83ccd2 --- /dev/null +++ b/modules/71_disagg_lvst/foragebased_aug18/presolve.gms @@ -0,0 +1,11 @@ +*** | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK) +*** | authors, and contributors see CITATION.cff file. This file is part +*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of +*** | AGPL-3.0, you are granted additional permissions described in the +*** | MAgPIE License Exception, version 1.0 (see LICENSE file). +*** | Contact: magpie@pik-potsdam.de + +i71_forage_cell_prod_share(j,kforage) = + pm_prod_init(j,kforage) / (sum(cell(i,j),sum(cell2(i,j3), pm_prod_init(j3,kforage))) + 10**(-6)); + +* Note that $10^{-6}$ is required to avoid division by zero. diff --git a/modules/71_disagg_lvst/foragebased_aug18/realization.gms b/modules/71_disagg_lvst/foragebased_aug18/realization.gms index dfea6fd299..78f31a691b 100644 --- a/modules/71_disagg_lvst/foragebased_aug18/realization.gms +++ b/modules/71_disagg_lvst/foragebased_aug18/realization.gms @@ -21,6 +21,7 @@ $Ifi "%phase%" == "declarations" $include "./modules/71_disagg_lvst/foragebased_ $Ifi "%phase%" == "equations" $include "./modules/71_disagg_lvst/foragebased_aug18/equations.gms" $Ifi "%phase%" == "scaling" $include "./modules/71_disagg_lvst/foragebased_aug18/scaling.gms" $Ifi "%phase%" == "preloop" $include "./modules/71_disagg_lvst/foragebased_aug18/preloop.gms" +$Ifi "%phase%" == "presolve" $include "./modules/71_disagg_lvst/foragebased_aug18/presolve.gms" $Ifi "%phase%" == "postsolve" $include "./modules/71_disagg_lvst/foragebased_aug18/postsolve.gms" $Ifi "%phase%" == "nl_fix" $include "./modules/71_disagg_lvst/foragebased_aug18/nl_fix.gms" $Ifi "%phase%" == "nl_release" $include "./modules/71_disagg_lvst/foragebased_aug18/nl_release.gms" diff --git a/modules/71_disagg_lvst/off/not_used.txt b/modules/71_disagg_lvst/off/not_used.txt index 79577f6d78..d45fbf352a 100644 --- a/modules/71_disagg_lvst/off/not_used.txt +++ b/modules/71_disagg_lvst/off/not_used.txt @@ -5,3 +5,4 @@ vm_prod,input,questionnaire vm_prod_reg,input,questionnaire pm_land_start,input,questionnaire pcm_land,input,questionnaire +pm_prod_init,input,questionnaire From 5a5a4a9a1d801e8a17620c410eb698bcdf2ad560 Mon Sep 17 00:00:00 2001 From: florianh Date: Mon, 10 Jul 2023 17:28:39 +0200 Subject: [PATCH 02/23] linear version --- .../17_production/flexreg_apr16/presolve.gms | 3 +- .../foragebased_aug18/declarations.gms | 22 ++--- .../foragebased_aug18/equations.gms | 3 +- .../foragebased_aug18/postsolve.gms | 84 ++++++++++--------- .../foragebased_aug18/presolve.gms | 3 +- modules/71_disagg_lvst/off/not_used.txt | 1 - 6 files changed, 62 insertions(+), 54 deletions(-) diff --git a/modules/17_production/flexreg_apr16/presolve.gms b/modules/17_production/flexreg_apr16/presolve.gms index c28ba01644..c0def1bbc7 100644 --- a/modules/17_production/flexreg_apr16/presolve.gms +++ b/modules/17_production/flexreg_apr16/presolve.gms @@ -13,7 +13,8 @@ pm_prod_init(j,"pasture")=sum(w,pm_land_start(j,"past")*pm_yields_semi_calib(j," if (ord(t) = 1, $ifthen "%c17_prod_init%" == "on" -vm_prod.l(j,kcr) = pm_prod_init(j,kcr); +vm_prod.l(j,kve) = pm_prod_init(j,kve); +vm_prod_reg.l(i,kve) = sum(cell(i,j), pm_prod_init(j,kve)); $endif ); diff --git a/modules/71_disagg_lvst/foragebased_aug18/declarations.gms b/modules/71_disagg_lvst/foragebased_aug18/declarations.gms index f22e4c9527..03a35e7a2e 100644 --- a/modules/71_disagg_lvst/foragebased_aug18/declarations.gms +++ b/modules/71_disagg_lvst/foragebased_aug18/declarations.gms @@ -9,6 +9,7 @@ positive variables v71_feed_forage(j,kforage) Production of forage within a cell (mio. tDM per yr) v71_additional_mon(j, kli_mon) Additional punished production of monogastric livestock (mio. tDM per yr) vm_costs_additional_mon(i) Punishment cost for additionally transported monogastric livst_egg (mio. USD05MER per yr) + v71_additional_feed_balanceflow(j,kforage) Additional punished production of ruminant feed (mio. tDM per yr) ; variables @@ -37,15 +38,16 @@ scalars *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov71_feed_forage(t,j,kforage,type) Production of forage within a cell (mio. tDM per yr) - ov71_additional_mon(t,j,kli_mon,type) Additional punished production of monogastric livestock (mio. tDM per yr) - ov_costs_additional_mon(t,i,type) Punishment cost for additionally transported monogastric livst_egg (mio. USD05MER per yr) - ov71_feed_balanceflow(t,j,kforage,type) Cellular feed balanceflow for forage feed for ruminant livestock (mio. tDM per yr) - oq71_feed_rum_liv(t,j,kforage,type) Production constraint for ruminant livestock products (mio. tDM per yr) - oq71_feed_forage(t,j,type) Forage feed constraint (mio. tDM per yr) - oq71_feed_balanceflow_nlp(t,j,type) Non-linear balanceflow constraint for forage feed products (mio. tDM per yr) - oq71_feed_balanceflow_lp(t,i,type) Linear balanceflow constraint for forage feed products (mio. tDM per yr) - oq71_prod_mon_liv(t,j,kli_mon,type) Production constraint for monogastric livestock products (mio. tDM per yr) - oq71_punishment_mon(t,i,type) Punishment for additional monogastrics (mio. USD05MER per yr) + ov71_feed_forage(t,j,kforage,type) Production of forage within a cell (mio. tDM per yr) + ov71_additional_mon(t,j,kli_mon,type) Additional punished production of monogastric livestock (mio. tDM per yr) + ov_costs_additional_mon(t,i,type) Punishment cost for additionally transported monogastric livst_egg (mio. USD05MER per yr) + ov71_additional_feed_balanceflow(t,j,kforage,type) Additional punished production of ruminant feed (mio. tDM per yr) + ov71_feed_balanceflow(t,j,kforage,type) Cellular feed balanceflow for forage feed for ruminant livestock (mio. tDM per yr) + oq71_feed_rum_liv(t,j,kforage,type) Production constraint for ruminant livestock products (mio. tDM per yr) + oq71_feed_forage(t,j,type) Forage feed constraint (mio. tDM per yr) + oq71_feed_balanceflow_nlp(t,j,type) Non-linear balanceflow constraint for forage feed products (mio. tDM per yr) + oq71_feed_balanceflow_lp(t,i,type) Linear balanceflow constraint for forage feed products (mio. tDM per yr) + oq71_prod_mon_liv(t,j,kli_mon,type) Production constraint for monogastric livestock products (mio. tDM per yr) + oq71_punishment_mon(t,i,type) Punishment for additional monogastrics (mio. USD05MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/71_disagg_lvst/foragebased_aug18/equations.gms b/modules/71_disagg_lvst/foragebased_aug18/equations.gms index a80b344d80..ab113dd651 100644 --- a/modules/71_disagg_lvst/foragebased_aug18/equations.gms +++ b/modules/71_disagg_lvst/foragebased_aug18/equations.gms @@ -33,7 +33,7 @@ q71_feed_forage(j2) .. *' In each cluster the balance flow is constrained by its share of livestock production regarding the regional level by q71_feed_balanceflow_nlp(j2)$(s71_lp_fix=0) .. - sum(kforage, v71_feed_balanceflow(j2,kforage)) =e= + sum(kforage, v71_feed_balanceflow(j2,kforage) + v71_additional_feed_balanceflow(j2,kforage)) =e= sum((ct,cell(i2,j2),kli_rum,kforage), fm_feed_balanceflow(ct,i2,kli_rum,kforage) * i71_forage_cell_prod_share(j2,kforage)); @@ -68,6 +68,7 @@ q71_prod_mon_liv(j2,kli_mon) .. q71_punishment_mon(i2) .. vm_costs_additional_mon(i2) =e= sum((cell(i2,j2),kli_mon), v71_additional_mon(j2,kli_mon)) * s71_punish_additional_mon + + sum((cell(i2,j2),kforage), v71_additional_feed_balanceflow(j2,kforage)) * s71_punish_additional_mon ; *' Note that the punishment costs are based on transport costs and scaled up by one order of magnitude diff --git a/modules/71_disagg_lvst/foragebased_aug18/postsolve.gms b/modules/71_disagg_lvst/foragebased_aug18/postsolve.gms index 959882e6e9..3811083888 100644 --- a/modules/71_disagg_lvst/foragebased_aug18/postsolve.gms +++ b/modules/71_disagg_lvst/foragebased_aug18/postsolve.gms @@ -6,44 +6,48 @@ *** | Contact: magpie@pik-potsdam.de *#################### R SECTION START (OUTPUT DEFINITIONS) ##################### - ov71_feed_forage(t,j,kforage,"marginal") = v71_feed_forage.m(j,kforage); - ov71_additional_mon(t,j,kli_mon,"marginal") = v71_additional_mon.m(j,kli_mon); - ov_costs_additional_mon(t,i,"marginal") = vm_costs_additional_mon.m(i); - ov71_feed_balanceflow(t,j,kforage,"marginal") = v71_feed_balanceflow.m(j,kforage); - oq71_feed_rum_liv(t,j,kforage,"marginal") = q71_feed_rum_liv.m(j,kforage); - oq71_feed_forage(t,j,"marginal") = q71_feed_forage.m(j); - oq71_feed_balanceflow_nlp(t,j,"marginal") = q71_feed_balanceflow_nlp.m(j); - oq71_feed_balanceflow_lp(t,i,"marginal") = q71_feed_balanceflow_lp.m(i); - oq71_prod_mon_liv(t,j,kli_mon,"marginal") = q71_prod_mon_liv.m(j,kli_mon); - oq71_punishment_mon(t,i,"marginal") = q71_punishment_mon.m(i); - ov71_feed_forage(t,j,kforage,"level") = v71_feed_forage.l(j,kforage); - ov71_additional_mon(t,j,kli_mon,"level") = v71_additional_mon.l(j,kli_mon); - ov_costs_additional_mon(t,i,"level") = vm_costs_additional_mon.l(i); - ov71_feed_balanceflow(t,j,kforage,"level") = v71_feed_balanceflow.l(j,kforage); - oq71_feed_rum_liv(t,j,kforage,"level") = q71_feed_rum_liv.l(j,kforage); - oq71_feed_forage(t,j,"level") = q71_feed_forage.l(j); - oq71_feed_balanceflow_nlp(t,j,"level") = q71_feed_balanceflow_nlp.l(j); - oq71_feed_balanceflow_lp(t,i,"level") = q71_feed_balanceflow_lp.l(i); - oq71_prod_mon_liv(t,j,kli_mon,"level") = q71_prod_mon_liv.l(j,kli_mon); - oq71_punishment_mon(t,i,"level") = q71_punishment_mon.l(i); - ov71_feed_forage(t,j,kforage,"upper") = v71_feed_forage.up(j,kforage); - ov71_additional_mon(t,j,kli_mon,"upper") = v71_additional_mon.up(j,kli_mon); - ov_costs_additional_mon(t,i,"upper") = vm_costs_additional_mon.up(i); - ov71_feed_balanceflow(t,j,kforage,"upper") = v71_feed_balanceflow.up(j,kforage); - oq71_feed_rum_liv(t,j,kforage,"upper") = q71_feed_rum_liv.up(j,kforage); - oq71_feed_forage(t,j,"upper") = q71_feed_forage.up(j); - oq71_feed_balanceflow_nlp(t,j,"upper") = q71_feed_balanceflow_nlp.up(j); - oq71_feed_balanceflow_lp(t,i,"upper") = q71_feed_balanceflow_lp.up(i); - oq71_prod_mon_liv(t,j,kli_mon,"upper") = q71_prod_mon_liv.up(j,kli_mon); - oq71_punishment_mon(t,i,"upper") = q71_punishment_mon.up(i); - ov71_feed_forage(t,j,kforage,"lower") = v71_feed_forage.lo(j,kforage); - ov71_additional_mon(t,j,kli_mon,"lower") = v71_additional_mon.lo(j,kli_mon); - ov_costs_additional_mon(t,i,"lower") = vm_costs_additional_mon.lo(i); - ov71_feed_balanceflow(t,j,kforage,"lower") = v71_feed_balanceflow.lo(j,kforage); - oq71_feed_rum_liv(t,j,kforage,"lower") = q71_feed_rum_liv.lo(j,kforage); - oq71_feed_forage(t,j,"lower") = q71_feed_forage.lo(j); - oq71_feed_balanceflow_nlp(t,j,"lower") = q71_feed_balanceflow_nlp.lo(j); - oq71_feed_balanceflow_lp(t,i,"lower") = q71_feed_balanceflow_lp.lo(i); - oq71_prod_mon_liv(t,j,kli_mon,"lower") = q71_prod_mon_liv.lo(j,kli_mon); - oq71_punishment_mon(t,i,"lower") = q71_punishment_mon.lo(i); + ov71_feed_forage(t,j,kforage,"marginal") = v71_feed_forage.m(j,kforage); + ov71_additional_mon(t,j,kli_mon,"marginal") = v71_additional_mon.m(j,kli_mon); + ov_costs_additional_mon(t,i,"marginal") = vm_costs_additional_mon.m(i); + ov71_additional_feed_balanceflow(t,j,kforage,"marginal") = v71_additional_feed_balanceflow.m(j,kforage); + ov71_feed_balanceflow(t,j,kforage,"marginal") = v71_feed_balanceflow.m(j,kforage); + oq71_feed_rum_liv(t,j,kforage,"marginal") = q71_feed_rum_liv.m(j,kforage); + oq71_feed_forage(t,j,"marginal") = q71_feed_forage.m(j); + oq71_feed_balanceflow_nlp(t,j,"marginal") = q71_feed_balanceflow_nlp.m(j); + oq71_feed_balanceflow_lp(t,i,"marginal") = q71_feed_balanceflow_lp.m(i); + oq71_prod_mon_liv(t,j,kli_mon,"marginal") = q71_prod_mon_liv.m(j,kli_mon); + oq71_punishment_mon(t,i,"marginal") = q71_punishment_mon.m(i); + ov71_feed_forage(t,j,kforage,"level") = v71_feed_forage.l(j,kforage); + ov71_additional_mon(t,j,kli_mon,"level") = v71_additional_mon.l(j,kli_mon); + ov_costs_additional_mon(t,i,"level") = vm_costs_additional_mon.l(i); + ov71_additional_feed_balanceflow(t,j,kforage,"level") = v71_additional_feed_balanceflow.l(j,kforage); + ov71_feed_balanceflow(t,j,kforage,"level") = v71_feed_balanceflow.l(j,kforage); + oq71_feed_rum_liv(t,j,kforage,"level") = q71_feed_rum_liv.l(j,kforage); + oq71_feed_forage(t,j,"level") = q71_feed_forage.l(j); + oq71_feed_balanceflow_nlp(t,j,"level") = q71_feed_balanceflow_nlp.l(j); + oq71_feed_balanceflow_lp(t,i,"level") = q71_feed_balanceflow_lp.l(i); + oq71_prod_mon_liv(t,j,kli_mon,"level") = q71_prod_mon_liv.l(j,kli_mon); + oq71_punishment_mon(t,i,"level") = q71_punishment_mon.l(i); + ov71_feed_forage(t,j,kforage,"upper") = v71_feed_forage.up(j,kforage); + ov71_additional_mon(t,j,kli_mon,"upper") = v71_additional_mon.up(j,kli_mon); + ov_costs_additional_mon(t,i,"upper") = vm_costs_additional_mon.up(i); + ov71_additional_feed_balanceflow(t,j,kforage,"upper") = v71_additional_feed_balanceflow.up(j,kforage); + ov71_feed_balanceflow(t,j,kforage,"upper") = v71_feed_balanceflow.up(j,kforage); + oq71_feed_rum_liv(t,j,kforage,"upper") = q71_feed_rum_liv.up(j,kforage); + oq71_feed_forage(t,j,"upper") = q71_feed_forage.up(j); + oq71_feed_balanceflow_nlp(t,j,"upper") = q71_feed_balanceflow_nlp.up(j); + oq71_feed_balanceflow_lp(t,i,"upper") = q71_feed_balanceflow_lp.up(i); + oq71_prod_mon_liv(t,j,kli_mon,"upper") = q71_prod_mon_liv.up(j,kli_mon); + oq71_punishment_mon(t,i,"upper") = q71_punishment_mon.up(i); + ov71_feed_forage(t,j,kforage,"lower") = v71_feed_forage.lo(j,kforage); + ov71_additional_mon(t,j,kli_mon,"lower") = v71_additional_mon.lo(j,kli_mon); + ov_costs_additional_mon(t,i,"lower") = vm_costs_additional_mon.lo(i); + ov71_additional_feed_balanceflow(t,j,kforage,"lower") = v71_additional_feed_balanceflow.lo(j,kforage); + ov71_feed_balanceflow(t,j,kforage,"lower") = v71_feed_balanceflow.lo(j,kforage); + oq71_feed_rum_liv(t,j,kforage,"lower") = q71_feed_rum_liv.lo(j,kforage); + oq71_feed_forage(t,j,"lower") = q71_feed_forage.lo(j); + oq71_feed_balanceflow_nlp(t,j,"lower") = q71_feed_balanceflow_nlp.lo(j); + oq71_feed_balanceflow_lp(t,i,"lower") = q71_feed_balanceflow_lp.lo(i); + oq71_prod_mon_liv(t,j,kli_mon,"lower") = q71_prod_mon_liv.lo(j,kli_mon); + oq71_punishment_mon(t,i,"lower") = q71_punishment_mon.lo(i); *##################### R SECTION END (OUTPUT DEFINITIONS) ###################### diff --git a/modules/71_disagg_lvst/foragebased_aug18/presolve.gms b/modules/71_disagg_lvst/foragebased_aug18/presolve.gms index 4f4d83ccd2..70d4ee4a61 100644 --- a/modules/71_disagg_lvst/foragebased_aug18/presolve.gms +++ b/modules/71_disagg_lvst/foragebased_aug18/presolve.gms @@ -6,6 +6,7 @@ *** | Contact: magpie@pik-potsdam.de i71_forage_cell_prod_share(j,kforage) = - pm_prod_init(j,kforage) / (sum(cell(i,j),sum(cell2(i,j3), pm_prod_init(j3,kforage))) + 10**(-6)); +* vm_prod.l(j,kforage) / (sum(cell(i,j),sum(cell2(i,j3), vm_prod.l(j3,kforage))) + 10**(-6)); + vm_prod.l(j,kforage) / (sum(cell(i,j), vm_prod_reg.l(i,kforage)) + 10**(-6)); * Note that $10^{-6}$ is required to avoid division by zero. diff --git a/modules/71_disagg_lvst/off/not_used.txt b/modules/71_disagg_lvst/off/not_used.txt index d45fbf352a..79577f6d78 100644 --- a/modules/71_disagg_lvst/off/not_used.txt +++ b/modules/71_disagg_lvst/off/not_used.txt @@ -5,4 +5,3 @@ vm_prod,input,questionnaire vm_prod_reg,input,questionnaire pm_land_start,input,questionnaire pcm_land,input,questionnaire -pm_prod_init,input,questionnaire From 39b9097d66f22302ad5ea17082e7810eacbe1c71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20F=C3=BChrlich?= Date: Thu, 27 Jul 2023 17:03:10 +0200 Subject: [PATCH 03/23] merge master into develop --- .zenodo.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ CITATION.cff | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index 254e507cce..d04a6a0a64 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "MAgPIE - An Open Source land-use modeling framework", - "version": "4.6.9", + "version": "4.6.9dev", "creators": [ { "name": "Dietrich, Jan Philipp", diff --git a/CHANGELOG.md b/CHANGELOG.md index 1550497d58..4523f72d5d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [Unreleased] + +### changed +- + +### added +- + +### removed +- + +### fixed +- + + ## [4.6.9] - 2023-07-27 ### fixed diff --git a/CITATION.cff b/CITATION.cff index 843aea845c..8a4be0b247 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -125,7 +125,7 @@ authors: email: popp@pik-potsdam.de title: MAgPIE - An Open Source land-use modeling framework -version: 4.6.9 +version: 4.6.9dev date-released: 2023-07-27 repository-code: https://github.com/magpiemodel/magpie keywords: From be5771d547250f92cc7e06844072a4b2f8b3f0fb Mon Sep 17 00:00:00 2001 From: orichters Date: Wed, 2 Aug 2023 11:26:08 +0200 Subject: [PATCH 04/23] remove check_config warning about c_input_gdx_path for empty model --- CHANGELOG.md | 2 +- scripts/start_functions.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4523f72d5d..66e2501a97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - ### fixed -- +- **scripts** check_config does not warn about c_input_gdx_path anymore while running empty model ## [4.6.9] - 2023-07-27 diff --git a/scripts/start_functions.R b/scripts/start_functions.R index 25de9122b7..55bda9ae88 100644 --- a/scripts/start_functions.R +++ b/scripts/start_functions.R @@ -244,7 +244,7 @@ start_run <- function(cfg, scenario = NULL, codeCheck = TRUE, lock_model = TRUE) # Apply scenario settings ans check configuration file for consistency if(!is.null(scenario)) cfg <- gms::setScenario(cfg,scenario) - cfg <- gms::check_config(cfg, extras = c("info", "repositories"), saveCheck = TRUE) + cfg <- gms::check_config(cfg, extras = c("info", "repositories", "gms$c_input_gdx_path"), saveCheck = TRUE) # save model version cfg$info$version <- citation::read_cff("CITATION.cff")$version From 73eee2d9b14eead2cd8b07c28dc1313d10b60807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20F=C3=BChrlich?= Date: Tue, 8 Aug 2023 12:56:04 +0200 Subject: [PATCH 05/23] faster runfolder scan --- output.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/output.R b/output.R index a3c9395412..24eec3ca94 100644 --- a/output.R +++ b/output.R @@ -35,7 +35,7 @@ library(gms) runOutputs <- function(comp=NULL, output=NULL, outputdir=NULL, submit=NULL) { choose_folder <- function(title="Please choose a folder") { # try to use find because it is significantly quicker than list.dirs - tmp <- try(system("find ./output -name 'full.gms'", intern=TRUE, ignore.stderr = TRUE), silent=TRUE) + tmp <- try(system("find ./output -path './output/*/renv' -prune -o -name 'full.gms'", intern=TRUE, ignore.stderr = TRUE), silent=TRUE) if("try-error" %in% class(tmp) || length(tmp)==0) { tmp <- base::list.dirs("./output/",recursive=TRUE) dirs <- NULL @@ -43,6 +43,7 @@ runOutputs <- function(comp=NULL, output=NULL, outputdir=NULL, submit=NULL) { if (file.exists(file.path(tmp[i],"full.gms"))) dirs <- c(dirs,sub("./output/","",tmp[i])) } } else { + tmp <- grep("/full.gms$", tmp, value = TRUE) dirs <- sub("full.gms","",sub("./output/","",tmp, fixed=TRUE), fixed=TRUE) } dirs <- sort(dirs) From f70b1cd83937480583bee18f48e525d86f3bb05d Mon Sep 17 00:00:00 2001 From: caviddhen Date: Wed, 9 Aug 2023 16:59:54 +0200 Subject: [PATCH 06/23] update input data --- CHANGELOG.md | 4 +- config/default.cfg | 10 +-- config/scenario_config.csv | 172 ++++++++++++++++++------------------- 3 files changed, 94 insertions(+), 92 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4523f72d5d..93ca1b2efd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ### changed -- +- **config** update preprocessing to newest input data v4.88 with new transport costs +- **scenario_config.csv** update preprocessing to newest input data v4.88 + ### added - diff --git a/config/default.cfg b/config/default.cfg index f796720c61..3d0ab80977 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -22,11 +22,11 @@ cfg$model <- "main.gms" #def = "main.gms" #### input settings #### # which input data sets should be used? -cfg$input <- c(regional = "rev4.87_h12_magpie.tgz", - cellular = "rev4.87_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz", - validation = "rev4.87_h12_validation.tgz", +cfg$input <- c(regional = "rev4.88_h12_magpie.tgz", + cellular = "rev4.88_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz", + validation = "rev4.88_h12_validation.tgz", additional = "additional_data_rev4.43.tgz", - calibration = "calibration_H12_per_ton_fao_may22_glo_14Jul23.tgz") + calibration = "calibration_H12_per_ton_fao_may22_glo_08Aug23.tgz") # NOTE: It is recommended to recalibrate the model when changing cellular input data # as well as for any other setting that would affect initial values in the model, @@ -95,7 +95,7 @@ cfg$restart_landconversion_cost <- FALSE # def = FALSE # calibration factor in each calibration iteration (0-1) cfg$damping_factor_landconversion_cost <- 0.96 # def= 0.96 # Set upper limit for cropland calibration factor -cfg$cost_calib_max_landconversion_cost <- 3 # def= 3 +cfg$cost_calib_max_landconversion_cost <- 3 # def= 3 # Set lower limit for cropland calibration factor cfg$cost_calib_min_landconversion_cost <- 0.05 # def= 0.05 # Selection type of calibration factors. diff --git a/config/scenario_config.csv b/config/scenario_config.csv index c1a5b1695b..47a89897eb 100644 --- a/config/scenario_config.csv +++ b/config/scenario_config.csv @@ -1,86 +1,86 @@ -;cc;nocc;nocc_hist;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SDP;SDP-EI;SDP-RC;SDP-MC;BASE;NPI;NDC;coupling;emulator;input;Tland;eat_lancet_diet;LAMA_Inequal;LAMA_Inequal-SustDemand;LAMA_Inequal-EnvirProt;LAMA_Inequal-GHGPrice;LAMA_Sustainability;NAVIGATE_AllOff;NAVIGATE_LandSup;NAVIGATE_LandDem;NAVIGATE_AllOn;ForestryEndo;ForestryExo;ForestryOff;frst_shock_none;frst_shock_002lin2030;frst_shock_004lin2030;frst_shock_008lin2030;frst_shock_016lin2030;rcp1p9;rcp2p6;rcp4p5;rcp6p0;rcp7p0;rcp8p5;NGFS_o_lowdem -gms$c09_pop_scenario;;;;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SSP1;SSP1;SSP1;SSP1;;;;;;;;;SSP4;SSP1;SSP4;SSP4;SSP1;;;;;;;;;;;;;;;;;;; -gms$c09_gdp_scenario;;;;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SSP1;SDP_EI;SDP_RC;SDP_MC;;;;;;;;;SSP4;SSP1;SSP4;SSP4;SSP1;;;;;;;;;;;;;;;;;;; -gms$c09_pal_scenario;;;;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SSP1;SSP2;SSP1;SSP1;;;;;;;;;SSP4;SSP1;SSP4;SSP4;SSP1;;;;;;;;;;;;;;;;;;; -gms$c15_food_scenario;;;;SSP1;SSP2;SSP2;SSP3;SSP4;SSP5;SSP1;SSP2;SSP1;SSP1;;;;;;;;;SSP4;SSP1;SSP4;SSP4;SSP1;;;;;;;;;;;;;;;;;;;SSP2 -gms$c15_food_scenario_noselect;;;;;;;;;;;;;;;;;;;;;;SSP4;SSP1;SSP4;SSP4;SSP1;;;;;;;;;;;;;;;;;;;SSP2 -gms$s15_elastic_demand;;;;0;0;0;0;0;0;0;0;0;0;;;;;;;0;0;0;0;0;0;0;;;;;;;;;;;;;;;;;;; -gms$c15_rumdairy_scp_scen;;;;constant;constant;constant;constant;constant;constant;constant;sigmoid_50pc_20_50;constant;constant;;;;;;;constant;;;;;;;;;;;;;;;;;;;;;;;;; -gms$kfo_rd;;;;;;;;;;;livst_rum;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -gms$c15_exo_foodscen;;;;;;;;;;lin_zero_20_50;lin_zero_20_50;lin_zero_20_50;lin_zero_20_70;;;;;;;lin_zero_20_50;lin_zero_20_50;;lin_zero_20_50;;;lin_zero_20_50;;;;;;;;;;;;;;;;;;;lin_zero_20_50 -gms$s15_exo_waste;;;;0;0;0;0;0;0;1;1;1;1;;;;;;;1;0;0;1;0;0;1;0;0;1;1;;;;;;;;;;;;;;;1 -gms$s15_waste_scen;;;;;;;;;;1.2;1.3;1.2;1.25;;;;;;;1.2;1.2;;1.2;;;1.2;;;;;;;;;;;;;;;;;;;1.2 -gms$s15_exo_diet;;;;0;0;0;0;0;0;1;1;1;1;;;;;;;1;1;0;1;0;0;1;0;0;1;1;;;;;;;;;;;;;;;1 -gms$c15_kcal_scen;;;;;;;;;;healthy_BMI;no_underweight;healthy_BMI;healthy_BMI;;;;;;;healthy_BMI;healthy_BMI;;healthy_BMI;;;healthy_BMI;;;;;;;;;;;;;;;;;;;healthy_BMI -gms$c15_EAT_scen;;;;;;;;;;FLX;;FLX;FLX;;;;;;;FLX;FLX;;FLX;;;FLX;;;;;;;;;;;;;;;;;;; -gms$s15_exo_monogastric;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; -gms$s15_exo_ruminant;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; -gms$s15_exo_fish;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; -gms$s15_exo_fruitvegnut;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; -gms$s15_exo_pulses;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; -gms$s15_exo_sugar;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; -gms$s15_exo_oils;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; -gms$s15_exo_brans;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; -gms$s15_exo_scp;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; -gms$s15_exo_alcohol;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; -gms$c21_trade_liberalization;;;;l908080r807070;l909090r808080;l909090r808080;l909595r809090;l908080r807070;l908080r807070;l908080r807070;l908080r807070;l909595r809090;l908080r807070;;;;;;;;;l908080r807070;l908080r807070;l908080r807070;l908080r807070;l908080r807070;;;;;;;;;;;;;;;;;;; -gms$c22_protect_scenario;;;;none;none;none;none;none;none;BH;none;BH_IFL;BH;;;;;;;BH;;BH_IFL;BH_IFL;BH_IFL;BH_IFL;BH_IFL;;;;;;;;;;;;;;;;;;; -gms$c22_protect_scenario_noselect;;;;;;;;;;;;;;;;;;;;;;none;none;BH_IFL;none;BH_IFL;;;;;;;;;;;;;;;;;;; -gms$c30_bioen_water;;;;rainfed;rainfed;rainfed;rainfed;rainfed;rainfed;rainfed;all;rainfed;rainfed;;;;;;;rainfed;;;;;;;;;;;;;;;;;;;;;;;;; -gms$s30_snv_shr;;;;0;0;0;0;0;0;0;0;0;0.2;;;;;;;0;;0.2;0.2;0.2;0.2;0.2;;;;;;;;;;;;;;;;;;; -gms$s30_snv_shr_noselect;;;;;;;;;;;;;;;;;;;;;;0;0;0.2;0;0.2;;;;;;;;;;;;;;;;;;; -gms$s30_snv_scenario_target;;;;;;;;;;;;;2030;;;;;;;;;2030;2030;2030;2030;2030;;;;;;;;;;;;;;;;;;; -gms$c31_past_suit_scen;;nocc;nocc_hist;ssp126;ssp245;ssp245;ssp370;ssp460;ssp585;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ssp126;ssp126;ssp245;ssp460;ssp370;ssp585; -gms$c31_grassl_yld_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -gms$s32_aff_plantation;;;;0;0;0;0;0;0;0;1;0;0;;;;;;;0;;;;;;;;;;;;;;;;;;;;;;;;; -gms$s32_aff_bii_coeff;;;;0;0;0;0;0;0;0;1;0;0;;;;;;;0;;;;;;;;;;;;;;;;;;;;;;;;; -gms$s32_max_aff_area;;;;Inf;Inf;Inf;Inf;Inf;Inf;500;350;0;700;;;;;;;500;;Inf;Inf;Inf;500;500;;;;;;;;;;;;;;;;;;; -gms$c32_aff_mask;;;;noboreal;noboreal;noboreal;noboreal;noboreal;noboreal;onlytropical;onlytropical;onlytropical;onlytropical;;;;;;;onlytropical;;noboreal;noboreal;noboreal;noboreal;noboreal;;;;;;;;;;;;;;;;;;; -gms$c34_urban_scenario;;;;SSP1;SSP2;SSP2;SSP3;SSP4;SSP5;SSP1;SSP1;SSP2;SSP1;;;;;;;;;SSP4;SSP1;SSP4;SSP4;SSP1;;;;;;;;;;;;;;;;;;; -gms$c32_aff_policy;;;;;;;;;;;;;;none;npi;ndc;;;;;;ndc;ndc;ndc;ndc;ndc;;;;;;;;;;;;;;;;;;; -gms$s32_planing_horizon;;;;50;50;50;50;50;50;50;30;50;50;;;;;;;50;;;;;;;;;;;;;;;;;;;;;;;;; -gms$c35_ad_policy;;;;;;;;;;;;;;none;npi;ndc;;;;;;ndc;ndc;ndc;ndc;ndc;;;;;;;;;;;;;;;;;;; -gms$c35_aolc_policy;;;;;;;;;;;;;;none;npi;ndc;;;;;;ndc;ndc;ndc;ndc;ndc;;;;;;;;;;;;;;;;;;; -gms$s35_forest_damage_end;;;;2030;2050;2050;2050;2050;2030;2030;2030;2030;2030;;;;;;;2030;;2030;2030;2030;2030;2030;;;;;;;;;;;;;;;;;;; -gms$s42_watdem_nonagr_scenario;;;;1;2;2;3;2;1;1;1;3;1;;;;;;;;;2;1;2;2;1;;;;;;;;;;;;;;;;;;; -gms$s42_irrig_eff_scenario;;;;2;2;2;2;2;2;3;3;3;3;;;;;;;3;;3;3;3;3;3;;;;;;;;;;;;;;;;;;; -gms$c42_env_flow_policy;;;;on;off;off;off;mixed;on;on;on;on;on;;;;;;;on;;on;on;on;on;on;;;;;;;;;;;;;;;;;;; -gms$s42_efp_targetyear;;;;2040;2040;2040;2040;2040;2040;2040;2050;2070;2050;;;;;;;2040;;2040;2040;2040;2040;2040;;;;;;;;;;;;;;;;;;; -gms$s44_target_price;;;;0;0;0;0;0;0;0;0;0;0;;;;;;;0;;;;;;;;;;;;;;;;;;;;;;;;; -gms$c50_scen_neff;;;;baseeff_add3_add10_add20_max75;baseeff_add3_add5_add10_max65;baseeff_add3_add5_add10_max65;baseeff_add3_add0_add0_max55;baseeff_add3_add10_add15_max75;baseeff_add3_add5_add15_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max65;baseeff_add3_add15_add25_max75;;;;;;;baseeff_add3_add15_add25_max75;;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;;;;;;;;;;;;;;;;;;; -gms$c50_scen_neff_noselect;;;;baseeff_add3_add10_add20_max75;baseeff_add3_add5_add10_max65;baseeff_add3_add5_add10_max65;baseeff_add3_add0_add0_max55;baseeff_add3_add10_add15_max75;baseeff_add3_add5_add15_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max65;baseeff_add3_add15_add25_max75;;;;;;;baseeff_add3_add15_add25_max75;;baseeff_add3_add10_add15_max75;baseeff_add3_add10_add15_max75;baseeff_add3_add10_add15_max75;baseeff_add3_add10_add15_max75;baseeff_add3_add10_add15_max75;;;;;;;;;;;;;;;;;;; -gms$c55_scen_conf;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;ssp1;ssp1;ssp1;ssp1;;;;;;;ssp1;;ssp1;ssp1;ssp1;ssp1;ssp1;;;;;;;;;;;;;;;;;;; -gms$c55_scen_conf_noselect;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;ssp1;ssp1;ssp1;ssp1;;;;;;;ssp1;;ssp4;ssp4;ssp1;ssp4;ssp1;;;;;;;;;;;;;;;;;;; -gms$c56_pollutant_prices;;;;;;;;;;;;;;;;;coupling;emulator;coupling;;;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;;;;;;;;;;;;;;;;;;; -gms$c56_pollutant_prices_noselect;;;;;;;;;;;;;;;;;coupling;emulator;coupling;;;R21M42-SDP-NPi;R21M42-SDP-NPi;R21M42-SDP-NPi;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;;;;;;;;;;;;;;;;;;; -gms$s56_c_price_exp_aff;;;;50;50;50;50;50;50;50;30;50;50;;;;;;;50;;;;;;;;;;;;;;;;;;;;;;;;; -gms$s56_buffer_aff;;;;0.2;0.2;0.2;0.2;0.2;0.2;0.2;0.5;0.2;0.3;;;;;;;0.2;;;;;;;;;;;;;;;;;;;;;;;;; -gms$c56_emis_policy;;;;redd+natveg_nosoil;redd+natveg_nosoil;redd+natveg_nosoil;redd+natveg_nosoil;redd+natveg_nosoil;redd+natveg_nosoil;redd+natveg_nosoil;redd+natveg_nosoil;redd+_nosoil;all_nosoil;;;;;;;redd+natveg_nosoil;;;;;;;;;;;;;;;;;;;;;;;;; -gms$s56_minimum_cprice;;;;;;;;;;;;;;0;0;18;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -gms$maccs;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -gms$c60_2ndgen_biodem;;;;;;;;;;;;;;;;;coupling;emulator;coupling;;;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;;;;;;;;;;;;;;;;;;; -gms$c60_2ndgen_biodem_noselect;;;;;;;;;;;;;;;;;coupling;emulator;coupling;;;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;;;;;;;;;;;;;;;;;;; -gms$c60_1stgen_biodem;;;;phaseout2020;const2020;const2020;const2030;const2020;phaseout2020;phaseout2020;phaseout2020;phaseout2020;phaseout2020;;;;;;;phaseout2020;;phaseout2020;phaseout2020;phaseout2020;phaseout2020;phaseout2020;;;;;;;;;;;;;;;;;;; -gms$c60_biodem_level;;;;;;;;;;;;;;;;;1;0;;;;1;1;1;1;1;;;;;;;;;;;;;;;;;;; -gms$c60_bioenergy_subsidy;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -gms$c60_res_2ndgenBE_dem;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;sdp;ssp2;sdp;sdp;;;;;;;sdp;;ssp4;sdp;ssp4;ssp4;sdp;;;;;;;;;;;;;;;;;;; -gms$c70_feed_scen;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;ssp1;ssp5;ssp1;ssp1;;;;;;;ssp1;;ssp4;ssp1;ssp4;ssp4;ssp1;;;;;;;;;;;;;;;;;;; -gms$c_timesteps;;;;;;;;;;;;;;;;;less_TS;less_TS;;;;5year;5year;5year;5year;5year;;;;;;;;;;;;;;;;;;; -gms$c14_yields_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;cc;cc;cc;cc;cc;;;;;;;;;;;;;;;;;;; -gms$c42_watdem_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;cc;cc;cc;cc;cc;;;;;;;;;;;;;;;;;;; -gms$c43_watavail_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;cc;cc;cc;cc;cc;;;;;;;;;;;;;;;;;;; -gms$c52_carbon_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;cc;cc;cc;cc;cc;;;;;;;;;;;;;;;;;;; -gms$c59_som_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;cc;;;cc;cc;cc;cc;cc;;;;;;;;;;;;;;;;;;; -gms$s32_initial_distribution;;;;;;;;;;;;;;;;;;;;;;4;4;4;4;4;;;;;4;4;0;;;;;;;;;;;; -gms$s32_hvarea;;;;;;;;;;;;;;;;;;;;;;2;2;2;2;2;;;;;2;1;0;;;;;;;;;;;; -gms$s35_secdf_distribution;;;;;;;;;;;;;;;;;;;;;;2;2;2;2;2;;;;;2;2;0;;;;;;;;;;;; -gms$s35_hvarea;;;;;;;;;;;;;;;;;;;;;;2;2;2;2;2;;;;;2;2;0;;;;;;;;;;;; -gms$s73_timber_demand_switch;;;;;;;;;;;;;;;;;;;;;;1;1;1;1;1;;;;;1;1;0;;;;;;;;;;;; -gms$s35_forest_damage;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4;4;4;4;4;;;;;;; -gms$c32_shock_scenario;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;none;002lin2030;004lin2030;008lin2030;016lin2030;;;;;;; -gms$c35_shock_scenario;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;none;002lin2030;004lin2030;008lin2030;016lin2030;;;;;;; -input['cellular'];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.87_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.87_h12_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.87_h12_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.87_h12_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.87_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.87_h12_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz; -gms$c52_land_carbon_sink_rcp;;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;RCP19;RCP26;RCP45;RCP60;RCPBU;RCPBU; -gms$c57_macc_version;;;;;;;;;;;;;;;;;;;;;;;;;;;PBL_2022;PBL_2022;PBL_2022;PBL_2022;;;;;;;;;;;;;;; -gms$c57_macc_scenario;;;;;;;;;;;;;;;;;;;;;;;;;;;Default;Optimistic;Default;Optimistic;;;;;;;;;;;;;;; -gms$s58_rewetting_switch;;;;;;;;;;;;;;;;;;;;;;;;;;;0;1;0;1;;;;;;;;;;;;;;; +,cc,nocc,nocc_hist,SSP1,SSP2,SSP2EU,SSP3,SSP4,SSP5,SDP,SDP-EI,SDP-RC,SDP-MC,BASE,NPI,NDC,coupling,emulator,input,Tland,eat_lancet_diet,LAMA_Inequal,LAMA_Inequal-SustDemand,LAMA_Inequal-EnvirProt,LAMA_Inequal-GHGPrice,LAMA_Sustainability,NAVIGATE_AllOff,NAVIGATE_LandSup,NAVIGATE_LandDem,NAVIGATE_AllOn,ForestryEndo,ForestryExo,ForestryOff,frst_shock_none,frst_shock_002lin2030,frst_shock_004lin2030,frst_shock_008lin2030,frst_shock_016lin2030,rcp1p9,rcp2p6,rcp4p5,rcp6p0,rcp7p0,rcp8p5,NGFS_o_lowdem +gms$c09_pop_scenario,,,,SSP1,SSP2,SSP2EU,SSP3,SSP4,SSP5,SSP1,SSP1,SSP1,SSP1,,,,,,,,,SSP4,SSP1,SSP4,SSP4,SSP1,,,,,,,,,,,,,,,,,,, +gms$c09_gdp_scenario,,,,SSP1,SSP2,SSP2EU,SSP3,SSP4,SSP5,SSP1,SDP_EI,SDP_RC,SDP_MC,,,,,,,,,SSP4,SSP1,SSP4,SSP4,SSP1,,,,,,,,,,,,,,,,,,, +gms$c09_pal_scenario,,,,SSP1,SSP2,SSP2EU,SSP3,SSP4,SSP5,SSP1,SSP2,SSP1,SSP1,,,,,,,,,SSP4,SSP1,SSP4,SSP4,SSP1,,,,,,,,,,,,,,,,,,, +gms$c15_food_scenario,,,,SSP1,SSP2,SSP2,SSP3,SSP4,SSP5,SSP1,SSP2,SSP1,SSP1,,,,,,,,,SSP4,SSP1,SSP4,SSP4,SSP1,,,,,,,,,,,,,,,,,,,SSP2 +gms$c15_food_scenario_noselect,,,,,,,,,,,,,,,,,,,,,,SSP4,SSP1,SSP4,SSP4,SSP1,,,,,,,,,,,,,,,,,,,SSP2 +gms$s15_elastic_demand,,,,0,0,0,0,0,0,0,0,0,0,,,,,,,0,0,0,0,0,0,0,,,,,,,,,,,,,,,,,,, +gms$c15_rumdairy_scp_scen,,,,constant,constant,constant,constant,constant,constant,constant,sigmoid_50pc_20_50,constant,constant,,,,,,,constant,,,,,,,,,,,,,,,,,,,,,,,,, +gms$kfo_rd,,,,,,,,,,,livst_rum,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +gms$c15_exo_foodscen,,,,,,,,,,lin_zero_20_50,lin_zero_20_50,lin_zero_20_50,lin_zero_20_70,,,,,,,lin_zero_20_50,lin_zero_20_50,,lin_zero_20_50,,,lin_zero_20_50,,,,,,,,,,,,,,,,,,,lin_zero_20_50 +gms$s15_exo_waste,,,,0,0,0,0,0,0,1,1,1,1,,,,,,,1,0,0,1,0,0,1,0,0,1,1,,,,,,,,,,,,,,,1 +gms$s15_waste_scen,,,,,,,,,,1.2,1.3,1.2,1.25,,,,,,,1.2,1.2,,1.2,,,1.2,,,,,,,,,,,,,,,,,,,1.2 +gms$s15_exo_diet,,,,0,0,0,0,0,0,1,1,1,1,,,,,,,1,1,0,1,0,0,1,0,0,1,1,,,,,,,,,,,,,,,1 +gms$c15_kcal_scen,,,,,,,,,,healthy_BMI,no_underweight,healthy_BMI,healthy_BMI,,,,,,,healthy_BMI,healthy_BMI,,healthy_BMI,,,healthy_BMI,,,,,,,,,,,,,,,,,,,healthy_BMI +gms$c15_EAT_scen,,,,,,,,,,FLX,,FLX,FLX,,,,,,,FLX,FLX,,FLX,,,FLX,,,,,,,,,,,,,,,,,,, +gms$s15_exo_monogastric,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, +gms$s15_exo_ruminant,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, +gms$s15_exo_fish,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, +gms$s15_exo_fruitvegnut,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, +gms$s15_exo_pulses,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, +gms$s15_exo_sugar,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, +gms$s15_exo_oils,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, +gms$s15_exo_brans,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, +gms$s15_exo_scp,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, +gms$s15_exo_alcohol,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, +gms$c21_trade_liberalization,,,,l908080r807070,l909090r808080,l909090r808080,l909595r809090,l908080r807070,l908080r807070,l908080r807070,l908080r807070,l909595r809090,l908080r807070,,,,,,,,,l908080r807070,l908080r807070,l908080r807070,l908080r807070,l908080r807070,,,,,,,,,,,,,,,,,,, +gms$c22_protect_scenario,,,,none,none,none,none,none,none,BH,none,BH_IFL,BH,,,,,,,BH,,BH_IFL,BH_IFL,BH_IFL,BH_IFL,BH_IFL,,,,,,,,,,,,,,,,,,, +gms$c22_protect_scenario_noselect,,,,,,,,,,,,,,,,,,,,,,none,none,BH_IFL,none,BH_IFL,,,,,,,,,,,,,,,,,,, +gms$c30_bioen_water,,,,rainfed,rainfed,rainfed,rainfed,rainfed,rainfed,rainfed,all,rainfed,rainfed,,,,,,,rainfed,,,,,,,,,,,,,,,,,,,,,,,,, +gms$s30_snv_shr,,,,0,0,0,0,0,0,0,0,0,0.2,,,,,,,0,,0.2,0.2,0.2,0.2,0.2,,,,,,,,,,,,,,,,,,, +gms$s30_snv_shr_noselect,,,,,,,,,,,,,,,,,,,,,,0,0,0.2,0,0.2,,,,,,,,,,,,,,,,,,, +gms$s30_snv_scenario_target,,,,,,,,,,,,,2030,,,,,,,,,2030,2030,2030,2030,2030,,,,,,,,,,,,,,,,,,, +gms$c31_past_suit_scen,,nocc,nocc_hist,ssp126,ssp245,ssp245,ssp370,ssp460,ssp585,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,ssp126,ssp126,ssp245,ssp460,ssp370,ssp585, +gms$c31_grassl_yld_scenario,cc,nocc,nocc_hist,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +gms$s32_aff_plantation,,,,0,0,0,0,0,0,0,1,0,0,,,,,,,0,,,,,,,,,,,,,,,,,,,,,,,,, +gms$s32_aff_bii_coeff,,,,0,0,0,0,0,0,0,1,0,0,,,,,,,0,,,,,,,,,,,,,,,,,,,,,,,,, +gms$s32_max_aff_area,,,,Inf,Inf,Inf,Inf,Inf,Inf,500,350,0,700,,,,,,,500,,Inf,Inf,Inf,500,500,,,,,,,,,,,,,,,,,,, +gms$c32_aff_mask,,,,noboreal,noboreal,noboreal,noboreal,noboreal,noboreal,onlytropical,onlytropical,onlytropical,onlytropical,,,,,,,onlytropical,,noboreal,noboreal,noboreal,noboreal,noboreal,,,,,,,,,,,,,,,,,,, +gms$c34_urban_scenario,,,,SSP1,SSP2,SSP2,SSP3,SSP4,SSP5,SSP1,SSP1,SSP2,SSP1,,,,,,,,,SSP4,SSP1,SSP4,SSP4,SSP1,,,,,,,,,,,,,,,,,,, +gms$c32_aff_policy,,,,,,,,,,,,,,none,npi,ndc,,,,,,ndc,ndc,ndc,ndc,ndc,,,,,,,,,,,,,,,,,,, +gms$s32_planing_horizon,,,,50,50,50,50,50,50,50,30,50,50,,,,,,,50,,,,,,,,,,,,,,,,,,,,,,,,, +gms$c35_ad_policy,,,,,,,,,,,,,,none,npi,ndc,,,,,,ndc,ndc,ndc,ndc,ndc,,,,,,,,,,,,,,,,,,, +gms$c35_aolc_policy,,,,,,,,,,,,,,none,npi,ndc,,,,,,ndc,ndc,ndc,ndc,ndc,,,,,,,,,,,,,,,,,,, +gms$s35_forest_damage_end,,,,2030,2050,2050,2050,2050,2030,2030,2030,2030,2030,,,,,,,2030,,2030,2030,2030,2030,2030,,,,,,,,,,,,,,,,,,, +gms$s42_watdem_nonagr_scenario,,,,1,2,2,3,2,1,1,1,3,1,,,,,,,,,2,1,2,2,1,,,,,,,,,,,,,,,,,,, +gms$s42_irrig_eff_scenario,,,,2,2,2,2,2,2,3,3,3,3,,,,,,,3,,3,3,3,3,3,,,,,,,,,,,,,,,,,,, +gms$c42_env_flow_policy,,,,on,off,off,off,mixed,on,on,on,on,on,,,,,,,on,,on,on,on,on,on,,,,,,,,,,,,,,,,,,, +gms$s42_efp_targetyear,,,,2040,2040,2040,2040,2040,2040,2040,2050,2070,2050,,,,,,,2040,,2040,2040,2040,2040,2040,,,,,,,,,,,,,,,,,,, +gms$s44_target_price,,,,0,0,0,0,0,0,0,0,0,0,,,,,,,0,,,,,,,,,,,,,,,,,,,,,,,,, +gms$c50_scen_neff,,,,baseeff_add3_add10_add20_max75,baseeff_add3_add5_add10_max65,baseeff_add3_add5_add10_max65,baseeff_add3_add0_add0_max55,baseeff_add3_add10_add15_max75,baseeff_add3_add5_add15_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max65,baseeff_add3_add15_add25_max75,,,,,,,baseeff_add3_add15_add25_max75,,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max75,,,,,,,,,,,,,,,,,,, +gms$c50_scen_neff_noselect,,,,baseeff_add3_add10_add20_max75,baseeff_add3_add5_add10_max65,baseeff_add3_add5_add10_max65,baseeff_add3_add0_add0_max55,baseeff_add3_add10_add15_max75,baseeff_add3_add5_add15_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max65,baseeff_add3_add15_add25_max75,,,,,,,baseeff_add3_add15_add25_max75,,baseeff_add3_add10_add15_max75,baseeff_add3_add10_add15_max75,baseeff_add3_add10_add15_max75,baseeff_add3_add10_add15_max75,baseeff_add3_add10_add15_max75,,,,,,,,,,,,,,,,,,, +gms$c55_scen_conf,,,,ssp1,ssp2,ssp2,ssp3,ssp4,ssp5,ssp1,ssp1,ssp1,ssp1,,,,,,,ssp1,,ssp1,ssp1,ssp1,ssp1,ssp1,,,,,,,,,,,,,,,,,,, +gms$c55_scen_conf_noselect,,,,ssp1,ssp2,ssp2,ssp3,ssp4,ssp5,ssp1,ssp1,ssp1,ssp1,,,,,,,ssp1,,ssp4,ssp4,ssp1,ssp4,ssp1,,,,,,,,,,,,,,,,,,, +gms$c56_pollutant_prices,,,,,,,,,,,,,,,,,coupling,emulator,coupling,,,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,,,,,,,,,,,,,,,,,,, +gms$c56_pollutant_prices_noselect,,,,,,,,,,,,,,,,,coupling,emulator,coupling,,,R21M42-SDP-NPi,R21M42-SDP-NPi,R21M42-SDP-NPi,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,,,,,,,,,,,,,,,,,,, +gms$s56_c_price_exp_aff,,,,50,50,50,50,50,50,50,30,50,50,,,,,,,50,,,,,,,,,,,,,,,,,,,,,,,,, +gms$s56_buffer_aff,,,,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.5,0.2,0.3,,,,,,,0.2,,,,,,,,,,,,,,,,,,,,,,,,, +gms$c56_emis_policy,,,,redd+natveg_nosoil,redd+natveg_nosoil,redd+natveg_nosoil,redd+natveg_nosoil,redd+natveg_nosoil,redd+natveg_nosoil,redd+natveg_nosoil,redd+natveg_nosoil,redd+_nosoil,all_nosoil,,,,,,,redd+natveg_nosoil,,,,,,,,,,,,,,,,,,,,,,,,, +gms$s56_minimum_cprice,,,,,,,,,,,,,,0,0,18,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +gms$maccs,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +gms$c60_2ndgen_biodem,,,,,,,,,,,,,,,,,coupling,emulator,coupling,,,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,,,,,,,,,,,,,,,,,,, +gms$c60_2ndgen_biodem_noselect,,,,,,,,,,,,,,,,,coupling,emulator,coupling,,,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,,,,,,,,,,,,,,,,,,, +gms$c60_1stgen_biodem,,,,phaseout2020,const2020,const2020,const2030,const2020,phaseout2020,phaseout2020,phaseout2020,phaseout2020,phaseout2020,,,,,,,phaseout2020,,phaseout2020,phaseout2020,phaseout2020,phaseout2020,phaseout2020,,,,,,,,,,,,,,,,,,, +gms$c60_biodem_level,,,,,,,,,,,,,,,,,1,0,,,,1,1,1,1,1,,,,,,,,,,,,,,,,,,, +gms$c60_bioenergy_subsidy,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, +gms$c60_res_2ndgenBE_dem,,,,ssp1,ssp2,ssp2,ssp3,ssp4,ssp5,sdp,ssp2,sdp,sdp,,,,,,,sdp,,ssp4,sdp,ssp4,ssp4,sdp,,,,,,,,,,,,,,,,,,, +gms$c70_feed_scen,,,,ssp1,ssp2,ssp2,ssp3,ssp4,ssp5,ssp1,ssp5,ssp1,ssp1,,,,,,,ssp1,,ssp4,ssp1,ssp4,ssp4,ssp1,,,,,,,,,,,,,,,,,,, +gms$c_timesteps,,,,,,,,,,,,,,,,,less_TS,less_TS,,,,5year,5year,5year,5year,5year,,,,,,,,,,,,,,,,,,, +gms$c14_yields_scenario,cc,nocc,nocc_hist,,,,,,,,,,,,,,,,,,,cc,cc,cc,cc,cc,,,,,,,,,,,,,,,,,,, +gms$c42_watdem_scenario,cc,nocc,nocc_hist,,,,,,,,,,,,,,,,,,,cc,cc,cc,cc,cc,,,,,,,,,,,,,,,,,,, +gms$c43_watavail_scenario,cc,nocc,nocc_hist,,,,,,,,,,,,,,,,,,,cc,cc,cc,cc,cc,,,,,,,,,,,,,,,,,,, +gms$c52_carbon_scenario,cc,nocc,nocc_hist,,,,,,,,,,,,,,,,,,,cc,cc,cc,cc,cc,,,,,,,,,,,,,,,,,,, +gms$c59_som_scenario,cc,nocc,nocc_hist,,,,,,,,,,,,,,,,cc,,,cc,cc,cc,cc,cc,,,,,,,,,,,,,,,,,,, +gms$s32_initial_distribution,,,,,,,,,,,,,,,,,,,,,,4,4,4,4,4,,,,,4,4,0,,,,,,,,,,,, +gms$s32_hvarea,,,,,,,,,,,,,,,,,,,,,,2,2,2,2,2,,,,,2,1,0,,,,,,,,,,,, +gms$s35_secdf_distribution,,,,,,,,,,,,,,,,,,,,,,2,2,2,2,2,,,,,2,2,0,,,,,,,,,,,, +gms$s35_hvarea,,,,,,,,,,,,,,,,,,,,,,2,2,2,2,2,,,,,2,2,0,,,,,,,,,,,, +gms$s73_timber_demand_switch,,,,,,,,,,,,,,,,,,,,,,1,1,1,1,1,,,,,1,1,0,,,,,,,,,,,, +gms$s35_forest_damage,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,4,4,4,4,4,,,,,,, +gms$c32_shock_scenario,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,none,002lin2030,004lin2030,008lin2030,016lin2030,,,,,,, +gms$c35_shock_scenario,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,none,002lin2030,004lin2030,008lin2030,016lin2030,,,,,,, +input['cellular'],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,rev4.88_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz,rev4.88_h12_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz,rev4.88_h12_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz,rev4.88_h12_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz,rev4.88_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz,rev4.88_h12_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz, +gms$c52_land_carbon_sink_rcp,,nocc,nocc_hist,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RCP19,RCP26,RCP45,RCP60,RCPBU,RCPBU, +gms$c57_macc_version,,,,,,,,,,,,,,,,,,,,,,,,,,,PBL_2022,PBL_2022,PBL_2022,PBL_2022,,,,,,,,,,,,,,, +gms$c57_macc_scenario,,,,,,,,,,,,,,,,,,,,,,,,,,,Default,Optimistic,Default,Optimistic,,,,,,,,,,,,,,, +gms$s58_rewetting_switch,,,,,,,,,,,,,,,,,,,,,,,,,,,0,1,0,1,,,,,,,,,,,,,,, From e6e7ac59ce8e98368efcd6bfdd32e624c9d58e0c Mon Sep 17 00:00:00 2001 From: caviddhen Date: Wed, 9 Aug 2023 17:07:57 +0200 Subject: [PATCH 07/23] revert scenario_config csv to semicolon separators --- config/scenario_config.csv | 172 ++++++++++++++++++------------------- 1 file changed, 86 insertions(+), 86 deletions(-) diff --git a/config/scenario_config.csv b/config/scenario_config.csv index 47a89897eb..8fc52c3c0f 100644 --- a/config/scenario_config.csv +++ b/config/scenario_config.csv @@ -1,86 +1,86 @@ -,cc,nocc,nocc_hist,SSP1,SSP2,SSP2EU,SSP3,SSP4,SSP5,SDP,SDP-EI,SDP-RC,SDP-MC,BASE,NPI,NDC,coupling,emulator,input,Tland,eat_lancet_diet,LAMA_Inequal,LAMA_Inequal-SustDemand,LAMA_Inequal-EnvirProt,LAMA_Inequal-GHGPrice,LAMA_Sustainability,NAVIGATE_AllOff,NAVIGATE_LandSup,NAVIGATE_LandDem,NAVIGATE_AllOn,ForestryEndo,ForestryExo,ForestryOff,frst_shock_none,frst_shock_002lin2030,frst_shock_004lin2030,frst_shock_008lin2030,frst_shock_016lin2030,rcp1p9,rcp2p6,rcp4p5,rcp6p0,rcp7p0,rcp8p5,NGFS_o_lowdem -gms$c09_pop_scenario,,,,SSP1,SSP2,SSP2EU,SSP3,SSP4,SSP5,SSP1,SSP1,SSP1,SSP1,,,,,,,,,SSP4,SSP1,SSP4,SSP4,SSP1,,,,,,,,,,,,,,,,,,, -gms$c09_gdp_scenario,,,,SSP1,SSP2,SSP2EU,SSP3,SSP4,SSP5,SSP1,SDP_EI,SDP_RC,SDP_MC,,,,,,,,,SSP4,SSP1,SSP4,SSP4,SSP1,,,,,,,,,,,,,,,,,,, -gms$c09_pal_scenario,,,,SSP1,SSP2,SSP2EU,SSP3,SSP4,SSP5,SSP1,SSP2,SSP1,SSP1,,,,,,,,,SSP4,SSP1,SSP4,SSP4,SSP1,,,,,,,,,,,,,,,,,,, -gms$c15_food_scenario,,,,SSP1,SSP2,SSP2,SSP3,SSP4,SSP5,SSP1,SSP2,SSP1,SSP1,,,,,,,,,SSP4,SSP1,SSP4,SSP4,SSP1,,,,,,,,,,,,,,,,,,,SSP2 -gms$c15_food_scenario_noselect,,,,,,,,,,,,,,,,,,,,,,SSP4,SSP1,SSP4,SSP4,SSP1,,,,,,,,,,,,,,,,,,,SSP2 -gms$s15_elastic_demand,,,,0,0,0,0,0,0,0,0,0,0,,,,,,,0,0,0,0,0,0,0,,,,,,,,,,,,,,,,,,, -gms$c15_rumdairy_scp_scen,,,,constant,constant,constant,constant,constant,constant,constant,sigmoid_50pc_20_50,constant,constant,,,,,,,constant,,,,,,,,,,,,,,,,,,,,,,,,, -gms$kfo_rd,,,,,,,,,,,livst_rum,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -gms$c15_exo_foodscen,,,,,,,,,,lin_zero_20_50,lin_zero_20_50,lin_zero_20_50,lin_zero_20_70,,,,,,,lin_zero_20_50,lin_zero_20_50,,lin_zero_20_50,,,lin_zero_20_50,,,,,,,,,,,,,,,,,,,lin_zero_20_50 -gms$s15_exo_waste,,,,0,0,0,0,0,0,1,1,1,1,,,,,,,1,0,0,1,0,0,1,0,0,1,1,,,,,,,,,,,,,,,1 -gms$s15_waste_scen,,,,,,,,,,1.2,1.3,1.2,1.25,,,,,,,1.2,1.2,,1.2,,,1.2,,,,,,,,,,,,,,,,,,,1.2 -gms$s15_exo_diet,,,,0,0,0,0,0,0,1,1,1,1,,,,,,,1,1,0,1,0,0,1,0,0,1,1,,,,,,,,,,,,,,,1 -gms$c15_kcal_scen,,,,,,,,,,healthy_BMI,no_underweight,healthy_BMI,healthy_BMI,,,,,,,healthy_BMI,healthy_BMI,,healthy_BMI,,,healthy_BMI,,,,,,,,,,,,,,,,,,,healthy_BMI -gms$c15_EAT_scen,,,,,,,,,,FLX,,FLX,FLX,,,,,,,FLX,FLX,,FLX,,,FLX,,,,,,,,,,,,,,,,,,, -gms$s15_exo_monogastric,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, -gms$s15_exo_ruminant,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, -gms$s15_exo_fish,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, -gms$s15_exo_fruitvegnut,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, -gms$s15_exo_pulses,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, -gms$s15_exo_sugar,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, -gms$s15_exo_oils,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, -gms$s15_exo_brans,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, -gms$s15_exo_scp,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, -gms$s15_exo_alcohol,,,,,,,,,,1,0,1,1,,,,,,,1,1,1,1,1,1,1,,,,,,,,,,,,,,,,,,, -gms$c21_trade_liberalization,,,,l908080r807070,l909090r808080,l909090r808080,l909595r809090,l908080r807070,l908080r807070,l908080r807070,l908080r807070,l909595r809090,l908080r807070,,,,,,,,,l908080r807070,l908080r807070,l908080r807070,l908080r807070,l908080r807070,,,,,,,,,,,,,,,,,,, -gms$c22_protect_scenario,,,,none,none,none,none,none,none,BH,none,BH_IFL,BH,,,,,,,BH,,BH_IFL,BH_IFL,BH_IFL,BH_IFL,BH_IFL,,,,,,,,,,,,,,,,,,, -gms$c22_protect_scenario_noselect,,,,,,,,,,,,,,,,,,,,,,none,none,BH_IFL,none,BH_IFL,,,,,,,,,,,,,,,,,,, -gms$c30_bioen_water,,,,rainfed,rainfed,rainfed,rainfed,rainfed,rainfed,rainfed,all,rainfed,rainfed,,,,,,,rainfed,,,,,,,,,,,,,,,,,,,,,,,,, -gms$s30_snv_shr,,,,0,0,0,0,0,0,0,0,0,0.2,,,,,,,0,,0.2,0.2,0.2,0.2,0.2,,,,,,,,,,,,,,,,,,, -gms$s30_snv_shr_noselect,,,,,,,,,,,,,,,,,,,,,,0,0,0.2,0,0.2,,,,,,,,,,,,,,,,,,, -gms$s30_snv_scenario_target,,,,,,,,,,,,,2030,,,,,,,,,2030,2030,2030,2030,2030,,,,,,,,,,,,,,,,,,, -gms$c31_past_suit_scen,,nocc,nocc_hist,ssp126,ssp245,ssp245,ssp370,ssp460,ssp585,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,ssp126,ssp126,ssp245,ssp460,ssp370,ssp585, -gms$c31_grassl_yld_scenario,cc,nocc,nocc_hist,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -gms$s32_aff_plantation,,,,0,0,0,0,0,0,0,1,0,0,,,,,,,0,,,,,,,,,,,,,,,,,,,,,,,,, -gms$s32_aff_bii_coeff,,,,0,0,0,0,0,0,0,1,0,0,,,,,,,0,,,,,,,,,,,,,,,,,,,,,,,,, -gms$s32_max_aff_area,,,,Inf,Inf,Inf,Inf,Inf,Inf,500,350,0,700,,,,,,,500,,Inf,Inf,Inf,500,500,,,,,,,,,,,,,,,,,,, -gms$c32_aff_mask,,,,noboreal,noboreal,noboreal,noboreal,noboreal,noboreal,onlytropical,onlytropical,onlytropical,onlytropical,,,,,,,onlytropical,,noboreal,noboreal,noboreal,noboreal,noboreal,,,,,,,,,,,,,,,,,,, -gms$c34_urban_scenario,,,,SSP1,SSP2,SSP2,SSP3,SSP4,SSP5,SSP1,SSP1,SSP2,SSP1,,,,,,,,,SSP4,SSP1,SSP4,SSP4,SSP1,,,,,,,,,,,,,,,,,,, -gms$c32_aff_policy,,,,,,,,,,,,,,none,npi,ndc,,,,,,ndc,ndc,ndc,ndc,ndc,,,,,,,,,,,,,,,,,,, -gms$s32_planing_horizon,,,,50,50,50,50,50,50,50,30,50,50,,,,,,,50,,,,,,,,,,,,,,,,,,,,,,,,, -gms$c35_ad_policy,,,,,,,,,,,,,,none,npi,ndc,,,,,,ndc,ndc,ndc,ndc,ndc,,,,,,,,,,,,,,,,,,, -gms$c35_aolc_policy,,,,,,,,,,,,,,none,npi,ndc,,,,,,ndc,ndc,ndc,ndc,ndc,,,,,,,,,,,,,,,,,,, -gms$s35_forest_damage_end,,,,2030,2050,2050,2050,2050,2030,2030,2030,2030,2030,,,,,,,2030,,2030,2030,2030,2030,2030,,,,,,,,,,,,,,,,,,, -gms$s42_watdem_nonagr_scenario,,,,1,2,2,3,2,1,1,1,3,1,,,,,,,,,2,1,2,2,1,,,,,,,,,,,,,,,,,,, -gms$s42_irrig_eff_scenario,,,,2,2,2,2,2,2,3,3,3,3,,,,,,,3,,3,3,3,3,3,,,,,,,,,,,,,,,,,,, -gms$c42_env_flow_policy,,,,on,off,off,off,mixed,on,on,on,on,on,,,,,,,on,,on,on,on,on,on,,,,,,,,,,,,,,,,,,, -gms$s42_efp_targetyear,,,,2040,2040,2040,2040,2040,2040,2040,2050,2070,2050,,,,,,,2040,,2040,2040,2040,2040,2040,,,,,,,,,,,,,,,,,,, -gms$s44_target_price,,,,0,0,0,0,0,0,0,0,0,0,,,,,,,0,,,,,,,,,,,,,,,,,,,,,,,,, -gms$c50_scen_neff,,,,baseeff_add3_add10_add20_max75,baseeff_add3_add5_add10_max65,baseeff_add3_add5_add10_max65,baseeff_add3_add0_add0_max55,baseeff_add3_add10_add15_max75,baseeff_add3_add5_add15_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max65,baseeff_add3_add15_add25_max75,,,,,,,baseeff_add3_add15_add25_max75,,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max75,,,,,,,,,,,,,,,,,,, -gms$c50_scen_neff_noselect,,,,baseeff_add3_add10_add20_max75,baseeff_add3_add5_add10_max65,baseeff_add3_add5_add10_max65,baseeff_add3_add0_add0_max55,baseeff_add3_add10_add15_max75,baseeff_add3_add5_add15_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max75,baseeff_add3_add15_add25_max65,baseeff_add3_add15_add25_max75,,,,,,,baseeff_add3_add15_add25_max75,,baseeff_add3_add10_add15_max75,baseeff_add3_add10_add15_max75,baseeff_add3_add10_add15_max75,baseeff_add3_add10_add15_max75,baseeff_add3_add10_add15_max75,,,,,,,,,,,,,,,,,,, -gms$c55_scen_conf,,,,ssp1,ssp2,ssp2,ssp3,ssp4,ssp5,ssp1,ssp1,ssp1,ssp1,,,,,,,ssp1,,ssp1,ssp1,ssp1,ssp1,ssp1,,,,,,,,,,,,,,,,,,, -gms$c55_scen_conf_noselect,,,,ssp1,ssp2,ssp2,ssp3,ssp4,ssp5,ssp1,ssp1,ssp1,ssp1,,,,,,,ssp1,,ssp4,ssp4,ssp1,ssp4,ssp1,,,,,,,,,,,,,,,,,,, -gms$c56_pollutant_prices,,,,,,,,,,,,,,,,,coupling,emulator,coupling,,,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,,,,,,,,,,,,,,,,,,, -gms$c56_pollutant_prices_noselect,,,,,,,,,,,,,,,,,coupling,emulator,coupling,,,R21M42-SDP-NPi,R21M42-SDP-NPi,R21M42-SDP-NPi,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,,,,,,,,,,,,,,,,,,, -gms$s56_c_price_exp_aff,,,,50,50,50,50,50,50,50,30,50,50,,,,,,,50,,,,,,,,,,,,,,,,,,,,,,,,, -gms$s56_buffer_aff,,,,0.2,0.2,0.2,0.2,0.2,0.2,0.2,0.5,0.2,0.3,,,,,,,0.2,,,,,,,,,,,,,,,,,,,,,,,,, -gms$c56_emis_policy,,,,redd+natveg_nosoil,redd+natveg_nosoil,redd+natveg_nosoil,redd+natveg_nosoil,redd+natveg_nosoil,redd+natveg_nosoil,redd+natveg_nosoil,redd+natveg_nosoil,redd+_nosoil,all_nosoil,,,,,,,redd+natveg_nosoil,,,,,,,,,,,,,,,,,,,,,,,,, -gms$s56_minimum_cprice,,,,,,,,,,,,,,0,0,18,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -gms$maccs,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -gms$c60_2ndgen_biodem,,,,,,,,,,,,,,,,,coupling,emulator,coupling,,,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,,,,,,,,,,,,,,,,,,, -gms$c60_2ndgen_biodem_noselect,,,,,,,,,,,,,,,,,coupling,emulator,coupling,,,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,R21M42-SDP-PkBudg1000,,,,,,,,,,,,,,,,,,, -gms$c60_1stgen_biodem,,,,phaseout2020,const2020,const2020,const2030,const2020,phaseout2020,phaseout2020,phaseout2020,phaseout2020,phaseout2020,,,,,,,phaseout2020,,phaseout2020,phaseout2020,phaseout2020,phaseout2020,phaseout2020,,,,,,,,,,,,,,,,,,, -gms$c60_biodem_level,,,,,,,,,,,,,,,,,1,0,,,,1,1,1,1,1,,,,,,,,,,,,,,,,,,, -gms$c60_bioenergy_subsidy,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, -gms$c60_res_2ndgenBE_dem,,,,ssp1,ssp2,ssp2,ssp3,ssp4,ssp5,sdp,ssp2,sdp,sdp,,,,,,,sdp,,ssp4,sdp,ssp4,ssp4,sdp,,,,,,,,,,,,,,,,,,, -gms$c70_feed_scen,,,,ssp1,ssp2,ssp2,ssp3,ssp4,ssp5,ssp1,ssp5,ssp1,ssp1,,,,,,,ssp1,,ssp4,ssp1,ssp4,ssp4,ssp1,,,,,,,,,,,,,,,,,,, -gms$c_timesteps,,,,,,,,,,,,,,,,,less_TS,less_TS,,,,5year,5year,5year,5year,5year,,,,,,,,,,,,,,,,,,, -gms$c14_yields_scenario,cc,nocc,nocc_hist,,,,,,,,,,,,,,,,,,,cc,cc,cc,cc,cc,,,,,,,,,,,,,,,,,,, -gms$c42_watdem_scenario,cc,nocc,nocc_hist,,,,,,,,,,,,,,,,,,,cc,cc,cc,cc,cc,,,,,,,,,,,,,,,,,,, -gms$c43_watavail_scenario,cc,nocc,nocc_hist,,,,,,,,,,,,,,,,,,,cc,cc,cc,cc,cc,,,,,,,,,,,,,,,,,,, -gms$c52_carbon_scenario,cc,nocc,nocc_hist,,,,,,,,,,,,,,,,,,,cc,cc,cc,cc,cc,,,,,,,,,,,,,,,,,,, -gms$c59_som_scenario,cc,nocc,nocc_hist,,,,,,,,,,,,,,,,cc,,,cc,cc,cc,cc,cc,,,,,,,,,,,,,,,,,,, -gms$s32_initial_distribution,,,,,,,,,,,,,,,,,,,,,,4,4,4,4,4,,,,,4,4,0,,,,,,,,,,,, -gms$s32_hvarea,,,,,,,,,,,,,,,,,,,,,,2,2,2,2,2,,,,,2,1,0,,,,,,,,,,,, -gms$s35_secdf_distribution,,,,,,,,,,,,,,,,,,,,,,2,2,2,2,2,,,,,2,2,0,,,,,,,,,,,, -gms$s35_hvarea,,,,,,,,,,,,,,,,,,,,,,2,2,2,2,2,,,,,2,2,0,,,,,,,,,,,, -gms$s73_timber_demand_switch,,,,,,,,,,,,,,,,,,,,,,1,1,1,1,1,,,,,1,1,0,,,,,,,,,,,, -gms$s35_forest_damage,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,4,4,4,4,4,,,,,,, -gms$c32_shock_scenario,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,none,002lin2030,004lin2030,008lin2030,016lin2030,,,,,,, -gms$c35_shock_scenario,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,none,002lin2030,004lin2030,008lin2030,016lin2030,,,,,,, -input['cellular'],,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,rev4.88_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz,rev4.88_h12_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz,rev4.88_h12_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz,rev4.88_h12_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz,rev4.88_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz,rev4.88_h12_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz, -gms$c52_land_carbon_sink_rcp,,nocc,nocc_hist,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,RCP19,RCP26,RCP45,RCP60,RCPBU,RCPBU, -gms$c57_macc_version,,,,,,,,,,,,,,,,,,,,,,,,,,,PBL_2022,PBL_2022,PBL_2022,PBL_2022,,,,,,,,,,,,,,, -gms$c57_macc_scenario,,,,,,,,,,,,,,,,,,,,,,,,,,,Default,Optimistic,Default,Optimistic,,,,,,,,,,,,,,, -gms$s58_rewetting_switch,,,,,,,,,,,,,,,,,,,,,,,,,,,0,1,0,1,,,,,,,,,,,,,,, +;cc;nocc;nocc_hist;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SDP;SDP-EI;SDP-RC;SDP-MC;BASE;NPI;NDC;coupling;emulator;input;Tland;eat_lancet_diet;LAMA_Inequal;LAMA_Inequal-SustDemand;LAMA_Inequal-EnvirProt;LAMA_Inequal-GHGPrice;LAMA_Sustainability;NAVIGATE_AllOff;NAVIGATE_LandSup;NAVIGATE_LandDem;NAVIGATE_AllOn;ForestryEndo;ForestryExo;ForestryOff;frst_shock_none;frst_shock_002lin2030;frst_shock_004lin2030;frst_shock_008lin2030;frst_shock_016lin2030;rcp1p9;rcp2p6;rcp4p5;rcp6p0;rcp7p0;rcp8p5;NGFS_o_lowdem +gms$c09_pop_scenario;;;;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SSP1;SSP1;SSP1;SSP1;;;;;;;;;SSP4;SSP1;SSP4;SSP4;SSP1;;;;;;;;;;;;;;;;;;; +gms$c09_gdp_scenario;;;;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SSP1;SDP_EI;SDP_RC;SDP_MC;;;;;;;;;SSP4;SSP1;SSP4;SSP4;SSP1;;;;;;;;;;;;;;;;;;; +gms$c09_pal_scenario;;;;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SSP1;SSP2;SSP1;SSP1;;;;;;;;;SSP4;SSP1;SSP4;SSP4;SSP1;;;;;;;;;;;;;;;;;;; +gms$c15_food_scenario;;;;SSP1;SSP2;SSP2;SSP3;SSP4;SSP5;SSP1;SSP2;SSP1;SSP1;;;;;;;;;SSP4;SSP1;SSP4;SSP4;SSP1;;;;;;;;;;;;;;;;;;;SSP2 +gms$c15_food_scenario_noselect;;;;;;;;;;;;;;;;;;;;;;SSP4;SSP1;SSP4;SSP4;SSP1;;;;;;;;;;;;;;;;;;;SSP2 +gms$s15_elastic_demand;;;;0;0;0;0;0;0;0;0;0;0;;;;;;;0;0;0;0;0;0;0;;;;;;;;;;;;;;;;;;; +gms$c15_rumdairy_scp_scen;;;;constant;constant;constant;constant;constant;constant;constant;sigmoid_50pc_20_50;constant;constant;;;;;;;constant;;;;;;;;;;;;;;;;;;;;;;;;; +gms$kfo_rd;;;;;;;;;;;livst_rum;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +gms$c15_exo_foodscen;;;;;;;;;;lin_zero_20_50;lin_zero_20_50;lin_zero_20_50;lin_zero_20_70;;;;;;;lin_zero_20_50;lin_zero_20_50;;lin_zero_20_50;;;lin_zero_20_50;;;;;;;;;;;;;;;;;;;lin_zero_20_50 +gms$s15_exo_waste;;;;0;0;0;0;0;0;1;1;1;1;;;;;;;1;0;0;1;0;0;1;0;0;1;1;;;;;;;;;;;;;;;1 +gms$s15_waste_scen;;;;;;;;;;1.2;1.3;1.2;1.25;;;;;;;1.2;1.2;;1.2;;;1.2;;;;;;;;;;;;;;;;;;;1.2 +gms$s15_exo_diet;;;;0;0;0;0;0;0;1;1;1;1;;;;;;;1;1;0;1;0;0;1;0;0;1;1;;;;;;;;;;;;;;;1 +gms$c15_kcal_scen;;;;;;;;;;healthy_BMI;no_underweight;healthy_BMI;healthy_BMI;;;;;;;healthy_BMI;healthy_BMI;;healthy_BMI;;;healthy_BMI;;;;;;;;;;;;;;;;;;;healthy_BMI +gms$c15_EAT_scen;;;;;;;;;;FLX;;FLX;FLX;;;;;;;FLX;FLX;;FLX;;;FLX;;;;;;;;;;;;;;;;;;; +gms$s15_exo_monogastric;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; +gms$s15_exo_ruminant;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; +gms$s15_exo_fish;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; +gms$s15_exo_fruitvegnut;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; +gms$s15_exo_pulses;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; +gms$s15_exo_sugar;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; +gms$s15_exo_oils;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; +gms$s15_exo_brans;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; +gms$s15_exo_scp;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; +gms$s15_exo_alcohol;;;;;;;;;;1;0;1;1;;;;;;;1;1;1;1;1;1;1;;;;;;;;;;;;;;;;;;; +gms$c21_trade_liberalization;;;;l908080r807070;l909090r808080;l909090r808080;l909595r809090;l908080r807070;l908080r807070;l908080r807070;l908080r807070;l909595r809090;l908080r807070;;;;;;;;;l908080r807070;l908080r807070;l908080r807070;l908080r807070;l908080r807070;;;;;;;;;;;;;;;;;;; +gms$c22_protect_scenario;;;;none;none;none;none;none;none;BH;none;BH_IFL;BH;;;;;;;BH;;BH_IFL;BH_IFL;BH_IFL;BH_IFL;BH_IFL;;;;;;;;;;;;;;;;;;; +gms$c22_protect_scenario_noselect;;;;;;;;;;;;;;;;;;;;;;none;none;BH_IFL;none;BH_IFL;;;;;;;;;;;;;;;;;;; +gms$c30_bioen_water;;;;rainfed;rainfed;rainfed;rainfed;rainfed;rainfed;rainfed;all;rainfed;rainfed;;;;;;;rainfed;;;;;;;;;;;;;;;;;;;;;;;;; +gms$s30_snv_shr;;;;0;0;0;0;0;0;0;0;0;0.2;;;;;;;0;;0.2;0.2;0.2;0.2;0.2;;;;;;;;;;;;;;;;;;; +gms$s30_snv_shr_noselect;;;;;;;;;;;;;;;;;;;;;;0;0;0.2;0;0.2;;;;;;;;;;;;;;;;;;; +gms$s30_snv_scenario_target;;;;;;;;;;;;;2030;;;;;;;;;2030;2030;2030;2030;2030;;;;;;;;;;;;;;;;;;; +gms$c31_past_suit_scen;;nocc;nocc_hist;ssp126;ssp245;ssp245;ssp370;ssp460;ssp585;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ssp126;ssp126;ssp245;ssp460;ssp370;ssp585; +gms$c31_grassl_yld_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +gms$s32_aff_plantation;;;;0;0;0;0;0;0;0;1;0;0;;;;;;;0;;;;;;;;;;;;;;;;;;;;;;;;; +gms$s32_aff_bii_coeff;;;;0;0;0;0;0;0;0;1;0;0;;;;;;;0;;;;;;;;;;;;;;;;;;;;;;;;; +gms$s32_max_aff_area;;;;Inf;Inf;Inf;Inf;Inf;Inf;500;350;0;700;;;;;;;500;;Inf;Inf;Inf;500;500;;;;;;;;;;;;;;;;;;; +gms$c32_aff_mask;;;;noboreal;noboreal;noboreal;noboreal;noboreal;noboreal;onlytropical;onlytropical;onlytropical;onlytropical;;;;;;;onlytropical;;noboreal;noboreal;noboreal;noboreal;noboreal;;;;;;;;;;;;;;;;;;; +gms$c34_urban_scenario;;;;SSP1;SSP2;SSP2;SSP3;SSP4;SSP5;SSP1;SSP1;SSP2;SSP1;;;;;;;;;SSP4;SSP1;SSP4;SSP4;SSP1;;;;;;;;;;;;;;;;;;; +gms$c32_aff_policy;;;;;;;;;;;;;;none;npi;ndc;;;;;;ndc;ndc;ndc;ndc;ndc;;;;;;;;;;;;;;;;;;; +gms$s32_planing_horizon;;;;50;50;50;50;50;50;50;30;50;50;;;;;;;50;;;;;;;;;;;;;;;;;;;;;;;;; +gms$c35_ad_policy;;;;;;;;;;;;;;none;npi;ndc;;;;;;ndc;ndc;ndc;ndc;ndc;;;;;;;;;;;;;;;;;;; +gms$c35_aolc_policy;;;;;;;;;;;;;;none;npi;ndc;;;;;;ndc;ndc;ndc;ndc;ndc;;;;;;;;;;;;;;;;;;; +gms$s35_forest_damage_end;;;;2030;2050;2050;2050;2050;2030;2030;2030;2030;2030;;;;;;;2030;;2030;2030;2030;2030;2030;;;;;;;;;;;;;;;;;;; +gms$s42_watdem_nonagr_scenario;;;;1;2;2;3;2;1;1;1;3;1;;;;;;;;;2;1;2;2;1;;;;;;;;;;;;;;;;;;; +gms$s42_irrig_eff_scenario;;;;2;2;2;2;2;2;3;3;3;3;;;;;;;3;;3;3;3;3;3;;;;;;;;;;;;;;;;;;; +gms$c42_env_flow_policy;;;;on;off;off;off;mixed;on;on;on;on;on;;;;;;;on;;on;on;on;on;on;;;;;;;;;;;;;;;;;;; +gms$s42_efp_targetyear;;;;2040;2040;2040;2040;2040;2040;2040;2050;2070;2050;;;;;;;2040;;2040;2040;2040;2040;2040;;;;;;;;;;;;;;;;;;; +gms$s44_target_price;;;;0;0;0;0;0;0;0;0;0;0;;;;;;;0;;;;;;;;;;;;;;;;;;;;;;;;; +gms$c50_scen_neff;;;;baseeff_add3_add10_add20_max75;baseeff_add3_add5_add10_max65;baseeff_add3_add5_add10_max65;baseeff_add3_add0_add0_max55;baseeff_add3_add10_add15_max75;baseeff_add3_add5_add15_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max65;baseeff_add3_add15_add25_max75;;;;;;;baseeff_add3_add15_add25_max75;;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;;;;;;;;;;;;;;;;;;; +gms$c50_scen_neff_noselect;;;;baseeff_add3_add10_add20_max75;baseeff_add3_add5_add10_max65;baseeff_add3_add5_add10_max65;baseeff_add3_add0_add0_max55;baseeff_add3_add10_add15_max75;baseeff_add3_add5_add15_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max65;baseeff_add3_add15_add25_max75;;;;;;;baseeff_add3_add15_add25_max75;;baseeff_add3_add10_add15_max75;baseeff_add3_add10_add15_max75;baseeff_add3_add10_add15_max75;baseeff_add3_add10_add15_max75;baseeff_add3_add10_add15_max75;;;;;;;;;;;;;;;;;;; +gms$c55_scen_conf;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;ssp1;ssp1;ssp1;ssp1;;;;;;;ssp1;;ssp1;ssp1;ssp1;ssp1;ssp1;;;;;;;;;;;;;;;;;;; +gms$c55_scen_conf_noselect;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;ssp1;ssp1;ssp1;ssp1;;;;;;;ssp1;;ssp4;ssp4;ssp1;ssp4;ssp1;;;;;;;;;;;;;;;;;;; +gms$c56_pollutant_prices;;;;;;;;;;;;;;;;;coupling;emulator;coupling;;;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;;;;;;;;;;;;;;;;;;; +gms$c56_pollutant_prices_noselect;;;;;;;;;;;;;;;;;coupling;emulator;coupling;;;R21M42-SDP-NPi;R21M42-SDP-NPi;R21M42-SDP-NPi;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;;;;;;;;;;;;;;;;;;; +gms$s56_c_price_exp_aff;;;;50;50;50;50;50;50;50;30;50;50;;;;;;;50;;;;;;;;;;;;;;;;;;;;;;;;; +gms$s56_buffer_aff;;;;0.2;0.2;0.2;0.2;0.2;0.2;0.2;0.5;0.2;0.3;;;;;;;0.2;;;;;;;;;;;;;;;;;;;;;;;;; +gms$c56_emis_policy;;;;redd+natveg_nosoil;redd+natveg_nosoil;redd+natveg_nosoil;redd+natveg_nosoil;redd+natveg_nosoil;redd+natveg_nosoil;redd+natveg_nosoil;redd+natveg_nosoil;redd+_nosoil;all_nosoil;;;;;;;redd+natveg_nosoil;;;;;;;;;;;;;;;;;;;;;;;;; +gms$s56_minimum_cprice;;;;;;;;;;;;;;0;0;18;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +gms$maccs;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +gms$c60_2ndgen_biodem;;;;;;;;;;;;;;;;;coupling;emulator;coupling;;;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;;;;;;;;;;;;;;;;;;; +gms$c60_2ndgen_biodem_noselect;;;;;;;;;;;;;;;;;coupling;emulator;coupling;;;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;R21M42-SDP-PkBudg1000;;;;;;;;;;;;;;;;;;; +gms$c60_1stgen_biodem;;;;phaseout2020;const2020;const2020;const2030;const2020;phaseout2020;phaseout2020;phaseout2020;phaseout2020;phaseout2020;;;;;;;phaseout2020;;phaseout2020;phaseout2020;phaseout2020;phaseout2020;phaseout2020;;;;;;;;;;;;;;;;;;; +gms$c60_biodem_level;;;;;;;;;;;;;;;;;1;0;;;;1;1;1;1;1;;;;;;;;;;;;;;;;;;; +gms$c60_bioenergy_subsidy;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +gms$c60_res_2ndgenBE_dem;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;sdp;ssp2;sdp;sdp;;;;;;;sdp;;ssp4;sdp;ssp4;ssp4;sdp;;;;;;;;;;;;;;;;;;; +gms$c70_feed_scen;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;ssp1;ssp5;ssp1;ssp1;;;;;;;ssp1;;ssp4;ssp1;ssp4;ssp4;ssp1;;;;;;;;;;;;;;;;;;; +gms$c_timesteps;;;;;;;;;;;;;;;;;less_TS;less_TS;;;;5year;5year;5year;5year;5year;;;;;;;;;;;;;;;;;;; +gms$c14_yields_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;cc;cc;cc;cc;cc;;;;;;;;;;;;;;;;;;; +gms$c42_watdem_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;cc;cc;cc;cc;cc;;;;;;;;;;;;;;;;;;; +gms$c43_watavail_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;cc;cc;cc;cc;cc;;;;;;;;;;;;;;;;;;; +gms$c52_carbon_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;cc;cc;cc;cc;cc;;;;;;;;;;;;;;;;;;; +gms$c59_som_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;cc;;;cc;cc;cc;cc;cc;;;;;;;;;;;;;;;;;;; +gms$s32_initial_distribution;;;;;;;;;;;;;;;;;;;;;;4;4;4;4;4;;;;;4;4;0;;;;;;;;;;;; +gms$s32_hvarea;;;;;;;;;;;;;;;;;;;;;;2;2;2;2;2;;;;;2;1;0;;;;;;;;;;;; +gms$s35_secdf_distribution;;;;;;;;;;;;;;;;;;;;;;2;2;2;2;2;;;;;2;2;0;;;;;;;;;;;; +gms$s35_hvarea;;;;;;;;;;;;;;;;;;;;;;2;2;2;2;2;;;;;2;2;0;;;;;;;;;;;; +gms$s73_timber_demand_switch;;;;;;;;;;;;;;;;;;;;;;1;1;1;1;1;;;;;1;1;0;;;;;;;;;;;; +gms$s35_forest_damage;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4;4;4;4;4;;;;;;; +gms$c32_shock_scenario;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;none;002lin2030;004lin2030;008lin2030;016lin2030;;;;;;; +gms$c35_shock_scenario;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;none;002lin2030;004lin2030;008lin2030;016lin2030;;;;;;; +input['cellular'];;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.88_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.88_h12_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.88_h12_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.88_h12_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.88_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.88_h12_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz; +gms$c52_land_carbon_sink_rcp;;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;RCP19;RCP26;RCP45;RCP60;RCPBU;RCPBU; +gms$c57_macc_version;;;;;;;;;;;;;;;;;;;;;;;;;;;PBL_2022;PBL_2022;PBL_2022;PBL_2022;;;;;;;;;;;;;;; +gms$c57_macc_scenario;;;;;;;;;;;;;;;;;;;;;;;;;;;Default;Optimistic;Default;Optimistic;;;;;;;;;;;;;;; +gms$s58_rewetting_switch;;;;;;;;;;;;;;;;;;;;;;;;;;;0;1;0;1;;;;;;;;;;;;;;; From e31bf54a7d6c201f509f310ad854268551011e73 Mon Sep 17 00:00:00 2001 From: florianh Date: Thu, 10 Aug 2023 09:29:57 +0200 Subject: [PATCH 08/23] bugfix disaggregation_LUH2.R --- scripts/output/extra/disaggregation_LUH2.R | 142 +++++++++++---------- 1 file changed, 75 insertions(+), 67 deletions(-) diff --git a/scripts/output/extra/disaggregation_LUH2.R b/scripts/output/extra/disaggregation_LUH2.R index 0d013240de..c394a94f6d 100644 --- a/scripts/output/extra/disaggregation_LUH2.R +++ b/scripts/output/extra/disaggregation_LUH2.R @@ -200,11 +200,15 @@ gc() b <- protectedArea(gdx,level = "grid",dir=outputdir) / dimSums(land_hr, dim=3) b[is.na(b)] <- 0 -luh2 <- data.frame(matrix(nrow=3,ncol=2)) +luh2 <- data.frame(matrix(nrow=7,ncol=2)) names(luh2) <- c("LUH2","MAgPIE") -luh2[1,] <- c("primf_prot","primforest") -luh2[2,] <- c("secdf_prot","secdforest") -luh2[3,] <- c("primn_secdn_prot","other") +luh2[1,] <- c("crop_prot","crop") +luh2[2,] <- c("past_prot","past") +luh2[3,] <- c("timber_prot","forestry") +luh2[4,] <- c("primf_prot","primforest") +luh2[5,] <- c("secdf_prot","secdforest") +luh2[6,] <- c("urban_prot","urban") +luh2[7,] <- c("primn_secdn_prot","other") b <- madrat::toolAggregate(b, luh2, from="MAgPIE", to="LUH2",dim = 3) gc() if(!file.exists(paste0(out_dir,"/LUH2_protected_area.nc"))){ @@ -216,69 +220,73 @@ gc() } ####### ONLY DYNAMIC FORESTRY ON############# - -#### Wood -land_lr <- madrat::toolAggregate(dimSums(land_hr,dim=3), map_file, from = "cell",to = "cluster") - -### Wood: Harvested Area -a <- harvested_area_timber(gdx,level = "cell") -b <- a / land_lr -b <- madrat::toolAggregate(b, map_file, from = "cluster",to = "cell") -luh2 <- data.frame(matrix(nrow=4,ncol=2)) -names(luh2) <- c("LUH2","MAgPIE") -luh2[1,] <- c("timber_harv","Forestry") -luh2[2,] <- c("primf_harv","Primary forest") -luh2[3,] <- c("secdf_harv","Secondary forest") -luh2[4,] <- c("primn_secdn_harv","Other land") -b <- madrat::toolAggregate(b, luh2, from="MAgPIE", to="LUH2",dim = 3) -gc() -if(!file.exists(paste0(out_dir,"/LUH2_wood_harvest_area.nc"))){ -b <- convertLUH2(b) -gc() -write.magpie(b,paste0(out_dir,"/LUH2_wood_harvest_area.nc"),comment = "unit: fraction of grid-cell area per year") -rm(a,b) -gc() -} - -#### Wood: Yields -a <- ForestYield(gdx,level="cell") -a_fix<- new.magpie(cells_and_regions=getCells(a),years=getYears(a), - names=getNames(a)) - -# BugFix in the mean time. Strange jump from ForestYield -a_fix[,1,]<-0 -a_fix[,-1,]<-setYears(a[,2100,,invert=TRUE],getYears(a_fix[,-1,])) -a[a>500]<-a_fix[a>500] -b <- madrat::toolAggregate(a, map_file, from = "cluster",to = "cell") -luh2 <- data.frame(matrix(nrow=4,ncol=2)) -names(luh2) <- c("LUH2","MAgPIE") -luh2[1,] <- c("timber_bioh","Forestry") -luh2[2,] <- c("primf_bioh","Primary forest") -luh2[3,] <- c("secdf_bioh","Secondary forest") -luh2[4,] <- c("primn_secdn_bioh","Other land") -b <- madrat::toolAggregate(b, luh2, from="MAgPIE", to="LUH2",dim = 3) -gc() -if(!file.exists(paste0(out_dir,"/LUH2_wood_harvest_yields.nc"))){ -b <- convertLUH2(b) -gc() -write.magpie(b,paste0(out_dir,"/LUH2_wood_harvest_yields.nc"),comment = "unit: m3 per ha per year") -rm(a,b) -gc() -} - -#### Wood: Harvested Biomass Product Split -b <- TimberProductionVolumetric(gdx,level = "cell",sumSource = FALSE,sumProduct = FALSE) -b <- dimSums(b,dim=3.1) -b <- b/dimSums(b,dim=3) -getNames(b) <- c("rndwd","fulwd") -b <- madrat::toolAggregate(b, map_file, from = "cluster",to = "cell") -if(!file.exists(paste0(out_dir,"/LUH2_wood_harvest_biomass_split.nc"))){ -b <- convertLUH2(b) -gc() -write.magpie(b,paste0(out_dir,"/LUH2_wood_harvest_biomass_split.nc"),comment = "unit: fraction of wood harvest biomass") -rm(b) -gc() -} +#check for dynamic foresty +if(!is.null(harvested_area_timber(gdx,level = "cell"))) { + message("Start forestry / timber reporting") + + #### Wood + land_lr <- madrat::toolAggregate(dimSums(land_hr,dim=3), map_file, from = "cell",to = "cluster") + + ### Wood: Harvested Area + a <- harvested_area_timber(gdx,level = "cell") + b <- a / land_lr + b <- madrat::toolAggregate(b, map_file, from = "cluster",to = "cell") + luh2 <- data.frame(matrix(nrow=4,ncol=2)) + names(luh2) <- c("LUH2","MAgPIE") + luh2[1,] <- c("timber_harv","Forestry") + luh2[2,] <- c("primf_harv","Primary forest") + luh2[3,] <- c("secdf_harv","Secondary forest") + luh2[4,] <- c("primn_secdn_harv","Other land") + b <- madrat::toolAggregate(b, luh2, from="MAgPIE", to="LUH2",dim = 3) + gc() + if(!file.exists(paste0(out_dir,"/LUH2_wood_harvest_area.nc"))){ + b <- convertLUH2(b) + gc() + write.magpie(b,paste0(out_dir,"/LUH2_wood_harvest_area.nc"),comment = "unit: fraction of grid-cell area per year") + rm(a,b) + gc() + } + + #### Wood: Yields + a <- ForestYield(gdx,level="cell") + a_fix<- new.magpie(cells_and_regions=getCells(a),years=getYears(a), + names=getNames(a)) + + # BugFix in the mean time. Strange jump from ForestYield + a_fix[,1,]<-0 + a_fix[,-1,]<-setYears(a[,2100,,invert=TRUE],getYears(a_fix[,-1,])) + a[a>500]<-a_fix[a>500] + b <- madrat::toolAggregate(a, map_file, from = "cluster",to = "cell") + luh2 <- data.frame(matrix(nrow=4,ncol=2)) + names(luh2) <- c("LUH2","MAgPIE") + luh2[1,] <- c("timber_bioh","Forestry") + luh2[2,] <- c("primf_bioh","Primary forest") + luh2[3,] <- c("secdf_bioh","Secondary forest") + luh2[4,] <- c("primn_secdn_bioh","Other land") + b <- madrat::toolAggregate(b, luh2, from="MAgPIE", to="LUH2",dim = 3) + gc() + if(!file.exists(paste0(out_dir,"/LUH2_wood_harvest_yields.nc"))){ + b <- convertLUH2(b) + gc() + write.magpie(b,paste0(out_dir,"/LUH2_wood_harvest_yields.nc"),comment = "unit: m3 per ha per year") + rm(a,b) + gc() + } + + #### Wood: Harvested Biomass Product Split + b <- TimberProductionVolumetric(gdx,level = "cell",sumSource = FALSE,sumProduct = FALSE) + b <- dimSums(b,dim=3.1) + b <- b/dimSums(b,dim=3) + getNames(b) <- c("rndwd","fulwd") + b <- madrat::toolAggregate(b, map_file, from = "cluster",to = "cell") + if(!file.exists(paste0(out_dir,"/LUH2_wood_harvest_biomass_split.nc"))){ + b <- convertLUH2(b) + gc() + write.magpie(b,paste0(out_dir,"/LUH2_wood_harvest_biomass_split.nc"),comment = "unit: fraction of wood harvest biomass") + rm(b) + gc() + } +} else warning("DYNAMIC FORESTRY was NOT active in this MAgPIE run. Therefore wood harvest variables cannot be report in LUH2 format.") ####### ONLY DYNAMIC FORESTRY ON############# From 1685f1218d24b94dc025410e665c04b08b26712c Mon Sep 17 00:00:00 2001 From: florianh Date: Thu, 10 Aug 2023 09:36:48 +0200 Subject: [PATCH 09/23] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4523f72d5d..eff6751992 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - ### fixed -- +- **scripts** fixed output/extra/disaggregation_LUH2.R ## [4.6.9] - 2023-07-27 From d95ceb244809d1a8355543919fd303f8f2bca36d Mon Sep 17 00:00:00 2001 From: florianh Date: Thu, 10 Aug 2023 09:45:06 +0200 Subject: [PATCH 10/23] merge with develop branch --- modules/14_yields/managementcalib_aug19/preloop.gms | 1 - modules/17_production/flexreg_apr16/declarations.gms | 2 +- modules/17_production/flexreg_apr16/presolve.gms | 4 +--- .../71_disagg_lvst/foragebased_aug18/presolve.gms | 12 ------------ .../71_disagg_lvst/foragebased_aug18/realization.gms | 1 - 5 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 modules/71_disagg_lvst/foragebased_aug18/presolve.gms diff --git a/modules/14_yields/managementcalib_aug19/preloop.gms b/modules/14_yields/managementcalib_aug19/preloop.gms index 005966b8b8..b674237a64 100644 --- a/modules/14_yields/managementcalib_aug19/preloop.gms +++ b/modules/14_yields/managementcalib_aug19/preloop.gms @@ -136,7 +136,6 @@ if ((s14_calib_ir2rf = 1), i14_yields_calib(t,j,knbe14,w); pm_yields_semi_calib(j,knbe14,w) = i14_yields_calib("y1995",j,knbe14,w); - pm_yields_semi_calib(j,"pasture",w) = i14_yields_calib("y1995",j,"pasture",w); ); *' @stop diff --git a/modules/17_production/flexreg_apr16/declarations.gms b/modules/17_production/flexreg_apr16/declarations.gms index 8187fd3fa9..235855f322 100644 --- a/modules/17_production/flexreg_apr16/declarations.gms +++ b/modules/17_production/flexreg_apr16/declarations.gms @@ -15,7 +15,7 @@ equations ; parameters -pm_prod_init(j,k) Production initialization for year 1995 (tDM per yr) +pm_prod_init(j,kcr) Production initialization for year 1995 (tDM per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### diff --git a/modules/17_production/flexreg_apr16/presolve.gms b/modules/17_production/flexreg_apr16/presolve.gms index c0def1bbc7..09413ece73 100644 --- a/modules/17_production/flexreg_apr16/presolve.gms +++ b/modules/17_production/flexreg_apr16/presolve.gms @@ -8,13 +8,11 @@ pm_prod_init(j,kcr)=sum(w,fm_croparea("y1995",j,w,kcr)*pm_yields_semi_calib(j,kcr,w)); -pm_prod_init(j,"pasture")=sum(w,pm_land_start(j,"past")*pm_yields_semi_calib(j,"pasture",w)); if (ord(t) = 1, $ifthen "%c17_prod_init%" == "on" -vm_prod.l(j,kve) = pm_prod_init(j,kve); -vm_prod_reg.l(i,kve) = sum(cell(i,j), pm_prod_init(j,kve)); +vm_prod.l(j,kcr) = pm_prod_init(j,kcr); $endif ); diff --git a/modules/71_disagg_lvst/foragebased_aug18/presolve.gms b/modules/71_disagg_lvst/foragebased_aug18/presolve.gms deleted file mode 100644 index 70d4ee4a61..0000000000 --- a/modules/71_disagg_lvst/foragebased_aug18/presolve.gms +++ /dev/null @@ -1,12 +0,0 @@ -*** | (C) 2008-2023 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - -i71_forage_cell_prod_share(j,kforage) = -* vm_prod.l(j,kforage) / (sum(cell(i,j),sum(cell2(i,j3), vm_prod.l(j3,kforage))) + 10**(-6)); - vm_prod.l(j,kforage) / (sum(cell(i,j), vm_prod_reg.l(i,kforage)) + 10**(-6)); - -* Note that $10^{-6}$ is required to avoid division by zero. diff --git a/modules/71_disagg_lvst/foragebased_aug18/realization.gms b/modules/71_disagg_lvst/foragebased_aug18/realization.gms index 5d59ae546a..11effc8e81 100644 --- a/modules/71_disagg_lvst/foragebased_aug18/realization.gms +++ b/modules/71_disagg_lvst/foragebased_aug18/realization.gms @@ -26,6 +26,5 @@ $Ifi "%phase%" == "declarations" $include "./modules/71_disagg_lvst/foragebased_ $Ifi "%phase%" == "equations" $include "./modules/71_disagg_lvst/foragebased_aug18/equations.gms" $Ifi "%phase%" == "scaling" $include "./modules/71_disagg_lvst/foragebased_aug18/scaling.gms" $Ifi "%phase%" == "preloop" $include "./modules/71_disagg_lvst/foragebased_aug18/preloop.gms" -$Ifi "%phase%" == "presolve" $include "./modules/71_disagg_lvst/foragebased_aug18/presolve.gms" $Ifi "%phase%" == "postsolve" $include "./modules/71_disagg_lvst/foragebased_aug18/postsolve.gms" *######################## R SECTION END (PHASES) ############################### From 227449fad92434d799db4e260d3ea0f120bab776 Mon Sep 17 00:00:00 2001 From: florianh Date: Thu, 10 Aug 2023 10:03:31 +0200 Subject: [PATCH 11/23] changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eff6751992..1cadd2eea2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - ### fixed -- **scripts** fixed output/extra/disaggregation_LUH2.R +- **scripts** fixed output/extra/disaggregation_LUH2.R. The script was not working any more because magpie4::protectedArea was changed to return protected area for all land types. Moreover, the script now also works for runs without dynamic forestry (default run) but with a warning message. ## [4.6.9] - 2023-07-27 From c147126a504e5f1b200760c5e660b0902f6adda6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20F=C3=BChrlich?= Date: Fri, 11 Aug 2023 11:24:22 +0200 Subject: [PATCH 12/23] changelog --- CHANGELOG.md | 2 +- output.R | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4523f72d5d..b14f9bf5c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ## [Unreleased] ### changed -- +- **scripts** output.R is now faster, because it no longer searches runfolder renvs for full.gms files ### added - diff --git a/output.R b/output.R index 24eec3ca94..3e3ef4e865 100644 --- a/output.R +++ b/output.R @@ -35,7 +35,8 @@ library(gms) runOutputs <- function(comp=NULL, output=NULL, outputdir=NULL, submit=NULL) { choose_folder <- function(title="Please choose a folder") { # try to use find because it is significantly quicker than list.dirs - tmp <- try(system("find ./output -path './output/*/renv' -prune -o -name 'full.gms'", intern=TRUE, ignore.stderr = TRUE), silent=TRUE) + tmp <- try(system("find ./output -path './output/*/renv' -prune -o -name 'full.gms'", + intern=TRUE, ignore.stderr = TRUE), silent=TRUE) if("try-error" %in% class(tmp) || length(tmp)==0) { tmp <- base::list.dirs("./output/",recursive=TRUE) dirs <- NULL From 5e2f0e31f0ae75245d230c3eb7be5d5ca43bedad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20F=C3=BChrlich?= Date: Fri, 11 Aug 2023 11:31:40 +0200 Subject: [PATCH 13/23] faster github action --- .github/workflows/test-code.yaml | 5 +++-- CHANGELOG.md | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-code.yaml b/.github/workflows/test-code.yaml index 2a3831d0ab..16a3ce0a0c 100644 --- a/.github/workflows/test-code.yaml +++ b/.github/workflows/test-code.yaml @@ -18,14 +18,15 @@ jobs: env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Remove .Rprofile run: rm .Rprofile - uses: r-lib/actions/setup-r@v2 with: - extra-repositories: https://cloud.r-project.org https://rse.pik-potsdam.de/r/packages/ + use-public-rspm: true + extra-repositories: "https://rse.pik-potsdam.de/r/packages" - name: pre-commit Hook run: source(".githooks/pre-commit") diff --git a/CHANGELOG.md b/CHANGELOG.md index b14f9bf5c8..611a690337 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### changed - **scripts** output.R is now faster, because it no longer searches runfolder renvs for full.gms files +- **GitHub action** the github action is now faster, because it installs binary packages from Posit Package Manager ### added - From 961f9bea3f6896b5f447347e65e79b7e427b216e Mon Sep 17 00:00:00 2001 From: pvjeetze Date: Sat, 12 Aug 2023 00:32:35 +0200 Subject: [PATCH 14/23] disaggregation of land conservation --- DESCRIPTION | 2 +- scripts/output/extra/disaggregation.R | 110 ++++++++++++++++++-------- 2 files changed, 79 insertions(+), 33 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index e23f4d8f05..d1e1fc0d4e 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,7 +17,7 @@ Imports: iamc, lucode2 (>= 0.36.0), luplot, - luscale (>= 2.27.4), + luscale (>= 2.27.8), lusweave, m4fsdp, madrat, diff --git a/scripts/output/extra/disaggregation.R b/scripts/output/extra/disaggregation.R index 41c2438ab2..1ddf644b92 100644 --- a/scripts/output/extra/disaggregation.R +++ b/scripts/output/extra/disaggregation.R @@ -28,12 +28,15 @@ map_file <- Sys.glob(file.path(outputdir, "clustermap_*.rds")) gdx <- file.path(outputdir, "fulldata.gdx") land_hr_file <- file.path(outputdir, "avl_land_full_t_0.5.mz") urban_land_hr_file <- file.path(outputdir, "f34_urbanland_0.5.mz") +wdpa_hr_file <- file.path(outputdir, "wdpa_baseline_0.5.mz") +consv_prio_hr_file <- file.path(outputdir, "consv_prio_areas_0.5.mz") +land_consv_hr_out_file <- file.path(outputdir, "cell.conservation_land_0.5.mz") land_hr_out_file <- file.path(outputdir, "cell.land_0.5.mz") land_hr_share_out_file <- file.path(outputdir, "cell.land_0.5_share.mz") croparea_hr_share_out_file <- file.path(outputdir, "cell.croparea_0.5_share.mz") land_hr_split_file <- file.path(outputdir, "cell.land_split_0.5.mz") land_hr_shr_split_file <- file.path(outputdir, "cell.land_split_0.5_share.mz") -luh_side_layers <- file.path(outputdir, "luh2_side_layers_0.5.mz") +luh_side_layers <- file.path(outputdir, "luh2_side_layers_0.5.mz") bii_hr_out_file <- file.path(outputdir, "cell.bii_0.5.mz") cfg <- gms::loadConfig(file.path(outputdir, "config.yml")) @@ -119,7 +122,9 @@ if (length(map_file) > 1) { # Prepare data for disaggregation # ======================================== +# ---------------------- # Load input data +# ---------------------- land_ini_lr <- readGDX(gdx, "f10_land", "f_land", format = "first_found")[, "y1995", ] land_lr <- land(gdx, sum = FALSE, level = "cell") land_ini_hr <- read.magpie(land_hr_file)[, "y1995", ] @@ -152,7 +157,9 @@ if (any(land_ini_hr < 0)) { land_ini_hr[which(land_ini_hr < 0, arr.ind = T)] <- 0 } -### Read in hr urban land +# ----------------------------- +# Read in hr urban land +# ----------------------------- if (cfg$gms$urban == "exo_nov21") { urban_land_hr <- read.magpie(urban_land_hr_file) ssp <- cfg$gms$c34_urban_scenario @@ -162,37 +169,77 @@ if (cfg$gms$urban == "exo_nov21") { urban_land_hr <- "static" } -### Get land conservation data -wdpa_hr <- NULL -if (file.exists(file.path(outputdir, "wdpa_baseline_0.5.mz"))) { - wdpa_hr <- file.path(outputdir, "wdpa_baseline_0.5.mz") -} -consv_prio_hr <- NULL -if (!all(c(cfg$gms$c22_protect_scenario, cfg$gms$c22_protect_scenario_noselect) %in% "none")) { - if (file.exists(file.path(outputdir, "consv_prio_areas_0.5.mz"))) { - consv_prio_all <- read.magpie(file.path(outputdir, "consv_prio_areas_0.5.mz")) - consv_prio_hr <- new.magpie( - cells = getCells(consv_prio_all), - names = getNames(consv_prio_all, dim = 2), fill = 0 - ) - iso <- readGDX(gdx, "iso") - consv_iso <- readGDX(gdx, "policy_countries22") - consv_iso <- consv_iso[consv_iso %in% getItems(consv_prio_all, dim = 1.1)] - consv_select <- cfg$gms$c22_protect_scenario - consv_noselect <- cfg$gms$c22_protect_scenario_noselect - - if (consv_noselect != "none") { - consv_prio_hr <- collapseDim(consv_prio_all[, , consv_noselect], dim = 3.1) - } - if (consv_select != "none") { - consv_prio_hr[consv_iso, , ] <- collapseDim(consv_prio_all[consv_iso, , consv_select], dim = 3.1) - } else if (consv_select == "none") { - consv_prio_hr[consv_iso, , ] <- 0 +# ---------------------------------------- +# Prepare land conservation data +# ---------------------------------------- + +land_consv_hr <- NULL +if (file.exists(wdpa_hr_file)) { + wdpa_hr <- read.magpie(wdpa_hr_file) + + # create full time series + land_consv_hr <- new.magpie(getCells(wdpa_hr), getYears(land_lr), getNames(wdpa_hr), fill = wdpa_hr[, nyears(wdpa_hr), ]) + land_consv_hr[, getYears(wdpa_hr), ] <- wdpa_hr + + if (!all(c(cfg$gms$c22_protect_scenario, cfg$gms$c22_protect_scenario_noselect) %in% "none")) { + if (file.exists(consv_prio_hr_file)) { + consv_prio_all <- read.magpie(consv_prio_hr_file) + consv_prio_hr <- new.magpie( + cells = getCells(consv_prio_all), + names = getNames(consv_prio_all, dim = 2), fill = 0 + ) + iso <- readGDX(gdx, "iso") + consv_iso <- readGDX(gdx, "policy_countries22") + consv_iso <- consv_iso[consv_iso %in% getItems(consv_prio_all, dim = 1.1)] + consv_select <- cfg$gms$c22_protect_scenario + consv_noselect <- cfg$gms$c22_protect_scenario_noselect + + if (consv_noselect != "none") { + consv_prio_hr <- collapseDim(consv_prio_all[, , consv_noselect], dim = 3.1) + } + if (consv_select != "none") { + consv_prio_hr[consv_iso, , ] <- collapseDim(consv_prio_all[consv_iso, , consv_select], dim = 3.1) + } else if (consv_select == "none") { + consv_prio_hr[consv_iso, , ] <- 0 + } + + consv_fader <- readGDX(gdx, "p22_conservation_fader", format = "first_found") + consv_prio_hr <- consv_prio_hr * consv_fader[, getYears(land_consv_hr), ] + + # add conservation priority areas + land_consv_hr <- (land_consv_hr + consv_prio_hr) + } else { + warning(paste( + "Future land conservation used in MAgPIE run but high resolution", + "conservation priority data for disaggregation not found." + )) } } + + # Due to internal constraints and compensation (e.g. NDC forest conservation) + # the actual land conservation can sometimes be smaller than the land + # conservation in the input data (this can especially happen also if + # land restoration is switched off). Therefore a scaling is applied here + land_consv_lr <- readGDX(gdx, "pm_land_conservation", react = "silent") + if (!is.null(land_consv_lr)) { + land_consv_lr <- dimSums(land_consv_lr, dim = 3) + + land_consv_hr_agg <- toolAggregate(dimSums(land_consv_hr, dim = 3), map_file, from = "cell", to = "cluster") + consv_scaling <- land_consv_lr / land_consv_hr_agg + consv_scaling[is.na(consv_scaling) | is.infinite(consv_scaling)] <- 1 + consv_scaling <- toolAggregate(consv_scaling, map_file, from = "cluster", to = "cell") + land_consv_hr <- consv_scaling * land_consv_hr + } + + .writeDisagg(land_consv_hr, land_consv_hr_out_file, + comment = "unit: Mha per grid-cell", + message = "Write outputs cell.conservation_land" + ) } -### Account for country-specific SNV shares in post-processing +# ------------------------------------------------------------- +# Account for country-specific SNV shares in post-processing +# ------------------------------------------------------------- iso <- readGDX(gdx, "iso") snv_pol_iso <- readGDX(gdx, "policy_countries30") snv_pol_select <- readGDX(gdx, "s30_snv_shr", "s30_set_aside_shr") @@ -233,8 +280,7 @@ land_hr <- interpolateAvlCroplandWeighted( snv_pol_shr = snv_pol_shr, snv_pol_fader = snv_pol_fader, urban_land_hr = urban_land_hr, - wdpa_hr = wdpa_hr, - consv_prio_hr = consv_prio_hr + land_consv_hr = land_consv_hr ) # Write output @@ -375,7 +421,7 @@ if (grepl("grass", cfg$gms$past)) { } # Sort and rename -land_ini_hr <- land_ini_hr[,,getNames(land_ini_lr)] +land_ini_hr <- land_ini_hr[, , getNames(land_ini_lr)] getSets(land_ini_hr)["d3.1"] <- "land" # Disaggregate BII values to high resolution From 3bd4d99bf37dbf624079b3e1f6155df726b735db Mon Sep 17 00:00:00 2001 From: florianh Date: Sat, 12 Aug 2023 23:05:12 +0200 Subject: [PATCH 15/23] bugfix --- scripts/output/extra/disaggregation.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/output/extra/disaggregation.R b/scripts/output/extra/disaggregation.R index 1ddf644b92..d17b8e62ad 100644 --- a/scripts/output/extra/disaggregation.R +++ b/scripts/output/extra/disaggregation.R @@ -438,8 +438,7 @@ land_bii_hr <- interpolateAvlCroplandWeighted( snv_pol_shr = snv_pol_shr, snv_pol_fader = snv_pol_fader, urban_land_hr = urban_land_hr, - wdpa_hr = wdpa_hr, - consv_prio_hr = consv_prio_hr, + land_consv_hr = land_consv_hr, unit = "share" ) From af93872b3edc804b3a85a827d9b44a929e6cb739 Mon Sep 17 00:00:00 2001 From: pvjeetze Date: Sun, 13 Aug 2023 02:09:06 +0200 Subject: [PATCH 16/23] reworked how land conservation is calculated in extra/disaggregation.R --- DESCRIPTION | 2 +- scripts/output/extra/disaggregation.R | 72 +++------------------------ 2 files changed, 9 insertions(+), 65 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d1e1fc0d4e..e581d4b690 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,7 +17,7 @@ Imports: iamc, lucode2 (>= 0.36.0), luplot, - luscale (>= 2.27.8), + luscale (>= 2.27.9), lusweave, m4fsdp, madrat, diff --git a/scripts/output/extra/disaggregation.R b/scripts/output/extra/disaggregation.R index d17b8e62ad..8a44b9e92d 100644 --- a/scripts/output/extra/disaggregation.R +++ b/scripts/output/extra/disaggregation.R @@ -29,7 +29,6 @@ gdx <- file.path(outputdir, "fulldata.gdx") land_hr_file <- file.path(outputdir, "avl_land_full_t_0.5.mz") urban_land_hr_file <- file.path(outputdir, "f34_urbanland_0.5.mz") wdpa_hr_file <- file.path(outputdir, "wdpa_baseline_0.5.mz") -consv_prio_hr_file <- file.path(outputdir, "consv_prio_areas_0.5.mz") land_consv_hr_out_file <- file.path(outputdir, "cell.conservation_land_0.5.mz") land_hr_out_file <- file.path(outputdir, "cell.land_0.5.mz") land_hr_share_out_file <- file.path(outputdir, "cell.land_0.5_share.mz") @@ -175,62 +174,7 @@ if (cfg$gms$urban == "exo_nov21") { land_consv_hr <- NULL if (file.exists(wdpa_hr_file)) { - wdpa_hr <- read.magpie(wdpa_hr_file) - - # create full time series - land_consv_hr <- new.magpie(getCells(wdpa_hr), getYears(land_lr), getNames(wdpa_hr), fill = wdpa_hr[, nyears(wdpa_hr), ]) - land_consv_hr[, getYears(wdpa_hr), ] <- wdpa_hr - - if (!all(c(cfg$gms$c22_protect_scenario, cfg$gms$c22_protect_scenario_noselect) %in% "none")) { - if (file.exists(consv_prio_hr_file)) { - consv_prio_all <- read.magpie(consv_prio_hr_file) - consv_prio_hr <- new.magpie( - cells = getCells(consv_prio_all), - names = getNames(consv_prio_all, dim = 2), fill = 0 - ) - iso <- readGDX(gdx, "iso") - consv_iso <- readGDX(gdx, "policy_countries22") - consv_iso <- consv_iso[consv_iso %in% getItems(consv_prio_all, dim = 1.1)] - consv_select <- cfg$gms$c22_protect_scenario - consv_noselect <- cfg$gms$c22_protect_scenario_noselect - - if (consv_noselect != "none") { - consv_prio_hr <- collapseDim(consv_prio_all[, , consv_noselect], dim = 3.1) - } - if (consv_select != "none") { - consv_prio_hr[consv_iso, , ] <- collapseDim(consv_prio_all[consv_iso, , consv_select], dim = 3.1) - } else if (consv_select == "none") { - consv_prio_hr[consv_iso, , ] <- 0 - } - - consv_fader <- readGDX(gdx, "p22_conservation_fader", format = "first_found") - consv_prio_hr <- consv_prio_hr * consv_fader[, getYears(land_consv_hr), ] - - # add conservation priority areas - land_consv_hr <- (land_consv_hr + consv_prio_hr) - } else { - warning(paste( - "Future land conservation used in MAgPIE run but high resolution", - "conservation priority data for disaggregation not found." - )) - } - } - - # Due to internal constraints and compensation (e.g. NDC forest conservation) - # the actual land conservation can sometimes be smaller than the land - # conservation in the input data (this can especially happen also if - # land restoration is switched off). Therefore a scaling is applied here - land_consv_lr <- readGDX(gdx, "pm_land_conservation", react = "silent") - if (!is.null(land_consv_lr)) { - land_consv_lr <- dimSums(land_consv_lr, dim = 3) - - land_consv_hr_agg <- toolAggregate(dimSums(land_consv_hr, dim = 3), map_file, from = "cell", to = "cluster") - consv_scaling <- land_consv_lr / land_consv_hr_agg - consv_scaling[is.na(consv_scaling) | is.infinite(consv_scaling)] <- 1 - consv_scaling <- toolAggregate(consv_scaling, map_file, from = "cluster", to = "cell") - land_consv_hr <- consv_scaling * land_consv_hr - } - + land_consv_hr <- protectedArea(gdx, cfg, level = "grid", dir = outputdir) .writeDisagg(land_consv_hr, land_consv_hr_out_file, comment = "unit: Mha per grid-cell", message = "Write outputs cell.conservation_land" @@ -274,13 +218,13 @@ land_hr <- interpolateAvlCroplandWeighted( x = land_lr, x_ini_lr = land_ini_lr, x_ini_hr = land_ini_hr, - avl_cropland_hr = avl_cropland_hr, map = map_file, + avl_cropland_hr = avl_cropland_hr, marginal_land = marginal_land, - snv_pol_shr = snv_pol_shr, - snv_pol_fader = snv_pol_fader, urban_land_hr = urban_land_hr, - land_consv_hr = land_consv_hr + land_consv_hr = land_consv_hr, + snv_pol_shr = snv_pol_shr, + snv_pol_fader = snv_pol_fader ) # Write output @@ -432,13 +376,13 @@ land_bii_hr <- interpolateAvlCroplandWeighted( x = land_lr, x_ini_lr = land_ini_lr, x_ini_hr = land_ini_hr, - avl_cropland_hr = avl_cropland_hr, map = map_file, + avl_cropland_hr = avl_cropland_hr, marginal_land = marginal_land, - snv_pol_shr = snv_pol_shr, - snv_pol_fader = snv_pol_fader, urban_land_hr = urban_land_hr, land_consv_hr = land_consv_hr, + snv_pol_shr = snv_pol_shr, + snv_pol_fader = snv_pol_fader, unit = "share" ) From 5fd2cccf0527238e50185312adf8f1342218e418 Mon Sep 17 00:00:00 2001 From: florianh Date: Sun, 13 Aug 2023 09:17:05 +0200 Subject: [PATCH 17/23] bugfix --- scripts/output/extra/disaggregation_LUH2.R | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/output/extra/disaggregation_LUH2.R b/scripts/output/extra/disaggregation_LUH2.R index c394a94f6d..dba0a2affc 100644 --- a/scripts/output/extra/disaggregation_LUH2.R +++ b/scripts/output/extra/disaggregation_LUH2.R @@ -396,6 +396,7 @@ a[crop_hr tN/ha; convert from tN/ha to kgN/ha: tN/ha*1000kg/t = 1000 kgN/ha a <- (a/crop_hr)*1000 +x <- NULL if(!file.exists(paste0(out_dir,"/LUH2_Nitrogen_fertilizer.nc"))){ x <- convertLUH2(clean_magpie(collapseNames(a[,,"fertilizer"],collapsedim = 3.1))) From 84059bbb9e0dec4f28156c1cfab6121212c40542 Mon Sep 17 00:00:00 2001 From: pvjeetze Date: Mon, 14 Aug 2023 08:06:46 +0200 Subject: [PATCH 18/23] minor rework of extra/disaggregation.R --- scripts/output/extra/disaggregation.R | 81 +++++++++++++++++++++++++-- 1 file changed, 77 insertions(+), 4 deletions(-) diff --git a/scripts/output/extra/disaggregation.R b/scripts/output/extra/disaggregation.R index 8a44b9e92d..ae5adb26b2 100644 --- a/scripts/output/extra/disaggregation.R +++ b/scripts/output/extra/disaggregation.R @@ -29,6 +29,7 @@ gdx <- file.path(outputdir, "fulldata.gdx") land_hr_file <- file.path(outputdir, "avl_land_full_t_0.5.mz") urban_land_hr_file <- file.path(outputdir, "f34_urbanland_0.5.mz") wdpa_hr_file <- file.path(outputdir, "wdpa_baseline_0.5.mz") +consv_prio_hr_file <- file.path(outputdir, "consv_prio_areas_0.5.mz") land_consv_hr_out_file <- file.path(outputdir, "cell.conservation_land_0.5.mz") land_hr_out_file <- file.path(outputdir, "cell.land_0.5.mz") land_hr_share_out_file <- file.path(outputdir, "cell.land_0.5_share.mz") @@ -58,7 +59,7 @@ if (length(map_file) > 1) { write.magpie(x, sub(".mz", ".nc", file), comment = comment, verbose = FALSE) } -.dissagcrop <- function(gdx, land_hr, map) { +.dissagcrop <- function(gdx, land_hr, map_file) { area <- croparea(gdx, level = "cell", products = "kcr", product_aggr = FALSE, water_aggr = FALSE @@ -71,11 +72,81 @@ if (length(map_file) > 1) { crop_shr <- setNames(crop_shr[, getYears(area_shr), "crop"], NULL) # calculate crop area as share of total cell area - area_shr_hr <- madrat::toolAggregate(area_shr, map, to = "cell") * crop_shr + area_shr_hr <- madrat::toolAggregate(area_shr, map_file, to = "cell") * crop_shr return(area_shr_hr) } -.dissagBII <- function(gdx, map, dir) { +.dissagLandConsv <- function(gdx, cfg, map_file, wdpa_hr_file, consv_prio_hr_file) { + land_consv_lr <- readGDX(gdx, "pm_land_conservation", react = "silent") + wdpa_hr <- read.magpie(wdpa_hr_file) + map <- readRDS(map_file) + + # create full time series + land_consv_hr <- new.magpie(map[, "cell"], getYears(land_consv_lr), getNames(wdpa_hr)) + land_consv_hr[, getYears(land_consv_hr), ] <- wdpa_hr[, nyears(wdpa_hr), ] + land_consv_hr[, getYears(wdpa_hr), ] <- wdpa_hr + + if (!all(c(cfg$gms$c22_protect_scenario, cfg$gms$c22_protect_scenario_noselect) %in% "none")) { + if (file.exists(consv_prio_hr_file)) { + consv_prio_all <- read.magpie(consv_prio_hr_file) + consv_prio_hr <- new.magpie( + cells_and_regions = map[, "cell"], + names = getNames(consv_prio_all, dim = 2), fill = 0 + ) + iso <- readGDX(gdx, "iso") + consv_iso <- readGDX(gdx, "policy_countries22") + consv_iso <- consv_iso[consv_iso %in% getItems(consv_prio_all, dim = 1.1)] + consv_select <- cfg$gms$c22_protect_scenario + consv_noselect <- cfg$gms$c22_protect_scenario_noselect + + if (consv_noselect != "none") { + consv_prio_hr <- collapseDim(consv_prio_all[, , consv_noselect], dim = 3.1) + } + if (consv_select != "none") { + consv_prio_hr[consv_iso, , ] <- collapseDim(consv_prio_all[consv_iso, , consv_select], dim = 3.1) + } else if (consv_select == "none") { + consv_prio_hr[consv_iso, , ] <- 0 + } + # future conservation only pertains to natveg + consv_prio_hr[, , c("crop", "past", "forestry", "urban")] <- 0 + consv_fader <- readGDX(gdx, "p22_conservation_fader", format = "first_found") + consv_prio_hr <- consv_prio_hr * consv_fader[, getYears(land_consv_hr), ] + + # add conservation priority areas + land_consv_hr <- (land_consv_hr + consv_prio_hr) + } else { + warning(paste( + "Future land conservation used in MAgPIE run but high resolution", + "conservation priority data for disaggregation not found." + )) + } + } + # Due to internal constraints and compensation (e.g. NDC forest conservation) + # the actual land conservation can sometimes be smaller than the land + # conservation in the input data (this can especially happen also if + # land restoration is switched off). Therefore a scaling is applied here separately + # for grassland and natural vegetation + natveg <- c("primforest", "secdforest", "other") + consv_sum_lr <- mbind( + dimSums(land_consv_lr[, , "past"], 3.2), + setNames(dimSums(land_consv_lr[, , natveg], dim = 3), "natveg") + ) + consv_sum_hr_agg <- mbind( + toolAggregate(land_consv_hr[, , "past"], map, from = "cell", to = "cluster"), + toolAggregate(setNames(dimSums(land_consv_hr[, , natveg], dim = 3), "natveg"), + map, + from = "cell", to = "cluster" + ) + ) + consv_scaling <- consv_sum_lr / consv_sum_hr_agg + consv_scaling[is.na(consv_scaling) | is.infinite(consv_scaling)] <- 1 + consv_scaling <- toolAggregate(consv_scaling, map, from = "cluster", to = "cell") + land_consv_hr[, , "past"] <- consv_scaling[, , "past"] * land_consv_hr[, , "past"] + land_consv_hr[, , natveg] <- consv_scaling[, , "natveg"] * land_consv_hr[, , natveg] + return(land_consv_hr) +} + +.dissagBII <- function(gdx, map_file, dir) { # Biodiversity intactness indicator (BII) at cluster level bii_lr <- BII(gdx, file = NULL, level = "cell", mode = "auto", landClass = "all", @@ -174,7 +245,9 @@ if (cfg$gms$urban == "exo_nov21") { land_consv_hr <- NULL if (file.exists(wdpa_hr_file)) { - land_consv_hr <- protectedArea(gdx, cfg, level = "grid", dir = outputdir) + land_consv_hr <- .dissagLandConsv(gdx, cfg, map_file, wdpa_hr_file, consv_prio_hr_file) + + # Write gridded conservation land .writeDisagg(land_consv_hr, land_consv_hr_out_file, comment = "unit: Mha per grid-cell", message = "Write outputs cell.conservation_land" From 159a064444990f22e03a660e2735efedfad82c59 Mon Sep 17 00:00:00 2001 From: Jan Philipp Dietrich Date: Wed, 16 Aug 2023 13:53:34 +0200 Subject: [PATCH 19/23] bugfix in output.R --- output.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output.R b/output.R index 3e3ef4e865..440b6d65d5 100644 --- a/output.R +++ b/output.R @@ -64,7 +64,7 @@ runOutputs <- function(comp=NULL, output=NULL, outputdir=NULL, submit=NULL) { } identifier <- tmp # PATTERN - if(length(identifier==1) && identifier==(length(dirs)+1)){ + if(length(identifier) == 1 && identifier == length(dirs) + 1) { cat("\nInsert the search pattern or the regular expression: ") pattern <- gms::getLine() id <- grep(pattern=pattern, dirs[-1], perl=TRUE) From 1c6a9d0d9f48602803649ecdce57c7f6125c22b8 Mon Sep 17 00:00:00 2001 From: Jan Philipp Dietrich Date: Wed, 16 Aug 2023 13:56:32 +0200 Subject: [PATCH 20/23] updated CHANGELOG --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8bb833e3a..4e5e46ea52 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,7 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### fixed - **scripts** fixed output/extra/disaggregation_LUH2.R. The script was not working any more because magpie4::protectedArea was changed to return protected area for all land types. Moreover, the script now also works for runs without dynamic forestry (default run) but with a warning message. - +- **scripts** fixed erronoeous if clause in output.R ## [4.6.9] - 2023-07-27 From e40aae556695561f3ce2053a49c59dc8beb3f98b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20F=C3=BChrlich?= Date: Wed, 16 Aug 2023 14:40:29 +0200 Subject: [PATCH 21/23] magpie release 4.6.10 --- .zenodo.json | 4 ++-- CHANGELOG.md | 13 ++++--------- CITATION.cff | 4 ++-- README.md | 6 +++--- 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index d04a6a0a64..b6d04973ab 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "MAgPIE - An Open Source land-use modeling framework", - "version": "4.6.9dev", + "version": "4.6.10", "creators": [ { "name": "Dietrich, Jan Philipp", @@ -109,5 +109,5 @@ "license": { "id": "AGPL-3.0-or-later" }, - "publication_date": "2023-07-27" + "publication_date": "2023-08-16" } diff --git a/CHANGELOG.md b/CHANGELOG.md index f8bb833e3a..bc8e38335b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,19 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [Unreleased] +## [4.6.10] - 2023-08-16 ### changed - **config** update preprocessing to newest input data v4.88 with new transport costs +- **GitHub action** the github action is now faster, because it installs binary packages from Posit Package Manager - **scenario_config.csv** update preprocessing to newest input data v4.88 - **scripts** output.R is now faster, because it no longer searches runfolder renvs for full.gms files -- **GitHub action** the github action is now faster, because it installs binary packages from Posit Package Manager - -### added -- - -### removed -- ### fixed - **scripts** fixed output/extra/disaggregation_LUH2.R. The script was not working any more because magpie4::protectedArea was changed to return protected area for all land types. Moreover, the script now also works for runs without dynamic forestry (default run) but with a warning message. @@ -755,7 +749,8 @@ This release version is focussed on consistency between the MAgPIE setup and the First open source release of the framework. See [MAgPIE 4.0 paper](https://doi.org/10.5194/gmd-12-1299-2019) for more information. -[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.6.9...develop +[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.6.10...develop +[4.6.10]: https://github.com/magpiemodel/magpie/compare/v4.6.9...v4.6.10 [4.6.9]: https://github.com/magpiemodel/magpie/compare/v4.6.8...v4.6.9 [4.6.8]: https://github.com/magpiemodel/magpie/compare/v4.6.7...v4.6.8 [4.6.7]: https://github.com/magpiemodel/magpie/compare/v4.6.6...v4.6.7 diff --git a/CITATION.cff b/CITATION.cff index 8a4be0b247..6ea5a354d0 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -125,8 +125,8 @@ authors: email: popp@pik-potsdam.de title: MAgPIE - An Open Source land-use modeling framework -version: 4.6.9dev -date-released: 2023-07-27 +version: 4.6.10 +date-released: 2023-08-16 repository-code: https://github.com/magpiemodel/magpie keywords: - landuse diff --git a/README.md b/README.md index 9a13bf8260..f6321100fa 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ https://www.pik-potsdam.de/research/projects/activities/land-use-modelling/magpi A framework description paper has been published in Geoscientific Model Development (GMD): https://doi.org/10.5194/gmd-12-1299-2019 -The model documentation for version 4.6.9 can be found at -https://rse.pik-potsdam.de/doc/magpie/4.6.9/ +The model documentation for version 4.6.10 can be found at +https://rse.pik-potsdam.de/doc/magpie/4.6.10/ A most recent version of the documentation can also be extracted from the model source code via the R package goxygen @@ -188,7 +188,7 @@ magpie@pik-potsdam.de Please contact magpie@pik-potsdam.de ## CITATION -See file CITATION.cff or the [How-to-Cite section](https://rse.pik-potsdam.de/doc/magpie/4.6.9/#how-to-cite) in the model documentation for information how to cite the model. +See file CITATION.cff or the [How-to-Cite section](https://rse.pik-potsdam.de/doc/magpie/4.6.10/#how-to-cite) in the model documentation for information how to cite the model. ## AUTHORS See list of authors in CITATION.cff From 340ae1cb24f1312dc924de3e25c96aebb0c3a3a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20F=C3=BChrlich?= Date: Wed, 16 Aug 2023 14:54:28 +0200 Subject: [PATCH 22/23] Revert "magpie release 4.6.10" This reverts commit e40aae556695561f3ce2053a49c59dc8beb3f98b. --- .zenodo.json | 4 ++-- CHANGELOG.md | 13 +++++++++---- CITATION.cff | 4 ++-- README.md | 6 +++--- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index b6d04973ab..d04a6a0a64 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "MAgPIE - An Open Source land-use modeling framework", - "version": "4.6.10", + "version": "4.6.9dev", "creators": [ { "name": "Dietrich, Jan Philipp", @@ -109,5 +109,5 @@ "license": { "id": "AGPL-3.0-or-later" }, - "publication_date": "2023-08-16" + "publication_date": "2023-07-27" } diff --git a/CHANGELOG.md b/CHANGELOG.md index bc8e38335b..f8bb833e3a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [4.6.10] - 2023-08-16 +## [Unreleased] ### changed - **config** update preprocessing to newest input data v4.88 with new transport costs -- **GitHub action** the github action is now faster, because it installs binary packages from Posit Package Manager - **scenario_config.csv** update preprocessing to newest input data v4.88 - **scripts** output.R is now faster, because it no longer searches runfolder renvs for full.gms files +- **GitHub action** the github action is now faster, because it installs binary packages from Posit Package Manager + +### added +- + +### removed +- ### fixed - **scripts** fixed output/extra/disaggregation_LUH2.R. The script was not working any more because magpie4::protectedArea was changed to return protected area for all land types. Moreover, the script now also works for runs without dynamic forestry (default run) but with a warning message. @@ -749,8 +755,7 @@ This release version is focussed on consistency between the MAgPIE setup and the First open source release of the framework. See [MAgPIE 4.0 paper](https://doi.org/10.5194/gmd-12-1299-2019) for more information. -[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.6.10...develop -[4.6.10]: https://github.com/magpiemodel/magpie/compare/v4.6.9...v4.6.10 +[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.6.9...develop [4.6.9]: https://github.com/magpiemodel/magpie/compare/v4.6.8...v4.6.9 [4.6.8]: https://github.com/magpiemodel/magpie/compare/v4.6.7...v4.6.8 [4.6.7]: https://github.com/magpiemodel/magpie/compare/v4.6.6...v4.6.7 diff --git a/CITATION.cff b/CITATION.cff index 6ea5a354d0..8a4be0b247 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -125,8 +125,8 @@ authors: email: popp@pik-potsdam.de title: MAgPIE - An Open Source land-use modeling framework -version: 4.6.10 -date-released: 2023-08-16 +version: 4.6.9dev +date-released: 2023-07-27 repository-code: https://github.com/magpiemodel/magpie keywords: - landuse diff --git a/README.md b/README.md index f6321100fa..9a13bf8260 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ https://www.pik-potsdam.de/research/projects/activities/land-use-modelling/magpi A framework description paper has been published in Geoscientific Model Development (GMD): https://doi.org/10.5194/gmd-12-1299-2019 -The model documentation for version 4.6.10 can be found at -https://rse.pik-potsdam.de/doc/magpie/4.6.10/ +The model documentation for version 4.6.9 can be found at +https://rse.pik-potsdam.de/doc/magpie/4.6.9/ A most recent version of the documentation can also be extracted from the model source code via the R package goxygen @@ -188,7 +188,7 @@ magpie@pik-potsdam.de Please contact magpie@pik-potsdam.de ## CITATION -See file CITATION.cff or the [How-to-Cite section](https://rse.pik-potsdam.de/doc/magpie/4.6.10/#how-to-cite) in the model documentation for information how to cite the model. +See file CITATION.cff or the [How-to-Cite section](https://rse.pik-potsdam.de/doc/magpie/4.6.9/#how-to-cite) in the model documentation for information how to cite the model. ## AUTHORS See list of authors in CITATION.cff From 49c8b3aa07ed31bb126f4f2b03658115ae101a0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20F=C3=BChrlich?= Date: Wed, 16 Aug 2023 15:01:22 +0200 Subject: [PATCH 23/23] magpie release 4.6.10 --- .zenodo.json | 4 ++-- CHANGELOG.md | 18 +++++++----------- CITATION.cff | 4 ++-- README.md | 6 +++--- 4 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.zenodo.json b/.zenodo.json index d04a6a0a64..b6d04973ab 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "MAgPIE - An Open Source land-use modeling framework", - "version": "4.6.9dev", + "version": "4.6.10", "creators": [ { "name": "Dietrich, Jan Philipp", @@ -109,5 +109,5 @@ "license": { "id": "AGPL-3.0-or-later" }, - "publication_date": "2023-07-27" + "publication_date": "2023-08-16" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 0165d62e99..eaefd59888 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,24 +5,19 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). -## [Unreleased] +## [4.6.10] - 2023-08-16 ### changed - **config** update preprocessing to newest input data v4.88 with new transport costs +- **GitHub action** the github action is now faster, because it installs binary packages from Posit Package Manager - **scenario_config.csv** update preprocessing to newest input data v4.88 - **scripts** output.R is now faster, because it no longer searches runfolder renvs for full.gms files -- **GitHub action** the github action is now faster, because it installs binary packages from Posit Package Manager - -### added -- - -### removed -- ### fixed -- **scripts** fixed output/extra/disaggregation_LUH2.R. The script was not working any more because magpie4::protectedArea was changed to return protected area for all land types. Moreover, the script now also works for runs without dynamic forestry (default run) but with a warning message. -- **scripts** fixed erronoeous if clause in output.R - **scripts** check_config does not warn about c_input_gdx_path anymore while running empty model +- **scripts** fixed erronoeous if clause in output.R +- **scripts** fixed output/extra/disaggregation_LUH2.R. The script was not working any more because magpie4::protectedArea was changed to return protected area for all land types. Moreover, the script now also works for runs without dynamic forestry (default run) but with a warning message. + ## [4.6.9] - 2023-07-27 @@ -756,7 +751,8 @@ This release version is focussed on consistency between the MAgPIE setup and the First open source release of the framework. See [MAgPIE 4.0 paper](https://doi.org/10.5194/gmd-12-1299-2019) for more information. -[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.6.9...develop +[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.6.10...develop +[4.6.10]: https://github.com/magpiemodel/magpie/compare/v4.6.9...v4.6.10 [4.6.9]: https://github.com/magpiemodel/magpie/compare/v4.6.8...v4.6.9 [4.6.8]: https://github.com/magpiemodel/magpie/compare/v4.6.7...v4.6.8 [4.6.7]: https://github.com/magpiemodel/magpie/compare/v4.6.6...v4.6.7 diff --git a/CITATION.cff b/CITATION.cff index 8a4be0b247..6ea5a354d0 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -125,8 +125,8 @@ authors: email: popp@pik-potsdam.de title: MAgPIE - An Open Source land-use modeling framework -version: 4.6.9dev -date-released: 2023-07-27 +version: 4.6.10 +date-released: 2023-08-16 repository-code: https://github.com/magpiemodel/magpie keywords: - landuse diff --git a/README.md b/README.md index 9a13bf8260..f6321100fa 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,8 @@ https://www.pik-potsdam.de/research/projects/activities/land-use-modelling/magpi A framework description paper has been published in Geoscientific Model Development (GMD): https://doi.org/10.5194/gmd-12-1299-2019 -The model documentation for version 4.6.9 can be found at -https://rse.pik-potsdam.de/doc/magpie/4.6.9/ +The model documentation for version 4.6.10 can be found at +https://rse.pik-potsdam.de/doc/magpie/4.6.10/ A most recent version of the documentation can also be extracted from the model source code via the R package goxygen @@ -188,7 +188,7 @@ magpie@pik-potsdam.de Please contact magpie@pik-potsdam.de ## CITATION -See file CITATION.cff or the [How-to-Cite section](https://rse.pik-potsdam.de/doc/magpie/4.6.9/#how-to-cite) in the model documentation for information how to cite the model. +See file CITATION.cff or the [How-to-Cite section](https://rse.pik-potsdam.de/doc/magpie/4.6.10/#how-to-cite) in the model documentation for information how to cite the model. ## AUTHORS See list of authors in CITATION.cff