Skip to content

Commit

Permalink
Merge pull request #1859 from orichters/elevateclean
Browse files Browse the repository at this point in the history
don't compile ARIADNE as calibs are missing, speedup project historical.mif generation
  • Loading branch information
orichters authored Oct 14, 2024
2 parents 75b233d + 5e2df4a commit 1a7d08b
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 36 deletions.
44 changes: 22 additions & 22 deletions core/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -251,28 +251,28 @@ p_prodAllReference(ttot,all_regi,all_te) "Sum of the ab


*** Energy carrier Prices
pm_FEPrice(ttot,all_regi,all_enty,sector,emiMkt) "parameter to capture all FE prices across sectors and markets (tr$2005/TWa)"
pm_FEPrice_iter(iteration,ttot,all_regi,all_enty,sector,emiMkt) "parameter to capture all FE prices across sectors and markets (tr$2005/TWa) across iterations"
pm_SEPrice(ttot,all_regi,all_enty) "parameter to capture all SE prices (tr$2005/TWa)"
pm_PEPrice(ttot,all_regi,all_enty) "parameter to capture all PE prices (tr$2005/TWa)"

p_FEPrice_by_SE_Sector_EmiMkt(ttot,all_regi,entySe,all_enty,sector,emiMkt) "parameter to save FE price per SE, sector and emission market (tr$2005/TWa)"
p_FEPrice_by_Sector_EmiMkt(ttot,all_regi,all_enty,sector,emiMkt) "parameter to save FE marginal price per sector and emission market (tr$2005/TWa)"
pm_FEPrice_by_SE_Sector(ttot,all_regi,entySe,all_enty,sector) "parameter to save FE marginal price per SE and sector (tr$2005/TWa)"
p_FEPrice_by_SE_EmiMkt(ttot,all_regi,entySe,all_enty,emiMkt) "parameter to save FE marginal price per SE and emission market (tr$2005/TWa)"
p_FEPrice_by_SE(ttot,all_regi,entySe,all_enty) "parameter to save FE marginal price per SE (tr$2005/TWa)"
p_FEPrice_by_Sector(ttot,all_regi,all_enty,sector) "parameter to save FE marginal price per sector (tr$2005/TWa)"
p_FEPrice_by_EmiMkt(ttot,all_regi,all_enty,emiMkt) "parameter to save FE marginal price per emission market (tr$2005/TWa)"
p_FEPrice_by_FE(ttot,all_regi,all_enty) "parameter to save FE marginal price (tr$2005/TWa)"

p_FEPrice_by_SE_Sector_EmiMkt_iter(iteration,ttot,all_regi,entySe,all_enty,sector,emiMkt) "parameter to save iteration FE marginal price per SE, sector and emission market (tr$2005/TWa)"
p_FEPrice_by_Sector_EmiMkt_iter(iteration,ttot,all_regi,all_enty,sector,emiMkt) "parameter to save iteration FE marginal price per sector and emission market (tr$2005/TWa)"
p_FEPrice_by_SE_Sector_iter(iteration,ttot,all_regi,entySe,all_enty,sector) "parameter to save iteration FE marginal price per SE and sector (tr$2005/TWa)"
p_FEPrice_by_SE_EmiMkt_iter(iteration,ttot,all_regi,entySe,all_enty,emiMkt) "parameter to save iteration FE marginal price per SE and emission market (tr$2005/TWa)"
p_FEPrice_by_SE_iter(iteration,ttot,all_regi,entySe,all_enty) "parameter to save iteration FE marginal price per SE (tr$2005/TWa)"
p_FEPrice_by_Sector_iter(iteration,ttot,all_regi,all_enty,sector) "parameter to save iteration FE marginal price per sector (tr$2005/TWa)"
p_FEPrice_by_EmiMkt_iter(iteration,ttot,all_regi,all_enty,emiMkt) "parameter to save iteration FE marginal price per emission market (tr$2005/TWa)"
p_FEPrice_by_FE_iter(iteration,ttot,all_regi,all_enty) "parameter to save iteration FE marginal price (tr$2005/TWa)"
pm_FEPrice(ttot,all_regi,all_enty,sector,emiMkt) "parameter to capture all FE prices across sectors and markets [tr$2005/TWa]"
pm_FEPrice_iter(iteration,ttot,all_regi,all_enty,sector,emiMkt) "parameter to capture all FE prices across sectors and markets [tr$2005/TWa] across iterations"
pm_SEPrice(ttot,all_regi,all_enty) "parameter to capture all SE prices [tr$2005/TWa]"
pm_PEPrice(ttot,all_regi,all_enty) "parameter to capture all PE prices [tr$2005/TWa]"

p_FEPrice_by_SE_Sector_EmiMkt(ttot,all_regi,entySe,all_enty,sector,emiMkt) "parameter to save FE price per SE, sector and emission market [tr$2005/TWa]"
p_FEPrice_by_Sector_EmiMkt(ttot,all_regi,all_enty,sector,emiMkt) "parameter to save FE marginal price per sector and emission market [tr$2005/TWa]"
pm_FEPrice_by_SE_Sector(ttot,all_regi,entySe,all_enty,sector) "parameter to save FE marginal price per SE and sector [tr$2005/TWa]"
p_FEPrice_by_SE_EmiMkt(ttot,all_regi,entySe,all_enty,emiMkt) "parameter to save FE marginal price per SE and emission market [tr$2005/TWa]"
p_FEPrice_by_SE(ttot,all_regi,entySe,all_enty) "parameter to save FE marginal price per SE [tr$2005/TWa]"
p_FEPrice_by_Sector(ttot,all_regi,all_enty,sector) "parameter to save FE marginal price per sector [tr$2005/TWa]"
p_FEPrice_by_EmiMkt(ttot,all_regi,all_enty,emiMkt) "parameter to save FE marginal price per emission market [tr$2005/TWa]"
p_FEPrice_by_FE(ttot,all_regi,all_enty) "parameter to save FE marginal price [tr$2005/TWa]"

p_FEPrice_by_SE_Sector_EmiMkt_iter(iteration,ttot,all_regi,entySe,all_enty,sector,emiMkt) "parameter to save iteration FE marginal price per SE, sector and emission market [tr$2005/TWa]"
p_FEPrice_by_Sector_EmiMkt_iter(iteration,ttot,all_regi,all_enty,sector,emiMkt) "parameter to save iteration FE marginal price per sector and emission market [tr$2005/TWa]"
p_FEPrice_by_SE_Sector_iter(iteration,ttot,all_regi,entySe,all_enty,sector) "parameter to save iteration FE marginal price per SE and sector [tr$2005/TWa]"
p_FEPrice_by_SE_EmiMkt_iter(iteration,ttot,all_regi,entySe,all_enty,emiMkt) "parameter to save iteration FE marginal price per SE and emission market [tr$2005/TWa]"
p_FEPrice_by_SE_iter(iteration,ttot,all_regi,entySe,all_enty) "parameter to save iteration FE marginal price per SE [tr$2005/TWa]"
p_FEPrice_by_Sector_iter(iteration,ttot,all_regi,all_enty,sector) "parameter to save iteration FE marginal price per sector [tr$2005/TWa]"
p_FEPrice_by_EmiMkt_iter(iteration,ttot,all_regi,all_enty,emiMkt) "parameter to save iteration FE marginal price per emission market [tr$2005/TWa]"
p_FEPrice_by_FE_iter(iteration,ttot,all_regi,all_enty) "parameter to save iteration FE marginal price [tr$2005/TWa]"

*** climate related
pm_globalMeanTemperature(tall) "global mean temperature anomaly"
Expand Down
2 changes: 1 addition & 1 deletion modules/37_industry/fixed_shares/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Parameters
o37_demFeIndSub(ttot,all_regi,all_enty,all_enty,secInd37,all_emiMkt) "FE demand per industry subsector, FE carrier, SE carrier, emissions market"

!! empty parameters from subsectors
pm_energy_limit(all_in) "" / /
pm_energy_limit(all_in) "empty parameter" / /

p37_CESMkup_input(all_in) "markup cost parameter read in from config for CES levels in industry to influence demand-side cost and efficiencies in CES tree [trUSD/CES input]"
/
Expand Down
10 changes: 5 additions & 5 deletions modules/37_industry/fixed_shares/sets.gms
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ Sets
/

!! empty sets for subsectors compatibility
industry_ue_calibration_target_dyn37(all_in) "" / /
ppfKap_industry_dyn37(all_in) "" / /
ue_industry_dyn37(all_in) "" / /
ces_eff_target_dyn37(all_in,all_in) "" / /
pf_industry_relaxed_bounds_dyn37(all_in) "" / /
industry_ue_calibration_target_dyn37(all_in) "empty set" / /
ppfKap_industry_dyn37(all_in) "empty set" / /
ue_industry_dyn37(all_in) "empty set" / /
ces_eff_target_dyn37(all_in,all_in) "empty set" / /
pf_industry_relaxed_bounds_dyn37(all_in) "empty set" / /
;

*** add module specific sets and mappings to the global sets and mappings
Expand Down
3 changes: 2 additions & 1 deletion tests/testthat/test_01-checkFixCfg.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,6 @@ test_that("checkFixCfg works", {
expect_match(w, paste0(n, "=", wrongsetting[[n]]), all = FALSE, fixed = TRUE)
}
expect_match(w, paste0(length(wrongsetting), " errors found"), all = FALSE, fixed = TRUE)
expect_equal(length(w), length(wrongsetting) + 1)
expect_match(w, "Chosen RCP scenario 'apocalypse' might currently not be fully operational", all = FALSE, fixed = TRUE)
expect_equal(length(w), length(wrongsetting) + 2)
})
2 changes: 1 addition & 1 deletion tests/testthat/test_04-gamscompile.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test_that("start.R --gamscompile works on all configs and scenarios", {
expect_true(length(csvfiles) > 0)
testthat::with_mocked_bindings(
for (csvfile in csvfiles) {
if (grepl("scenario_config_IKEA", csvfile)) next
if (grepl("scenario_config_IKEA|scenario_config_21_EU11_ARIADNE", csvfile)) next
test_that(paste("perform start.R --gamscompile with", basename(csvfile)), {
titletag <- paste0("titletag=TESTTHAT-", gsub(".csv$", "", basename(csvfile)))
output <- localSystem2("Rscript",
Expand Down
12 changes: 6 additions & 6 deletions tutorials/13_Submit_to_IIASA_database.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ The following functions from `piamInterfaces` might be helpful for further analy
- [`fixOnRef()`](https://github.com/pik-piam/piamInterfaces/blob/master/R/fixOnRef.R) checks whether the runs are correctly fixed on their reference run for delayed transition scenarios.
- [`plotIntercomparison()`](https://github.com/pik-piam/piamInterfaces/blob/master/R/plotIntercomparison.R) plots area and line plots of selected variables.

If you like to generate a 'historical.mif' file for a different regional resolution than the REMIND one to pass it to plotIntercomparison, you can use the [regionmapping](https://github.com/pik-piam/piamInterfaces/tree/master/inst/regionmapping) ISO files from piamInterfaces or a similarly formatted file, for example like this:
If you like to generate a 'historical.mif' file for a different regional resolution and variable naming scheme than the REMIND one to pass it to plotIntercomparison, you can use the [regionmapping](https://github.com/pik-piam/piamInterfaces/tree/master/inst/regionmapping) ISO files from piamInterfaces or a similarly formatted file, for example like this:
```
library(madrat)
library(mrremind)
library(madrat); library(mrremind); library(quitte); library(piamInterfaces)
stopifnot(utils::packageVersion("piamInterfaces") >= "0.35.3")
setConfig(regionmapping = system.file("regionmapping/ISO_2_ISO.csv", package = "piamInterfaces"))
d <- madrat::retrieveData("VALIDATIONREMIND")
system(paste("tar xvf", d))
quitte::write.mif(piamInterfaces::convertHistoricalData("historical.mif", "ScenarioMIP", "ISO_2_R10"), "historical_R10.mif")
quitte::write.mif(piamInterfaces::convertHistoricalData("historical.mif", "ScenarioMIP", "ISO_2_R5"), "historical_R5.mif")
system(paste("tar -xvf", d, "./historical.mif"))
hist <- read.snapshot("historical.mif")
write.mif(convertHistoricalData(hist, "ScenarioMIP", "ISO_2_R10"), "historical_R10.mif")
write.mif(convertHistoricalData(hist, "ScenarioMIP", "ISO_2_R5"), "historical_R5.mif")
```

## Further Information
Expand Down

0 comments on commit 1a7d08b

Please sign in to comment.