Skip to content

Commit

Permalink
Merge pull request magpiemodel#631 from flohump/develop
Browse files Browse the repository at this point in the history
bugfix v21_manna_from_heaven highres.R
  • Loading branch information
flohump authored Feb 26, 2024
2 parents 6a9f24a + c78a8fa commit 94339ec
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- **52_carbon** bugfix acx long-term carbon density
- **32_forestry** keep c-density for timber plantations constant after rotation length to avoid unrealistic carbon sequestration in unharvested timber plantation
- **32_forestry** bugfix unit p32_observed_gs_reg
- **21_trade** introduced s21_manna_from_heaven for fixing v21_manna_from_heaven to zero. Without fixing to zero, v21_manna_from_heaven was used unnecessarily in runs started with highres.R

## [4.7.0] - 2023-12-11

Expand Down
5 changes: 5 additions & 0 deletions config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,11 @@ cfg$gms$c20_scp_type <- "sugar" # def = sugar
# * to exports
cfg$gms$trade <- "selfsuff_reduced" # def = selfsuff_reduced

# * option for `exo` realization only:
# * fix `v21_manna_from_heaven` to zero (0) or not (1)
# Note: Without fixing to zero, v21_manna_from_heaven might be used unnecessarily in runs started with highres.R
cfg$gms$s21_manna_from_heaven <- 0

# * trade balance reduction scenario
# * (l909090r808080): 10 percent trade liberalisation for secondary and
# * livestock products in 2030,2050,2100 and 20 percent for
Expand Down
4 changes: 4 additions & 0 deletions modules/21_trade/exo/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
*** | MAgPIE License Exception, version 1.0 (see LICENSE file).
*** | Contact: [email protected]

scalars
s21_manna_from_heaven v21_manna_from_heaven fixed to zero (0) or available at high cost (1) (binary) / 0 /
;

table f21_trade_balance(t_all,h,kall) trade balance of positive exports and negative imports (mio. tDM per yr)
$ondelim
$include "./modules/21_trade/input/f21_trade_balance.cs3"
Expand Down
3 changes: 3 additions & 0 deletions modules/21_trade/exo/preloop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
** Save self sufficiency values as a interface parameter needed in forestry module
pm_selfsuff_ext(t_ext,h,kforestry) = f21_self_suff("y2150",h,kforestry);
pm_selfsuff_ext(t_all,h,kforestry) = f21_self_suff(t_all,h,kforestry);

** fix to zero by default
v21_manna_from_heaven.fx(h,kall)$(s21_manna_from_heaven = 0) = 0;

0 comments on commit 94339ec

Please sign in to comment.