Skip to content

Commit

Permalink
Merge pull request #576 from pfuehrlich-pik/master
Browse files Browse the repository at this point in the history
magpie release 4.6.8
  • Loading branch information
pfuehrlich-pik committed Jul 17, 2023
2 parents 62ae230 + 5879a3e commit 018050c
Show file tree
Hide file tree
Showing 63 changed files with 781 additions and 483 deletions.
9 changes: 9 additions & 0 deletions .Rprofile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@ Sys.setenv(RENV_PATHS_LIBRARY = "renv/library")

source("renv/activate.R")

renvVersion <- "0.16.0"
if (packageVersion("renv") != renvVersion) {
renvLockExisted <- file.exists(renv::paths$lockfile())
renv::upgrade(version = renvVersion, reload = TRUE, prompt = FALSE)
if (!renvLockExisted) {
unlink(renv::paths$lockfile())
}
}

if (!"https://rse.pik-potsdam.de/r/packages" %in% getOption("repos")) {
options(repos = c(getOption("repos"), pik = "https://rse.pik-potsdam.de/r/packages"))
}
Expand Down
23 changes: 0 additions & 23 deletions .snapshot.Rprofile

This file was deleted.

4 changes: 2 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "MAgPIE - An Open Source land-use modeling framework",
"version": "4.6.7",
"version": "4.6.8",
"creators": [
{
"name": "Dietrich, Jan Philipp",
Expand Down Expand Up @@ -109,5 +109,5 @@
"license": {
"id": "AGPL-3.0-or-later"
},
"publication_date": "2023-05-10"
"publication_date": "2023-07-17"
}
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,34 @@ 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.8] - 2023-07-17

### changed
- **41_area_equipped_for_irrigation** new AEI data (Mehta2022) replacing old Siebert data
- **80_optimization** printing of solprint when solver status is 7 re-activated
- **scripts** start_functions.R can now handle clusters per region flexibly
- **scripts** the REMIND-MAgPIE coupling now uses renv

### added
- **31_past** added `cc`, `nocc` and `nocc_hist` options for `c31_past_suit_scen` and `c31_grassl_yld_scenario`
- **32_carbon** added `nocc` and `nocc_hist` option for `c52_land_carbon_sink_rcp`
- **71_disagg_lvst** added new realisation `foragebased_jul23` which solves GAMS issues at higher spatial resolutions
- **config** added `cfg$results_folder_highres` which allows to modify the output folder used in the `highres.R` output script
- **config** new area equipped for irrigation (AEI) data in preprocessing (4.87)
- **scenario_config.csv** added a scenario for the NGFS project
- **scripts** New output script for reporting disaggregated land use patterns to the SEALS (Spatial Economic Allocation Landscape Simulator) downscaling model

### removed
- **config** `s80_num_nonopt_allowed`
- **scripts** removed .snapshot.Rprofile and the Rprofile.R script, renv now fully supersedes snapshots

### fixed
- **30_crop** corrected q30_cropland in module realization rotation_apr22, where fallow land was on the wrong side of the equation
- **71_disagg_lvst** reworked `foragebased_aug18` (including removal of linear version and correction of balance flow calculation)
- **80_optimization** resolve was not working in nlp_par realization due to `s80_num_nonopt_allowed`
- **config** corrected wrong names of parameters for peatland costs
- **config** updated scenario configs to newest preprocessing (4.87)

## [4.6.7] - 2023-05-10

### changed
Expand Down Expand Up @@ -701,7 +729,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.7...develop
[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.6.8...develop
[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
[4.6.6]: https://github.com/magpiemodel/magpie/compare/v4.6.5...v4.6.6
[4.6.5]: https://github.com/magpiemodel/magpie/compare/v4.6.4...v4.6.5
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ authors:
email: popp@pik-potsdam.de

title: MAgPIE - An Open Source land-use modeling framework
version: 4.6.7
date-released: 2023-05-10
version: 4.6.8
date-released: 2023-07-17
repository-code: https://github.com/magpiemodel/magpie
keywords:
- landuse
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.7 can be found at
https://rse.pik-potsdam.de/doc/magpie/4.6.7/
The model documentation for version 4.6.8 can be found at
https://rse.pik-potsdam.de/doc/magpie/4.6.8/

A most recent version of the documentation can also be extracted from the
model source code via the R package goxygen
Expand Down Expand Up @@ -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.7/#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.8/#how-to-cite) in the model documentation for information how to cite the model.

## AUTHORS
See list of authors in CITATION.cff
Expand Down
61 changes: 40 additions & 21 deletions config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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.85_h12_magpie.tgz",
cellular = "rev4.85_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz",
validation = "rev4.85_h12_validation.tgz",
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",
additional = "additional_data_rev4.43.tgz",
calibration = "calibration_H12_per_ton_fao_may22_glo_23Mar23.tgz")
calibration = "calibration_H12_per_ton_fao_may22_glo_08Jul23.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,
Expand Down Expand Up @@ -173,15 +173,15 @@ oecd90andEU <- "ALB,AUS,AUT,BEL,BIH,BGR,CAN,CYP,CZE,DNK,EST,FIN,FRA,
cfg$gms$drivers <- "aug17" # def = aug17
cfg$gms$c09_pop_scenario <- "SSP2" # def = SSP2
cfg$gms$c09_gdp_scenario <- "SSP2" # def = SSP2
# * options: SSP: "SSP1", "SSP2", "SSP2EU", "SSP3", "SSP4", "SSP5"
# * options: SSP: "SSP1", "SSP2", "SSP2EU", "SSP3", "SSP4", "SSP5"
# * SDP: "SDP", "SDP_EI", "SDP_MC", "SDP_RC"
# * Note: SSP2EU a European Commission population/income scenario for
# * Ariadne project. SDP is same as SSP1 income, while SDP_EI, SDP_RC, SDP_MC
# * see different GDP trajectories as described in SHAPE project.

# * Physical activity level scenario:
cfg$gms$c09_pal_scenario <- "SSP2" # def = SSP2
# * options: SSP: "SSP1", "SSP2", "SSP2EU", "SSP3", "SSP4", "SSP5"
# * options: SSP: "SSP1", "SSP2", "SSP2EU", "SSP3", "SSP4", "SSP5"
# * SDP: "SDP", "SDP_EI", "SDP_MC", "SDP_RC"

# Year until which all parameters are fixed to SSP2 values
Expand Down Expand Up @@ -694,8 +694,17 @@ cfg$gms$s31_fac_req_past <- 1 # def = 1
# * reflecting that not all pasture area is grazed.
cfg$gms$s31_unequal <- 1 # def = 1

# * Scenario for grassland and pasture yields (only take effect for realization grasslands_apr22)
# * options: cc (climate change)
# * nocc (no climate change)
# * nocc_hist (no climate change after year defined by sm_fix_cc)
cfg$gms$c31_grassl_yld_scenario <- "cc" # def = "cc"


# * SSP scenario switch for pasture suitability areas (only take effect for realization grasslands_apr22)
# * options: ssp126, ssp245, ssp370, ssp460, ssp585
# * nocc (fixed to values from 1995),
# * nocc_hist (ssp245 until year defined in sm_fix_cc, fixed thereafter)
cfg$gms$c31_past_suit_scen <- "ssp370" # def = "ssp370"

# * Switch that allows selecting how yield calibration factors will be calculated.
Expand Down Expand Up @@ -1017,12 +1026,12 @@ cfg$gms$s40_pasture_transport_costs <- 0 # def = 0
# ***--------------------- 41_area_equipped_for_irrigation ---------------
# * (static): no expansion
# * (endo_apr13): endogenous, cost driven expansion
cfg$gms$area_equipped_for_irrigation <- "endo_apr13" # def = endo_apr13
cfg$gms$area_equipped_for_irrigation <- "endo_apr13" # def = endo_apr13

# * switch for initialization area
# * (LUH2v2): area equipped for irrigation based on LUH2v2
# * (Siebert): area equipped for irrigation from Siebert et al.
cfg$gms$c41_initial_irrigation_area <- "LUH2v2" # def = LUH2v2
# * (LUH2v2): area equipped for irrigation based on LUH2v2 irrigated areas
# * (Mehta2022): area equipped for irrigation from Mehta et al. (2022)
cfg$gms$c41_initial_irrigation_area <- "LUH2v2" # def = LUH2v2

# * Sets the rate of depreciation of irrigation infrastructure in every timestep.
# * Only applicable when (endo_apr13) realization is selected
Expand Down Expand Up @@ -1272,7 +1281,9 @@ cfg$gms$nitrogen <- "rescaled_jan21" # def = rescaled_jan21
cfg$gms$carbon <- "normal_dec17" # def = normal_dec17

# * RCP scenario of land carbon sink adjustment factor, from Grassi et al 2021
# * options: RCP19, RCP26, RCP34, RCP45, RCP60, RCPBU
# * options: RCP19, RCP26, RCP34, RCP45, RCP60, RCPBU,
# * nocc (fixed to values from 1995),
# * nocc_hist (RCPBU until year defined in sm_fix_cc, fixed thereafter)
cfg$gms$c52_land_carbon_sink_rcp <- "RCPBU"


Expand Down Expand Up @@ -1514,8 +1525,8 @@ cfg$gms$peatland <- "on" # def = on
cfg$gms$s58_rewetting_switch <- Inf # def = Inf

# * One-time and recurring costs for peatland rewetting (USD05MER per ha)
cfg$gms$s58_rewet_cost_onetime <- 7000 # def = 7000
cfg$gms$s58_rewet_cost_recur <- 200 # def = 200
cfg$gms$s58_cost_rewet_onetime <- 7000 # def = 7000
cfg$gms$s58_cost_rewet_recur <- 200 # def = 200

# * One-time and recurring costs for peatland degradation (USD05MER per ha)
# * Can be used to test area-based incentives for peatland protection and restoration,
Expand All @@ -1524,8 +1535,8 @@ cfg$gms$s58_rewet_cost_recur <- 200 # def = 200
# * Therefore, one-time costs can used to incentivize the protection of intact peatlands.
# * Recurring costs apply on the level of degraded peatland. Therefore, recurring costs,
# * in combination with one-time costs, can be used to incentivize peatland restoration.
cfg$gms$s58_degrad_cost_onetime <- 0 # def = 0
cfg$gms$s58_degrad_cost_recur <- 0 # def = 0
cfg$gms$s58_cost_degrad_onetime <- 0 # def = 0
cfg$gms$s58_cost_degrad_recur <- 0 # def = 0

# * Artificial cost for balance variables (USD05MER per ha)
# * The balance variables in the peatland module avoid infeasibilities due to
Expand Down Expand Up @@ -1719,7 +1730,10 @@ cfg$gms$c70_fac_req_regr <- "glo" # def = glo
# * (off): default
# * (foragebased_aug18): Disaggregation of livestock to cells
# * with high pasture and fodder availability
cfg$gms$disagg_lvst <- "foragebased_aug18" # def = foragebased_aug18
# * (foragebased_jul23): Disaggregation of livestock to cells
# * with high pasture and fodder availability
# * (improved and flexibitized)
cfg$gms$disagg_lvst <- "foragebased_jul23" # def = foragebased_jul23


# ***--------------------- 73_timber -----------------------------------
Expand Down Expand Up @@ -1807,11 +1821,6 @@ cfg$gms$s80_maxiter <- 30
# * (conopt4+conopt3): conopt4 followed by conopt3
cfg$gms$c80_nlp_solver <- "conopt4" # def = conopt4

# number of allowed non-optimal variables
# Should be set to 0 for GAMS version 25.x.x or earlier
# Should be set to Inf for GAMS version 26.x.x or later
cfg$gms$s80_num_nonopt_allowed <- Inf

# * 1: using optfile for specified solver settings
# * 0: default settings (optfile will be ignored)
cfg$gms$s80_optfile <- 1
Expand Down Expand Up @@ -1865,6 +1874,12 @@ cfg$output <- c("output_check", "extra/disaggregation", "rds_report")
# :title: is a placeholder for the current run title (cfg$title)
cfg$results_folder <- "output/:title::date:"

# Results folder used by the "highres.R" output script
# If NULL, the default set in "highres.R" is used (currently a subfolder in "output")
# To place highres runs directly in the "output" folder, change to "output"
# To place highres runs in a specific subfolder change to "output/HR"
cfg$results_folder_highres <- NULL

# Which files should be copied into the output folder?
cfg$files2export <- list()
# Files that should be copied before MAgPIE is started
Expand Down Expand Up @@ -1895,6 +1910,10 @@ cfg$files2export$start <- c("input/info.txt",
# Files that should be copied after the MAgPIE run is finished
cfg$files2export$end <- NULL

# Expert use only, should not be set manually. Path to a renv.lock file
# defining the package environment for newly started runs.
cfg$renv_lock <- NULL

# Folder run statistics should be submitted to
cfg$runstatistics <- "/p/projects/rd3mod/models/statistics/magpie"

Expand Down
Loading

0 comments on commit 018050c

Please sign in to comment.