Skip to content

Commit

Permalink
Merge pull request magpiemodel#509 from flohump/f_Fix2020
Browse files Browse the repository at this point in the history
Bugfix cropland module - consistent results until 2020
  • Loading branch information
flohump authored Jan 19, 2023
2 parents cfb6bd2 + e36c1f1 commit 572e4ba
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 27 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **38_factos_costs** sticky_labor realization: included option to set a labor share target
- **15_food** changed `anthro_iso_jun22` realisation such that results in case of `exo_diet = 1/0` and `exo_waste = 1/0` are identical until 2020
- **62_material** Bioplastic demand identical in all scenarios until 2020
- **30_crop** identical assumptions for bioenergy until 2020

### added
- **scripts** added start script which starts an empty model just regenerating a previous run
Expand Down
8 changes: 8 additions & 0 deletions modules/30_crop/endo_apr21/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ sets
land_snv(land) land types allowed in the SNV policy / secdforest, forestry, past, other /
;

$ifthen "%c30_bioen_type%" == "all" bioen_type_30(kbe30) = yes;
$else bioen_type_30("%c30_bioen_type%") = yes;
$endif

$ifthen "%c30_bioen_water%" == "all" bioen_water_30(w) = yes;
$else bioen_water_30("%c30_bioen_water%") = yes;
$endif

********* CROPAREA INITIALISATION **********************************************

table fm_croparea(t_all,j,w,kcr) Different croparea type areas (mio. ha)
Expand Down
16 changes: 7 additions & 9 deletions modules/30_crop/endo_apr21/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,19 @@
*** | MAgPIE License Exception, version 1.0 (see LICENSE file).
*** | Contact: [email protected]

$ifthen "%c30_bioen_type%" == "all" bioen_type_30(kbe30) = yes;
$else bioen_type_30("%c30_bioen_type%") = yes;
$endif

$ifthen "%c30_bioen_water%" == "all" bioen_water_30(w) = yes;
$else bioen_water_30("%c30_bioen_water%") = yes;
$endif

*' @code
*' First, all 2nd generation bioenergy area is fixed to zero, irrespective of type and
*' rainfed/irrigation.
vm_area.fx(j,kbe30,w)=0;
*' Second, the bounds for 2nd generation bioenergy area are released depending on
*' the dynamic sets bioen_type_30 and bioen_water_30.
vm_area.up(j,bioen_type_30,bioen_water_30)=Inf;
*' SSP2 default settings are used for the historic period.
if(m_year(t) <= sm_fix_SSP2,
vm_area.up(j,kbe30,"rainfed") = Inf;
else
vm_area.up(j,bioen_type_30,bioen_water_30) = Inf;
);

*' @stop

*' No penalties or fallows exist in this realization
Expand Down
8 changes: 8 additions & 0 deletions modules/30_crop/penalty_apr22/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ sets
land_snv(land) land types allowed in the SNV policy / secdforest, forestry, past, other /
;

$ifthen "%c30_bioen_type%" == "all" bioen_type_30(kbe30) = yes;
$else bioen_type_30("%c30_bioen_type%") = yes;
$endif

$ifthen "%c30_bioen_water%" == "all" bioen_water_30(w) = yes;
$else bioen_water_30("%c30_bioen_water%") = yes;
$endif

********* CROPAREA INITIALISATION **********************************************

table fm_croparea(t_all,j,w,kcr) Different croparea type areas (mio. ha)
Expand Down
15 changes: 6 additions & 9 deletions modules/30_crop/penalty_apr22/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@
*** | MAgPIE License Exception, version 1.0 (see LICENSE file).
*** | Contact: [email protected]

$ifthen "%c30_bioen_type%" == "all" bioen_type_30(kbe30) = yes;
$else bioen_type_30("%c30_bioen_type%") = yes;
$endif

$ifthen "%c30_bioen_water%" == "all" bioen_water_30(w) = yes;
$else bioen_water_30("%c30_bioen_water%") = yes;
$endif

*' @code
*' First, all 2nd generation bioenergy area is fixed to zero, irrespective of type and
*' rainfed/irrigation.
vm_area.fx(j,kbe30,w)=0;
*' Second, the bounds for 2nd generation bioenergy area are released depending on
*' the dynamic sets bioen_type_30 and bioen_water_30.
vm_area.up(j,bioen_type_30,bioen_water_30)=Inf;
*' SSP2 default settings are used for the historic period.
if(m_year(t) <= sm_fix_SSP2,
vm_area.up(j,kbe30,"rainfed") = Inf;
else
vm_area.up(j,bioen_type_30,bioen_water_30) = Inf;
);
*' @stop

*' @code
Expand Down
8 changes: 8 additions & 0 deletions modules/30_crop/rotation_apr22/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ sets
land_snv(land) land types allowed in the SNV policy / secdforest, forestry, past, other /
;

$ifthen "%c30_bioen_type%" == "all" bioen_type_30(kbe30) = yes;
$else bioen_type_30("%c30_bioen_type%") = yes;
$endif

$ifthen "%c30_bioen_water%" == "all" bioen_water_30(w) = yes;
$else bioen_water_30("%c30_bioen_water%") = yes;
$endif

********* CROPAREA INITIALISATION **********************************************

table fm_croparea(t_all,j,w,kcr) Different croparea type areas (mio. ha)
Expand Down
15 changes: 6 additions & 9 deletions modules/30_crop/rotation_apr22/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,18 @@
*** | MAgPIE License Exception, version 1.0 (see LICENSE file).
*** | Contact: [email protected]

$ifthen "%c30_bioen_type%" == "all" bioen_type_30(kbe30) = yes;
$else bioen_type_30("%c30_bioen_type%") = yes;
$endif

$ifthen "%c30_bioen_water%" == "all" bioen_water_30(w) = yes;
$else bioen_water_30("%c30_bioen_water%") = yes;
$endif

*' @code
*' First, all 2nd generation bioenergy area is fixed to zero, irrespective of type and
*' rainfed/irrigation.
vm_area.fx(j,kbe30,w)=0;
*' Second, the bounds for 2nd generation bioenergy area are released depending on
*' the dynamic sets bioen_type_30 and bioen_water_30.
vm_area.up(j,bioen_type_30,bioen_water_30)=Inf;
*' SSP2 default settings are used for the historic period.
if(m_year(t) <= sm_fix_SSP2,
vm_area.up(j,kbe30,"rainfed") = Inf;
else
vm_area.up(j,bioen_type_30,bioen_water_30) = Inf;
);
*' @stop

*' @code
Expand Down

0 comments on commit 572e4ba

Please sign in to comment.