Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jansteinhauser authored Apr 17, 2024
2 parents 32f6c5d + 0febc0f commit c41f383
Show file tree
Hide file tree
Showing 20 changed files with 408 additions and 92 deletions.
9 changes: 7 additions & 2 deletions .Rprofile
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,16 @@ if (!"https://rse.pik-potsdam.de/r/packages" %in% getOption("repos")) {
# bootstrapping, will only run once after this repo is freshly cloned
if (isTRUE(rownames(installed.packages(priority = "NA")) == "renv")) {
message("R package dependencies are not installed in this renv, installing now...")
renv::hydrate() # auto-detect and install all dependencies
renv::hydrate(prompt = FALSE, report = FALSE) # auto-detect and install all dependencies
message("Finished installing R package dependencies.")
if (!("upstream" %in% gert::git_remote_list()$name)) {
gert::git_remote_add("https://github.com/magpiemodel/magpie.git", "upstream")
message("Added upstream git remote pointing to magpiemodel/magpie.")
}
}

# in case bootstrapping fails halfway, install piamenv and rely on requirement auto-fixing
if (!requireNamespace("piamenv", quietly = TRUE)) {
if (tryCatch(packageVersion("piamenv"),
error = function(e) package_version("0.0")) < package_version("0.3.4")) {
renv::install("piamenv", prompt = FALSE)
}
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.7.2dev",
"version": "4.7.3dev",
"creators": [
{
"name": "Dietrich, Jan Philipp",
Expand Down Expand Up @@ -114,5 +114,5 @@
"license": {
"id": "AGPL-3.0-or-later"
},
"publication_date": "2024-04-02"
"publication_date": "2024-04-12"
}
47 changes: 32 additions & 15 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## [Unreleased]

### changed
- **default.cfg** updated inputdata revision to 4.104 to have NDC scenarios included
- **scripts** cfg$gms$s35_secdf_distribution <- 2 for FSEC
- **scripts** modified output reporting for SEALS to account for forestry plantations
- **config** updated FSEC scenario config for revision and included new calibration file (after cost fix in preprocessing)
- **config** added switch for minimum timber yields
- **21_trade** v21_import_for_feasibility now available for all coutnries, not just for importers
- **70_livestock** if `c70_fac_req_regr` is set to `reg`: use of USDA/FAO values for historic factor requirements for livestock instead of using regression values and change of calibration year from 2005 to 2010 for regional factor requirements regression
- **21_trade** Revision of trade module. Replaced `cfg$gms$s21_trade_bal_damper` in favour of `cfg$gms$k_import21`, which allows for additional imports to maintain feasibility
- **scripts/calibration/landconversion_cost.R** Revised calibration approach for conversion costs for cropland. Information from all calibration time steps in combination with a lowpass filter is now used for deriving the calibration factors, which avoids the previous zickzack pattern. The previous option `cfg$damping_factor_landconversion_cost` has been removed in favor of `cfg$lowpass_filter_landconversion_cost`.
- **default.cfg** update additional data to rev4.50
- **default.cfg** changed default realization for 44_biodiversity to new realization `bii_target_apr24`

### added
- **14_yields** added minimum threshold for wood yields. Below this threshold, wood yields are set to zero.
- **56_ghg_policy** added NDC scenarios
- **60_bioenergy** added NDC scenarios
- **default.cfg** added cropland growth constraint `cfg$gms$s30_annual_max_growth`
- **default.cfg** added early afforestation constraint `cfg$gms$s32_max_aff_cell_2025`
- **default.cfg** added technical cost for missing BII increase `cfg$gms$s44_cost_bii_missing`
- **default.cfg** added settings for new price-driven bioenergy realization `1st2ndgen_priced_feb24`: `cfg$gms$s60_2ndgen_bioenergy_dem_min_post_fix`, `cfg$gms$c60_bioenergy_subsidy_fix_SSP2`, `s60_bioenergy_gj_price_1st`,
`s60_bioenergy_price_2nd`, `c60_price_implementation`
Expand All @@ -42,9 +29,38 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
-

### fixed
- **extra/disaggregation** fixed bug in disaggregation of land conservation related to switch from 59k to 67k that produced erroneous outputs
- **44_biodiversity** avoid division by zero
- **scenario_config.csv** same revision for input files as in default.cfg
- **scenario_fsec.csv** scenario settings
- **start/projects/fsec.R** scenario settings


## [4.7.3] - 2024-04-12

### changed
- **21_trade** Revision of trade module. Replaced `cfg$gms$s21_trade_bal_damper` in favour of `cfg$gms$k_import21`, which allows for additional imports to maintain feasibility
- **21_trade** v21_import_for_feasibility now available for all countries, not just for importers
- **70_livestock** if `c70_fac_req_regr` is set to `reg`: use of USDA/FAO values for historic factor requirements for livestock instead of using regression values and change of calibration year from 2005 to 2010 for regional factor requirements regression
- **config** updated FSEC scenario config for revision and included new calibration file (after cost fix in preprocessing)
- **default.cfg** updated inputdata revision to 4.104 to have NDC scenarios included
- **scripts** cfg$gms$s35_secdf_distribution <- 2 for FSEC
- **scripts** modified output reporting for SEALS to account for forestry plantations
- **scripts/calibration/landconversion_cost.R** Revised calibration approach for conversion costs for cropland. Information from all calibration time steps in combination with a lowpass filter is now used for deriving the calibration factors, which avoids the previous zickzack pattern. The previous option `cfg$damping_factor_landconversion_cost` has been removed in favor of `cfg$lowpass_filter_landconversion_cost`.

### added
- **14_yields** added minimum threshold for wood yields. Below this threshold, wood yields are set to zero.
- **config** added switch for minimum timber yields
- **56_ghg_policy** added NDC scenarios
- **60_bioenergy** added NDC scenarios
- **scripts** start script for EAT2p0 Deep Dive project

### fixed
- **15_food** Small number rather 0 in condition checking calorie balancing
- **34_urban** `static` realization was not working because `vm_carbon_stock` was referenced without the set `stockType`
- **52_carbon** removing jump of carbon content into fully grown forest when a forest changes from second-last age class to last age-class.
- **58_peatland** Equation `q58_scalingFactorExp` revised to avoid division by zero.
- **80_optimization** duplicated solve statement in all instances to avoid non-matchting left- and right-hand sides of equations
- **58_peatland** Equation `q58_scalingFactorExp` revised to avoid division by zero.


## [4.7.2] - 2024-04-02
Expand Down Expand Up @@ -887,7 +903,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.7.2...develop
[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.7.3...develop
[4.7.3]: https://github.com/magpiemodel/magpie/compare/v4.7.2...v4.7.3
[4.7.2]: https://github.com/magpiemodel/magpie/compare/v4.7.1...v4.7.2
[4.7.1]: https://github.com/magpiemodel/magpie/compare/v4.7.0...v4.7.1
[4.7.0]: https://github.com/magpiemodel/magpie/compare/v4.6.11...v4.7.0
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ authors:
email: [email protected]

title: MAgPIE - An Open Source land-use modeling framework
version: 4.7.2dev
date-released: 2024-04-02
version: 4.7.3dev
date-released: 2024-04-12
repository-code: https://github.com/magpiemodel/magpie
keywords:
- landuse
Expand Down
4 changes: 3 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,7 @@ Imports:
Suggests:
goxygen,
languageserver,
qgraph
qgraph,
shinyresults,
XML
Encoding: UTF-8
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.7.2 can be found at
https://rse.pik-potsdam.de/doc/magpie/4.7.2/
The model documentation for version 4.7.3 can be found at
https://rse.pik-potsdam.de/doc/magpie/4.7.3/

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 @@ -226,7 +226,7 @@ [email protected]
Please contact [email protected]

## CITATION
See file CITATION.cff or the [How-to-Cite section](https://rse.pik-potsdam.de/doc/magpie/4.7.2/#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.7.3/#how-to-cite) in the model documentation for information how to cite the model.

## AUTHORS
See list of authors in CITATION.cff
Expand Down
2 changes: 1 addition & 1 deletion config/scenario_config.csv
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,4 @@ gms$s30_annual_max_growth;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0.02
gms$s44_cost_bii_missing;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10000000
gms$c56_mute_ghgprices_until;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;y2020
gms$bioenergy;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1st2ndgen_priced_feb24
gms$factor_costs;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sticky_feb18
gms$factor_costs;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sticky_feb18
6 changes: 3 additions & 3 deletions config/scenario_fsec.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
;FSEC;population;institutions;energy;bioplastics;capitalSubst;minWage;noUnderweight;halfOverweight;fruitsNutsVegSeeds;monogastrics;ruminants;pulses;processed;fish;waste;awms;livestock;cropefficiency;nueMAC;riceMAC;biodiversity;fairTrade;timberCities;REDDaff;REDD;landscapeElements;landSharing;landSparing;waterSparing;peatland;soil;allDiet;allDietAndWaste;allEnvPrice;allEmisPrice;SSP1;SSP2;SSP3;SSP4;SSP5;RCP19;RCP26;RCP34;RCP45;RCP60;RCP70;RCP85;SSP1energy;labor8p5;labor1p9
;FSEC;population;institutions;energy;bioplastics;capitalSubst;minWage;noUnderweight;halfOverweight;fruitsNutsVegSeeds;monogastrics;ruminants;pulses;processed;fish;waste;awms;livestock;cropefficiency;nueMAC;riceMAC;biodiversity;fairTrade;timberCities;REDDaff;REDD;landscapeElements;landSharing;landSparing;waterSparing;peatland;soil;allDiet;allDietAndWaste;allEnvPrice;allEmisPrice;SSP1;SSP2;SSP3;SSP4;SSP5;RCP19;RCP26;RCP34;RCP45;RCP60;RCP70;RCP85;SDPenergy;labor8p5;labor1p9
gms$c09_pop_scenario;;SSP1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$c09_gdp_scenario;;;SSP1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$c09_pal_scenario;;;SDP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down Expand Up @@ -68,7 +68,7 @@ gms$s57_maxmac_ch4_entferm;-1;;;;;;;;;;;;;;;;;201;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$s57_maxmac_ch4_awms;-1;;;;;;;;;;;;;;;;201;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$s58_rewetting_switch;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Inf;;;;;;;;;;;;;;;;;;;;
gms$som;cellpool_aug16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$c60_2ndgen_biodem;R21M42-SSP2-NDC;;;R21M42-SSP2-PkBudg900;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;R21M42-SSP1-PkBudg900;;
gms$c60_2ndgen_biodem;R21M42-SSP2-NDC;;;R21M42-SSP2-PkBudg900;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;R21M42-SDP-PkBudg900;;
gms$c60_res_2ndgenBE_dem;;;;sdp;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$s62_max_dem_bioplastic;0;;;;400;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
gms$c70_fac_req_regr;reg;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand All @@ -79,4 +79,4 @@ input['regional'];rev4.104_FSEC_magpie.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['validation'];rev4.104_FSEC_validation.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['additional'];additional_data_rev4.48.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
input['calibration'];calibration_FSEC_26Mar24.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
magicc_emis_scen;bjoernAR6_C_SSP2-NDC.mif;;;bjoernAR6_C_SSP2-PkBudg900.mif;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;bjoernAR6_C_SSP1-NDC.mif;;;;;;;;;;;;bjoernAR6_C_SSP1-PkBudg900.mif;;
magicc_emis_scen;bjoernAR6_C_SSP2-NDC.mif;;;bjoernAR6_C_SSP2-PkBudg900.mif;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;bjoernAR6_C_SSP1-NDC.mif;;;;;;;;;;;;bjoernAR6_C_RemSDP-900-MagSSP1.mif;;
8 changes: 6 additions & 2 deletions modules/15_food/anthro_iso_jun22/exodietmacro.gms
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ if ((s15_exo_diet = 1 or s15_exo_diet = 2),
i15_intake_scen_target(t,iso) * p15_intake_detailed_scen_target(t,iso,EAT_nonstaples_old) / sum(EAT_nonstaples2_old, p15_intake_detailed_scen_target(t,iso,EAT_nonstaples2_old))
;

if (smin((iso,kfo), p15_intake_detailed_scen_target(t,iso,kfo)) < 0,
if (smin((iso,kfo), p15_intake_detailed_scen_target(t,iso,kfo)) < (-1e-10),
abort "The parameter p15_intake_detailed_scen_target became negative after calorie balancing.";
);

Expand Down Expand Up @@ -616,11 +616,15 @@ elseif s15_exo_diet = 3,
i15_intake_scen_target(t,iso) * p15_intake_detailed_scen_target(t,iso,EAT_nonstaples) /
sum(EAT_nonstaples2, p15_intake_detailed_scen_target(t,iso,EAT_nonstaples2));

if (smin((iso,kfo), p15_intake_detailed_scen_target(t,iso,kfo)) < 0,
if (smin((iso,kfo), p15_intake_detailed_scen_target(t,iso,kfo)) < (-1e-10),
display p15_intake_detailed_scen_target;
abort "The parameter p15_intake_detailed_scen_target became negative after calorie balancing.";
);

* Correction of very small values
p15_intake_detailed_scen_target(t,iso,kfo)$(p15_intake_detailed_scen_target(t,iso,kfo) < 0) = 0;


);
*** End of MAgPIE-specific realization of the EAT Lancet diet

Expand Down
2 changes: 1 addition & 1 deletion modules/34_urban/static/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


vm_land.fx(j,"urban") = pcm_land(j,"urban");
vm_carbon_stock.fx(j,"urban",ag_pools) = 0;
vm_carbon_stock.fx(j,"urban",ag_pools,stockType) = 0;
*' Biodiveristy value (BV)
vm_bv.fx(j,"urban", potnatveg) = pcm_land(j,"urban") * fm_bii_coeff("urban",potnatveg) * fm_luh2_side_layers(j,potnatveg);

Expand Down
6 changes: 3 additions & 3 deletions modules/44_biodiversity/bii_target/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
*' The Biodiversity Intactness Index (BII) is calculated at the level of 71 biomes.
*' The regional layer is needed for compatibility with the high resolution parallel optimization output script (scripts/output/extra/highres.R)

q44_bii(i2,biome44)$(sum(cell(i2,j2), f44_biome(j2,biome44)) > 0) .. v44_bii(i2,biome44)
q44_bii(i2,biome44)$(sum(cell(i2,j2), f44_biome(j2,biome44)) > 1e-10) .. v44_bii(i2,biome44) * sum((cell(i2,j2),land), pcm_land(j2,land) * f44_biome(j2,biome44))
=e=
(sum((cell(i2,j2),potnatveg,landcover44), vm_bv(j2,landcover44,potnatveg) * f44_biome(j2,biome44)) / sum((cell(i2,j2),land), pcm_land(j2,land) * f44_biome(j2,biome44)));
sum((cell(i2,j2),potnatveg,landcover44), vm_bv(j2,landcover44,potnatveg) * f44_biome(j2,biome44));

*' For each of the 71 biomes, the BII has to meet a minium level based on `s44_bii_lower_bound`.
*' `v44_bii_missing` is a technical variable to maintain feasibility in case `v44_bii` cannot be increased.

q44_bii_target(i2,biome44)$(sum(cell(i2,j2), f44_biome(j2,biome44)) > 0) ..
q44_bii_target(i2,biome44)$(sum(cell(i2,j2), f44_biome(j2,biome44)) > 1e-10) ..
v44_bii(i2,biome44) + v44_bii_missing(i2,biome44) =g= sum(ct, p44_bii_lower_bound(ct,i2,biome44));

*' Costs accrue only for `v44_bii_missing`. In the best case costs should be zero or close to zero.
Expand Down
4 changes: 2 additions & 2 deletions modules/44_biodiversity/bii_target/preloop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

v44_bii.l(i,biome44) = 0.75;

v44_bii.fx(i,biome44)$(sum(cell(i,j), f44_biome(j,biome44)) = 0) = 0;
v44_bii_missing.fx(i,biome44)$(sum(cell(i,j), f44_biome(j,biome44)) = 0) = 0;
v44_bii.fx(i,biome44)$(sum(cell(i,j), f44_biome(j,biome44)) <= 1e-10) = 0;
v44_bii_missing.fx(i,biome44)$(sum(cell(i,j), f44_biome(j,biome44)) <= 1e-10) = 0;
p44_bii_lower_bound(t,i,biome44) = 0;

vm_bv.l(j,landcover44,potnatveg) = 0;
16 changes: 3 additions & 13 deletions output.R
Original file line number Diff line number Diff line change
Expand Up @@ -34,19 +34,9 @@ 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)
if("try-error" %in% class(tmp) || length(tmp)==0) {
tmp <- base::list.dirs("./output/",recursive=TRUE)
dirs <- NULL
for (i in seq_along(tmp)) {
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 <- c(Sys.glob("./output/*/full.gms"), Sys.glob("./output/HR*/*/full.gms"))
dirs <- sub("^\\./output/", "", dirs)
dirs <- sub("/full\\.gms$", "", dirs)
dirs <- sort(dirs)
dirs <- c("all",dirs)
cat("\n",title,":\n", sep="")
Expand Down
43 changes: 31 additions & 12 deletions renv/activate.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@
local({

# the requested version of renv
version <- "1.0.5"
version <- "1.0.7"
attr(version, "sha") <- NULL

# the project directory
project <- getwd()
project <- Sys.getenv("RENV_PROJECT")
if (!nzchar(project))
project <- getwd()

# use start-up diagnostics if enabled
diagnostics <- Sys.getenv("RENV_STARTUP_DIAGNOSTICS", unset = "FALSE")
Expand Down Expand Up @@ -129,6 +131,21 @@ local({

}

heredoc <- function(text, leave = 0) {

# remove leading, trailing whitespace
trimmed <- gsub("^\\s*\\n|\\n\\s*$", "", text)

# split into lines
lines <- strsplit(trimmed, "\n", fixed = TRUE)[[1L]]

# compute common indent
indent <- regexpr("[^[:space:]]", lines)
common <- min(setdiff(indent, -1L)) - leave
paste(substring(lines, common), collapse = "\n")

}

startswith <- function(string, prefix) {
substring(string, 1, nchar(prefix)) == prefix
}
Expand Down Expand Up @@ -631,6 +648,9 @@ local({

# if the user has requested an automatic prefix, generate it
auto <- Sys.getenv("RENV_PATHS_PREFIX_AUTO", unset = NA)
if (is.na(auto) && getRversion() >= "4.4.0")
auto <- "TRUE"

if (auto %in% c("TRUE", "True", "true", "1"))
return(renv_bootstrap_platform_prefix_auto())

Expand Down Expand Up @@ -822,24 +842,23 @@ local({

# the loaded version of renv doesn't match the requested version;
# give the user instructions on how to proceed
remote <- if (!is.null(description[["RemoteSha"]])) {
dev <- identical(description[["RemoteType"]], "github")
remote <- if (dev)
paste("rstudio/renv", description[["RemoteSha"]], sep = "@")
} else {
else
paste("renv", description[["Version"]], sep = "@")
}

# display both loaded version + sha if available
friendly <- renv_bootstrap_version_friendly(
version = description[["Version"]],
sha = description[["RemoteSha"]]
sha = if (dev) description[["RemoteSha"]]
)

fmt <- paste(
"renv %1$s was loaded from project library, but this project is configured to use renv %2$s.",
"- Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.",
"- Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.",
sep = "\n"
)
fmt <- heredoc("
renv %1$s was loaded from project library, but this project is configured to use renv %2$s.
- Use `renv::record(\"%3$s\")` to record renv %1$s in the lockfile.
- Use `renv::restore(packages = \"renv\")` to install renv %2$s into the project library.
")
catf(fmt, friendly, renv_bootstrap_version_friendly(version), remote)

FALSE
Expand Down
5 changes: 4 additions & 1 deletion scripts/output/extra/disaggregation.R
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ if (length(map_file) > 1) {
)
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_iso <- consv_iso[consv_iso %in% getItems(consv_prio_all, dim = 1.3)]
if (length(consv_iso) == 0) {
warning("No countries selected in land conservation disaggregation. Results may be erroneous")
}
consv_select <- cfg$gms$c22_protect_scenario
consv_noselect <- cfg$gms$c22_protect_scenario_noselect

Expand Down
Loading

0 comments on commit c41f383

Please sign in to comment.