diff --git a/.Rprofile b/.Rprofile index 43d47c62c3..049e1ce91b 100644 --- a/.Rprofile +++ b/.Rprofile @@ -27,6 +27,7 @@ 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::install("rmarkdown", prompt = FALSE) # rmarkdown is required to find dependencies in Rmd files 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)) { @@ -37,5 +38,5 @@ if (isTRUE(rownames(installed.packages(priority = "NA")) == "renv")) { # in case bootstrapping fails halfway, install piamenv and rely on requirement auto-fixing if (tryCatch(utils::packageVersion("piamenv") < "0.5.5", error = function(error) TRUE)) { - renv::install("piamenv", type = getOption("pkgType"), prompt = FALSE) + renv::install("piamenv", prompt = FALSE) } diff --git a/.zenodo.json b/.zenodo.json index b2f362ae35..89137ae877 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "MAgPIE - An Open Source land-use modeling framework", - "version": "4.8.2", + "version": "4.9.0", "creators": [ { "name": "Dietrich, Jan Philipp", @@ -123,5 +123,5 @@ "license": { "id": "AGPL-3.0-or-later" }, - "publication_date": "2024-09-24" + "publication_date": "2024-12-05" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 566893809e..27f5724625 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,50 @@ 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.9.0] - 2024-12-05 + +### changed +- **35_natveg** revised age-class initialization of secondary forest +- **38_factor_costs** updated use of USDA cost shares +- **config** changed default input data to use 2017USD +- **config** default for `c60_bioenergy_subsidy` changed from 369 to 246 USD17MER per ton +- **config** SHAPE scenarios start year of dietary shift changed to 2025 +- **config** updated input data to rev4.114 +- **core** number of age-classes doubled from 150 to 300 years for better match of growth curves with potential natural vegetation. +- **extra/disaggregation** Peatland now considered in disaggregation of land pools +- **inputdata** changed GDP base year from 2005USD to 2017USD +- **module_documentation** all references to USD05 changed to USD17 +- **modules** update of scaling factors in several modules +- **scripts** NPI/NDC policies synced to the year 2025 - update of additional data to `additional_data_rev4.59.tgz` +- **scripts** REMIND coupling reads data in US$2017, not US$2005 +- **scripts** renamed disaggregation_mrdownscale.R -> mrdownscale_LUH2.R + +### added +- **32_forestry** added option s32_npi_ndc_reversal +- **35_natveg** added option s35_npi_ndc_reversal +- **56_ghg_policy** added new interface pcm_carbon_stock to avoid use of vm_carbon_stock.l in equations +- **58_peatland** added option for exogenous peatland rewetting +- **62_material** added switch to turn off future material demand for bioplastic +- **config** added SSP1-POP-GDP SSP2-POP-GDP and SSP5-POP-GDP +- **modules[29-35]** added initial values for ov_bv for better starting point +- **scripts** add mrdownscale script (0.5deg downscaling using LandUseInit as reference) + +### removed +- **13_tau** removed interface `fm_pastr_tau_hist` +- **31_past** removed `grasslands_apr22` realization + +### fixed +- **10_land** Simplified land transition matrix for improved feasibility +- **11_costs** changed equation to fix bug in total water cost calculation +- **28_ageclass** bugfix input data unit and code clean-up. Renamed `feb21` realization to `oct24` +- **29_cropland** treecover age-class growth was not working properly because ac_sub was erroneously not fixed +- **44_biodiversity** bugfix biorealm_biome.cs3 in input data (shares did not add-up to 1) +- **56_ghg_policy** Fader for GHG emission pricing policy +- **70_livestock** bugfix scaling.gms file in wrong folder +- **config** additional data increased to `additional_data_rev4.58.tgz` which fixes missing gdp2017 conversions in f20_processing_unitcosts +- **config** settings in default.cfg for some switches in `73_timber` did not work correctly +- **scripts** script/output/extra/resubmit.R + ## [4.8.2] - 2024-09-24 @@ -26,7 +70,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - **scripts** `.nc` files are no longer created by default after disaggregation - **scripts** output/extra/highres.R use default 13_tc realization - **scripts** rewrite of merge_report.R based on rds files and rbind, which allows for more flexibility when merging reports. Avoid inconsistent use of "GLO" instead of "World" in report.rds files. - +- **modules** renamed `country_dummy` to `country_switch` in all modules ### added - **42_water_demand** added water abstraction type dimension for non-ag uses @@ -43,7 +87,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - **scripts** added script for automatic submission of SEALS allocation runs `./extra/runSEALSallocation.R` - **scripts** added start script for 'Healthly Landscapes' paper `paper_healthyLscps.R` - ### fixed - **15_food** fixing parameter declaration of i15_processed_kcal_structure_iso - **35_natveg** bugfix secdforest and other land restoration to avoid double-counting of restoration in equation `q29_land_snv` @@ -79,7 +122,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - **config** update to input data rev4.109. In the previous rev4.108, MER GDP was wrong and was identical to PPP GDP - ## [4.8.0] - 2024-06-10 ### changed @@ -1009,7 +1051,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.8.2...develop +[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.9.0...develop +[4.9.0]: https://github.com/magpiemodel/magpie/compare/v4.8.2...v4.9.0 [4.8.2]: https://github.com/magpiemodel/magpie/compare/v4.8.1...v4.8.2 [4.8.1]: https://github.com/magpiemodel/magpie/compare/v4.8.0...v4.8.1 [4.8.0]: https://github.com/magpiemodel/magpie/compare/v4.7.3...v4.8.0 diff --git a/CITATION.cff b/CITATION.cff index 1b89aa711d..6b70e4bcc6 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -156,8 +156,8 @@ abstract: The *Model of Agricultural Production and its Impact on the Environmen exogenously given population in 10 food energy categories, based on regional diets. Future trends in food demand are derived from a cross-country regression analysis, based on future scenarios on GDP and population growth. -version: 4.8.2 -date-released: 2024-09-24 +version: 4.9.0 +date-released: 2024-12-05 repository-code: https://github.com/magpiemodel/magpie keywords: - landuse diff --git a/DESCRIPTION b/DESCRIPTION index 0f91ffe750..c96ed5b726 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -21,14 +21,14 @@ Imports: m4fsdp, madrat, magclass (>= 6.14.0), - magpie4 (>= 2.12.6), + magpie4 (>= 2.15.8), MagpieNCGains, - magpiesets, + magpiesets (>= 0.46.1), mip, mrcommons, patchwork, piamenv (>= 0.5.5), - piamInterfaces (>= 0.20.7), + piamInterfaces (>= 0.37.1), piamutils, quitte, raster, @@ -40,7 +40,7 @@ Imports: Suggests: goxygen, languageserver, - mrdownscale (>= 0.23.0), + mrdownscale (>= 0.28.0), qgraph, shinyresults, XML diff --git a/README.md b/README.md index 6e6e8f8bac..e4b5f3321d 100644 --- a/README.md +++ b/README.md @@ -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.8.2 can be found at -https://rse.pik-potsdam.de/doc/magpie/4.8.2/ +The model documentation for version 4.9.0 can be found at +https://rse.pik-potsdam.de/doc/magpie/4.9.0/ A most recent version of the documentation can also be extracted from the model source code via the R package goxygen @@ -226,7 +226,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.8.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.9.0/#how-to-cite) in the model documentation for information how to cite the model. ## AUTHORS See list of authors in CITATION.cff diff --git a/config/default.cfg b/config/default.cfg index 62f84ba1fc..8b5941ac4c 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -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.111_h12_magpie.tgz", - cellular = "rev4.111_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz", - validation = "rev4.111_h12_validation.tgz", - additional = "additional_data_rev4.53.tgz", - calibration = "calibration_H12_26Mar24_fixed.tgz") +cfg$input <- c(regional = "rev4.116_h12_magpie.tgz", + cellular = "rev4.116_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz", + validation = "rev4.116_h12_validation.tgz", + additional = "additional_data_rev4.59.tgz", + calibration = "calibration_H12_27Sep24.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, @@ -93,14 +93,14 @@ cfg$best_calib <- TRUE # def = TRUE # * (FALSE): Land conversion cost calibration will not be performed cfg$recalibrate_landconversion_cost <- "ifneeded" #def "ifneeded" # Up to which accuracy shall be recalibrated? -cfg$calib_accuracy_landconversion_cost <- 0.05 # def = 0.05 +cfg$calib_accuracy_landconversion_cost <- 0.01 # def = 0.01 # What is the maximum number of iterations if the precision goal is not reached? cfg$calib_maxiter_landconversion_cost <- 40 # def = 40 # Restart from existing calibration factors (TRUE or FALSE) -cfg$restart_landconversion_cost <- FALSE # def = FALSE +cfg$restart_landconversion_cost <- TRUE # def = TRUE # Number of lowpass filter iterations applied on calibration factors # for time steps 1995-2015 -cfg$lowpass_filter_landconversion_cost <- 1 # def= 1 +cfg$lowpass_filter_landconversion_cost <- 5 # def= 5 # Set upper limit for cropland calibration factor cfg$cost_calib_max_landconversion_cost <- 3 # def= 3 # Set lower limit for cropland calibration factor @@ -108,7 +108,7 @@ cfg$cost_calib_min_landconversion_cost <- 0.05 # def= 0.05 # Selection type of calibration factors. # If FALSE, calibration factors from the last iteration are used. # If TRUE, calibration factors from the iteration with the lowest divergence are used. -cfg$best_calib_landconversion_cost <- FALSE # def = FALSE +cfg$best_calib_landconversion_cost <- TRUE # def = TRUE # Settings for NPI/NDC recalculation # * (TRUE): NPI/NDC recalculation will be performed @@ -206,13 +206,6 @@ cfg$gms$sm_fix_cc <- 2025 # * (landmatrix_dec18): includes a land transition matrix cfg$gms$land <- "landmatrix_dec18" # def = landmatrix_dec18 -# * Artificial cost for balance variables (USD05MER per ha) -# * The balance variables in the land module avoid infeasibilities due to -# * differences in accuracy between parameters and variables in GAMS. -# * High costs make sure that the balance variables are only used as a last resort. -cfg$gms$s10_cost_balance <- 1e+06 # def = 1e+06 - - # ***--------------------- 11_costs ------ -------------------------------- # * (default): default cost realization cfg$gms$costs <- "default" # def = default @@ -585,8 +578,8 @@ cfg$gms$trade <- "selfsuff_reduced" # def = selfsuff_reduced # * options for `selfsuff_reduced` and `selfsuff_reduced_bilateral22` realizations: # * Commodities that can have additional imports to maintain feasibility cfg$gms$k_import21 <- "wood, woodfuel" -# * Cost for additional imports to maintain feasibility in USD05MER per tDM -cfg$gms$s21_cost_import <- 10000 # def = 10000 +# * Cost for additional imports to maintain feasibility in USD17MER per tDM +cfg$gms$s21_cost_import <- 12300 # def = 10000 * 1.23 # * trade balance reduction scenario # * (l909090r808080): 10 percent trade liberalisation for secondary and @@ -619,8 +612,9 @@ cfg$gms$s21_trade_tariff_startyear <- 2025 # * end year of fadeout if s21_trade_tariff_fadeout = 1 # def = 2050 cfg$gms$s21_trade_tariff_targetyear <- 2050 -# * Minimum trade margin for forestry products (USD05MER per tDM) -cfg$gms$s21_min_trade_margin_forestry <- 50 # def = 50 +# * Minimum trade margin for forestry products (USD17MER per tDM) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate:1.23) +cfg$gms$s21_min_trade_margin_forestry <- 62 # def = 50 * 1.23 # ***--------------------- 22_land_conservation -------------------------------------- @@ -689,8 +683,8 @@ cfg$gms$s22_conservation_start <- 2025 # def = 2025 cfg$gms$s22_conservation_target <- 2050 # def = 2050 # ***--------------------- 28_ageclass ----------------------------------- -# * (feb21): Distribution of age-classes according to Poulter et al 2018 -cfg$gms$ageclass <- "feb21" # def = feb21 +# * (oct24): Forest age-classes based on GFAD V1.1 from Poulter et al 2019 +cfg$gms$ageclass <- "oct24" # def = oct24 # ***--------------------- 29_cropland ----------------------------------- # * Cropland is defined as the sum of croparea, fallow land and tree cover @@ -764,14 +758,23 @@ cfg$gms$s29_treecover_max <- 0.4 # def = 0.4 cfg$gms$s29_treecover_scenario_start <- 2025 # def = 2025 # * Target year of fader (year when full implementation is reached) cfg$gms$s29_treecover_scenario_target <- 2050 # def = 2050 -# * Penalty for violation of treecover target before scenario start (USD05MER per ha) -cfg$gms$s29_treecover_penalty_before <- 0 # def = 0 -# * Penalty for violation of treecover target after scenario start (USD05MER per ha) -cfg$gms$s29_treecover_penalty <- 5000 # def = 5000 -# * Tree cover establishment cost (USD05MER per ha) -cfg$gms$s29_cost_treecover_est <- 2000 # def = 2000 -# * Tree cover recurring cost (USD05MER per ha) -cfg$gms$s29_cost_treecover_recur <- 500 # def = 500 +# * Penalty for violation of treecover target before scenario start (USD17MER per ha) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate:1.23) +cfg$gms$s29_treecover_penalty_before <- 0 # def = 0 +# * Penalty for violation of treecover target after scenario start (USD17MER per ha) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s29_treecover_penalty <- 6150 # def = 5000 * 1.23 +# * Tree cover establishment cost (USD17MER per ha) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate:1.23) +cfg$gms$s29_cost_treecover_est <- 2460 # def = 2000 * 1.23 +# * Tree cover recurring cost (USD17MER per ha) +cfg$gms$s29_cost_treecover_recur <- 615 # def = 500 * 1.23 +# * Switch for using natural vegetation (0) or plantation (1) growth curves towards LPJmL natural +# * vegetation carbon density. +cfg$gms$s29_treecover_plantation <- 0 # def = 0 +# * Switch for using secondary vegetation (0) or timber plantation (1) BII coefficients +# * The recommend setting is to map the BII coefficient to the choice of the growth curve. +cfg$gms$s29_treecover_bii_coeff <- 0 # def = 0 # * Sigmoid fader for minimum area share of fallow land on total cropland at cluster level # * Minimum area share of fallow land on total cropland in target year @@ -782,8 +785,9 @@ cfg$gms$s29_fallow_max <- 0.4 # def = 0.4 cfg$gms$s29_fallow_scenario_start <- 2025 # def = 2025 # * Target year of fader (year when full implementation is reached) cfg$gms$s29_fallow_scenario_target <- 2050 # def = 2050 -# * Penalty for violation of fallow land target (USD05MER per ha) -cfg$gms$s29_fallow_penalty <- 500 # def = 500 +# * Penalty for violation of fallow land target (USD17MER per ha) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s29_fallow_penalty <- 615 # def = 500 * 1.23 # ***--------------------- 30_croparea --------------------------------------- # * 30_croparea defines the croparea, which is a subcomponent of total cropland defined in 29_cropland. @@ -821,8 +825,9 @@ cfg$gms$s30_betr_target_noselect <- 0 # def = 0 cfg$gms$s30_betr_scenario_start <- 2025 # def = 2025 # * Target year of fader (year when full implementation is reached) cfg$gms$s30_betr_scenario_target <- 2050 # def = 2050 -# * Penalty for violation of the target (USD05MER per ha) -cfg$gms$s30_betr_penalty <- 2000 # def = 2000 +# * Penalty for violation of the target (USD17MER per ha) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s30_betr_penalty <- 2460 # def = 2000 * 1.23 # * Allowed annual cropland growth per year per region, relative to the current cropland level # * e.g., 0.02: 2% annual growth, compounded to 10.4% growth for five-years timestep @@ -861,34 +866,12 @@ cfg$gms$s30_rotation_scenario_target <- 2050 # def = 2050 # ***--------------------- 31_past --------------------------------------- # * (static): static pasture # * (endo_jun13): dynamic pasture -# * (grasslands_apr22): Grassland management separating managed pastures from rangelands # NOTE: It is recommended to recalibrate the model when changing this setting! cfg$gms$past <- "endo_jun13" # def = endo_jun13 -# * Factor requirements (USD04 per ton DM) +# * Factor requirements (USD17 per ton DM) cfg$gms$s31_fac_req_past <- 1 # def = 1 -# * switch for unequal (1) or equal (0) sign in pasture production constraint q31_prod. -# * unequal means that pasture production can be lower than pasture area x pasture yield, -# * reflecting that not all pasture area is grazed. -cfg$gms$s31_unequal <- 1 # def = 1 - -# * Scenario for grassland, pasture suitability areas 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" - -# * Switch that allows selecting how yield calibration factors will be calculated. -# * If 0, grassland yield calibration will be calculated as multiplicative relative values. -# * If 1, calibration values will be limited to additive absolute values when modeled yields strongly -# * underestimate historical values. For more information, read the description on the 'preloop' -# * file of module 31_past. - -# * options: 1 (limit to absolute values) -# * 0 (pure relative calibration) -cfg$gms$s31_limit_calib <- 1 # def = 1 - # ***--------------------- 32_forestry ----------------------------------- # * (dynamic_may24): Dynamic forestry sector including afforestation with detailed age-classes cfg$gms$forestry <- "dynamic_may24" # def = dynamic_may24 @@ -919,6 +902,9 @@ cfg$gms$s32_aff_bii_coeff <- 0 # def = 0 # * ("ndc"): prescribed afforestation based on NPI+NDC policies cfg$gms$c32_aff_policy <- "npi" # def = "npi" +# Year in which NPI NDC reversal should take place (e.g. 2025) +cfg$gms$s32_npi_ndc_reversal <- Inf # def = Inf + # Maximum total global afforestation in Mha (Inf = no constraint) # Note 1: the limit applies to the sum of endogenous CO2 price driven and exogenous NPI/NDC afforestation # Note 2: a limit of 0 or below the level of exogenous NPI/NDC afforestation will be a automatically raised to the level of exogenous NPI/NDC afforestation @@ -994,11 +980,13 @@ cfg$gms$s32_forestry_int_rate <- 0.05 # def = 0.05 # * 1 = forward looking (establishment based on future demand according to rotation length) cfg$gms$s32_demand_establishment <- 1 # def = 1 -# Establishment cost for plantations (USD per ha) -cfg$gms$s32_est_cost_plant <- 2000 # def = 2000 +# Establishment cost for plantations (USD17MER per ha) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s32_est_cost_plant <- 2460 # def = 2000 * 1.23 -# Establishment cost for natural vegetation (USD per ha) -cfg$gms$s32_est_cost_natveg <- 2000 # def = 2000 +# Establishment cost for natural vegetation (USD17MER per ha) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s32_est_cost_natveg <- 2460 # def = 2000 * 1.23 # Harvesting switch for timber production # * 0 = No harvested area from plantations, no age-class shifting (area held constant at 1995 levels) @@ -1052,6 +1040,9 @@ cfg$gms$c35_ad_policy <- "npi" # def = "npi" # * ("ndc"): avoided other land conversion based on NPI+NDC policies cfg$gms$c35_aolc_policy <- "npi" # def = "npi" +# Year in which NPI NDC reversal should take place (e.g. 2025) +cfg$gms$s35_npi_ndc_reversal <- Inf # def = Inf + # Distribution of age-classes during secondary forest initialization # * (0): All secondary forest belongs to highest age class # * (1): Equal distribution of secondary forest in all age-classes @@ -1093,7 +1084,7 @@ cfg$gms$c35_pot_forest_scenario <- "cc" # def = "cc" # * optimization cfg$gms$employment <- "exo_may22" # default = "exo_may22" -# * global minimum wage in USDMER05 per hour that needs to be reached in all countries by 2050 +# * global minimum wage in USD17MER per hour that needs to be reached in all countries by 2050 cfg$gms$s36_minimum_wage <- 0 # default = 0 (no minimum wage) # * A scenario that increases wages can either be fully related to productivity increase @@ -1168,16 +1159,21 @@ cfg$gms$s38_target_fulfillment <- 0.5 # default 0.5 # * (calib): Costs for cropland expansion are scaled with a regional calibration factor # * Costs for pasture and forestry expansion are global static cfg$gms$landconversion <- "calib" # def = calib -# * Cost for cropland expansion before calibration (USD05MER per hectare) -cfg$gms$s39_cost_establish_crop <- 10000 #def = 10000 -# * Reward for cropland reduction before calibration (USD05MER per hectare) -cfg$gms$s39_reward_crop_reduction <- 6000 -# * Cost for pasture land expansion (USD05MER per hectare) -cfg$gms$s39_cost_establish_past <- 8000 #def = 8000 -# * Cost for foresty land expansion (USD05MER per hectare) -cfg$gms$s39_cost_establish_forestry <- 1000 #def = 1000 -# * Cost for urban land expansion (USD05MER per hectare) -cfg$gms$s39_cost_establish_urban <- 10000 #def = 10000 +# * Cost for cropland expansion before calibration (USD17MER per hectare) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s39_cost_establish_crop <- 12300 #def = 10000 * 1.23 +# * Reward for cropland reduction before calibration (USD17MER per hectare) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s39_reward_crop_reduction <- 7380 #def = 6000 * 1.23 +# * Cost for pasture land expansion (USD17MER per hectare) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s39_cost_establish_past <- 9840 #def = 8000 * 1.23 +# * Cost for foresty land expansion (USD17MER per hectare) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s39_cost_establish_forestry <- 1230 #def = 1000 * 1.23 +# * Cost for urban land expansion (USD17MER per hectare) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s39_cost_establish_urban <- 12300 #def = 10000 * 1.23 # * Switch for ignoring land conversion cost calibration factors # * Options: 1 (ignore calibration factors) # * 0 (use calibration factors) @@ -1350,12 +1346,12 @@ cfg$gms$s44_bii_lower_bound <- 0 #def = 0 # * Note: The BII constraint is defined as a minimum constraint. Therefore, the actual BII can be higher than the lower bound. cfg$gms$c44_bii_decrease <- 1 #def = 1 -# * Technical costs for missing BII increase (USD per unit of BII) +# * Technical costs for missing BII increase (USD17MER per unit of BII) cfg$gms$s44_cost_bii_missing <- 1000000 #def = 1000000 # ** Options for realization `bv_btc_mar21` -# * Price for biodiversity stock loss/gain in target year (USD per ha) +# * Price for biodiversity stock loss/gain in target year (USD17MER per ha) # * Plausible range: 0-10000 # * Indicative outcomes # * 0: decrease of BII @@ -1364,7 +1360,7 @@ cfg$gms$s44_cost_bii_missing <- 1000000 #def = 1000000 # * 10000: stronger increase of BII cfg$gms$s44_target_price <- 0 #def = 0 -# * Price for biodiversity stock loss/gain in start year (USD per ha) +# * Price for biodiversity stock loss/gain in start year (USD17MER per ha) cfg$gms$s44_start_price <- 0 #def = 0 @@ -1517,7 +1513,7 @@ cfg$gms$s56_ghgprice_fader <- 0 # def = 0 # * Pollutants on which the GHG policy fader will applied cfg$gms$pollutants_fader <- c("co2_c", "ch4", "n2o_n_direct", "n2o_n_indirect", "nh3_n", "no2_n", "no3_n") # def = all pollutants # * Start year of GHG policy fade-in -cfg$gms$s56_fader_start <- 2030 # def = 2030 +cfg$gms$s56_fader_start <- 2025 # def = 2025 # * End year of GHG policy fade-in cfg$gms$s56_fader_end <- 2050 # def = 2050 # * Target value of GHG policy fade-in in end year @@ -1600,8 +1596,8 @@ cfg$path_to_report_ghgprices <- NA # * Note: minimum C price (see below) will be set regardless of this setting cfg$gms$c56_mute_ghgprices_until <- "y2030" # def = y2030 -# * Minium C price (USD per tC) for future time steps until (and including) the year defined in `c56_mute_ghgprices_until` -# * Note: in case of NDC policy a C price of 18 USD per tC (5 USD per tCO2) is used to guide land-use decisions (set via scenario_config.csv) +# * Minium C price (USD17MER per tC) for future time steps until (and including) the year defined in `c56_mute_ghgprices_until` +# * Note: in case of NDC policy a C price of 18 USD17MER per tC (5 USD17MER per tCO2) is used to guide land-use decisions (set via scenario_config.csv) cfg$gms$s56_minimum_cprice <- 0 # def = 0 # * Switch and specification of countries for which pollutant pricing in @@ -1636,17 +1632,18 @@ cfg$gms$s56_c_price_exp_aff <- 50 # def = 50 # * Values > 0 will reduce the incentive for c-price-induced re/afforestation cfg$gms$s56_buffer_aff <- 0.5 # def = 0.5 -# * Upper limit for CH4 and N2O GHG price (USD05MER per tC) +# * Upper limit for CH4 and N2O GHG price (USD17MER per tC) # * Limits GHG prices selected in c56_pollutant_prices to the chosen value. -# * CH4 and N2O GHG prices are limited by default to 4000 USD05MER per tC equivalent, +# * CH4 and N2O GHG prices are limited by default to 4920 USD17MER per tC equivalent, # * which induces the maximum abatement possible with c57_macc_version = "PBL_2022" -# * Beyond 4000 USD05MER per tC equivalent no further technical mitigation is possible +# * Beyond 4920 USD17MER per tC equivalent no further technical mitigation is possible # * but would increase agricultural prices. # * Suggested limits for different c57_macc_version settings -# * PBL_2007: 1000 (200 steps, 5 USD each) -# * PBL_2019: 4000 (200 steps, 20 USD each) -# * PBL_2022: 4000 (200 steps, 20 USD each) -cfg$gms$s56_limit_ch4_n2o_price <- 4000 # def = 4000 +# * PBL_2007: 1230 (200 steps, 5.615 USD each) +# * PBL_2019: 4920 (200 steps, 24.6 USD each) +# * PBL_2022: 4920 (200 steps, 24.6 USD each) +# * (values above are inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s56_limit_ch4_n2o_price <- 4920 # def = 4000 * 1.23 # * NOTE: The following 2 options for emission pricing have strong interactions in runs with CO2 prices and should only be changed by experienced users. # * The main purpose of these options is to regulate the pricing of positive emissions. Note that re/afforestation is covered by a separate mechanism. @@ -1726,18 +1723,45 @@ cfg$gms$peatland <- "v2" # def = v2 # * Inf (on) cfg$gms$s58_rewetting_switch <- Inf # def = Inf -# * One-time and recurring costs for peatland rewetting (USD05MER per ha) -cfg$gms$s58_cost_rewet_onetime <- 1000 # def = 1000 -cfg$gms$s58_cost_rewet_recur <- 30 # def = 30 - -# * One-time and recurring costs for peatland drainage (USD05MER per ha) +# * Switch and specification of countries for selected policies in apply. +# * Options: list of iso-codes of countries where exogenous peatland rewetting should be applied +# * Note: must be written in the format: "IND, BRA, DEU" +# * Default: all iso countries +cfg$gms$policy_countries58 <- all_iso_countries + +# * Switch for exogenous peatland rewetting for selected countries (0=off, 1=on) +cfg$gms$s58_rewetting_exo <- 0 # def = 0 +# * Switch for exogenous peatland rewetting for all other countries (0=off, 1=on) +cfg$gms$s58_rewetting_exo_noselect <- 0 # def = 0 +# * The following default values for exogenous peatland rewetting are based on the +# * Nature Restoration Law (NRL): 30 % by 2030, 40% by 2040, 50% by 2050 +# * Start year for exogenous peatland rewetting +cfg$gms$s58_rewet_exo_start_year <- 2030 # def = 2030 +# * Target year for exogenous peatland rewetting +cfg$gms$s58_rewet_exo_target_year <- 2050 # def = 2050 +# * Start value for exogenous peatland rewetting as share of drained peatland in reference period +cfg$gms$s58_rewet_exo_start_value <- 0.3 # def = 0.3 +# * Target value for exogenous peatland rewetting as share of drained peatland in reference period +cfg$gms$s58_rewet_exo_target_value <- 0.5 # def = 0.5 + +# * Switch for exogenous protection of intact peatland for selected countries (0=off, 1=on) +cfg$gms$s58_intact_prot_exo <- 0 # def = 0 +# * Switch for exogenous protection of intact peatland for all other countries (0=off, 1=on) +cfg$gms$s58_intact_prot_exo_noselect <- 0 # def = 0 + +# * One-time and recurring costs for peatland rewetting (USD17MER per ha) +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate:1.23) +cfg$gms$s58_cost_rewet_onetime <- 1230 # def = 1000 * 1.23 +cfg$gms$s58_cost_rewet_recur <- 37 # def = 30 * 1.23 + +# * One-time and recurring costs for peatland drainage (USD17MER per ha) # * One-time costs apply on the drainage of intact and rewetted peatland # * Recurring costs apply on the level of drained and managed peatland -cfg$gms$s58_cost_drain_intact_onetime <- 0 # def = 0 -cfg$gms$s58_cost_drain_rewet_onetime <- 1000 # def = 1000 +cfg$gms$s58_cost_drain_intact_onetime <- 1230 # def = 1230 +cfg$gms$s58_cost_drain_rewet_onetime <- 0 # def = 0 cfg$gms$s58_cost_drain_recur <- 0 # def = 0 -# * Penalty for technical peatland balance term (USD05MER) +# * Penalty for technical peatland balance term (USD17MER) cfg$gms$s58_balance_penalty <- 1000000 # def = 1000000 # * Switch for fixing peatland area until the year given by s58_fix_peatland to historic levels (not available in `off`). @@ -1882,13 +1906,17 @@ cfg$gms$c60_biodem_level <- 1 # def = 1 # * Therefore, the minimum demand is of particular importance for the coupling with REMIND. cfg$gms$s60_2ndgen_bioenergy_dem_min <- 1 # def = 1 -# * t DM-based first generation bioenergy subsidy (USD05MER per ton) +# * t DM-based first generation bioenergy subsidy (USD17MER per ton) +# * The subsidy can simulate a perfectly elastic demand for bioenergy from the energy sector and should be used as a +# * default floor price that avoids the wastage of ethanal or oils in case that the demand for byproducts +# * (oilcake and brewers grains) exceeds the demand for these secondary products. As such, it also avoids unrealistic +# * price fluctuations connected to the inelastic demand for couple products. # * (1stgen_priced_dec18): c60_bioenergy_subsidy is applied constant over historic and model horizon, c60_bioenergy_subsidy_fix_SSP2 has no effect # * (1st2ndgen_priced_feb24): c60_bioenergy_subsidy_fix_SSP2 is applied constant to historic time steps (up until sm_fix_SSP2). # * c60_bioenergy_subsidy is applied constant to model horizon (after sm_fix_SSP2) # * If GJ-based prices are used (setting below), c60_bioenergy_subsidy should be set to 0. -cfg$gms$c60_bioenergy_subsidy <- 300 # def = 300 -cfg$gms$c60_bioenergy_subsidy_fix_SSP2 <- 300 # def = 300 +cfg$gms$c60_bioenergy_subsidy <- 200 # def = 200 +cfg$gms$c60_bioenergy_subsidy_fix_SSP2 <- 200 # def = 200 # ** Options for realization `1st2ndgen_priced_feb24` @@ -1897,7 +1925,7 @@ cfg$gms$c60_bioenergy_subsidy_fix_SSP2 <- 300 # def = 300 # * This can be used to set model horizon minimum demand to 0 for price-driven runs cfg$gms$s60_2ndgen_bioenergy_dem_min_post_fix <- 1 # def = 1 -# * GJ-based bioenergy subsidy (USD05MER per GJ), only used in 1st2ndgen_priced_feb24 +# * GJ-based bioenergy subsidy (USD17MER per GJ), only used in 1st2ndgen_priced_feb24 # * Target prices for 1st and 2nd gen bioenergy cfg$gms$s60_bioenergy_gj_price_1st <- 0 # def = 0 cfg$gms$s60_bioenergy_price_2nd <- 0 # def = 0 @@ -1919,11 +1947,16 @@ cfg$gms$material <- "exo_flexreg_apr16" # * defined by the maximum demand for bioplastics s62_max_dem_bioplastics # * (in mio. tonnes) and the midpoint s62_midpoint_dem_bioplastics (i.e. # * where bioplastic demand is half of the maximum demand). -# * If maximum demand is 0, biomass demand for bioplastic production is not included. +# * If s62_include_bioplastic is set to 0, future biomass demand for bioplastic +# * production is not included. Otherwise, bioplastic demand is either kept +# * constant at the value of 2020 (if s62_max_dem_bioplastics is set to 0) +# * or follows a logistic curve with the specified maximum demand and +# * midpoint (s62_midpoint_dem_bioplastic). # * Projected total plastic use in the "Global Ambiton" scneario of the OECD is # * about 600 mio. tonnes in 2050 -> E.g. 200 mio. tonnes in 2050 could be a # * reasonable (but ambitious) bioplastic scenario. With midpoint 2050 this # * would mean s62_max_dem_bioplastic = 400. +cfg$gms$s62_include_bioplastic <- 1 # def = 1 cfg$gms$s62_max_dem_bioplastic <- 0 # def = 0 cfg$gms$s62_midpoint_dem_bioplastic <- 2050 # def = 2050 @@ -1989,23 +2022,22 @@ cfg$gms$timber <- "default" # def = default # (implicitly assuming the same rate for plantation harvest and establishment). # * 1=on # * 0=off -cfg$gms$s73_timber_demand_switch <- 1 # def = 1 - -# harvesting cost per ton of dry matter produced (USD/tDM) -s73_timber_prod_cost <- 2000 # def = 2000 +cfg$gms$s73_timber_demand_switch <- 1 # def = 1 -# harvesting cost per ha of forests (USD/ha) -s73_timber_harvest_cost <- 2000 # def = 2000 +# harvesting cost of industrial roundwood per ton of dry matter produced (USD17MER/tDM) +# based on https://unece.org/forests/prices: 60 EUR/m3 = 72 USD/m3; 72 USD/m3 / 0.6 = 120 USD/tDM +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s73_timber_prod_cost_wood <- 148 # def = 120 * 1.23 -# Cost multiplier for harvesting costs to make natural vegetation harvest expensive -# than timber plantation harvest. This provides a signal to the model to harvest -# timber plantations first. -s73_cost_multiplier <- 1.5 # def = 1.5 +# harvesting cost of woodfuel per ton of dry matter produced (USD17MER/tDM) +# based on https://unece.org/forests/prices +# * (inflated from default originally in USD05 using USD05 --> USD17 inflation rate: 1.23) +cfg$gms$s73_timber_prod_cost_woodfuel <- 74 # def = 60 * 1.23 # Cost of production without using any land in case the model is running into infeasibilities. -# This is a last ditch effort for the model and the variable associated with this cost -# should not be used in a normally feasible model run (USD/tDM) -s73_free_prod_cost <- 1000000 # def = 1000000 +# This is a last ditch effort for the model and the slack variable associated with this cost +# should not be used in a normally feasible model run (USD17MER/tDM) +cfg$gms$s73_free_prod_cost <- 1000000 # def = 1000000 # Switch for modifying woody biomass demand starting in 2035 # * ("default") = Default paper demand diff --git a/config/projects/scenario_config_el2.csv b/config/projects/scenario_config_el2.csv index a1f87bde9b..e48b47aae1 100644 --- a/config/projects/scenario_config_el2.csv +++ b/config/projects/scenario_config_el2.csv @@ -19,5 +19,5 @@ gms$s15_exo_alcohol;1;1;1 gms$s15_alc_scen;0;0;0 gms$factor_costs;sticky_labor;sticky_labor;sticky_labor gms$c70_feed_scen;ssp1;ssp2;ssp2 -input['cellular'];rev4.111EL2_h12_c6a7458f_cellularmagpie_c200_IPSL-CM6A-LR-ssp370_lpjml-8e6c5eb1.tgz;; +input['cellular'];rev4.116EL2_h12_c6a7458f_cellularmagpie_c200_IPSL-CM6A-LR-ssp370_lpjml-8e6c5eb1.tgz;; magicc_emis_scen;REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-12.mif;REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-12.mif;REMIND_generic_C_SSP2EU-DSPkB650-DS_betax_DeepDive_noNDC-rem-12.mif diff --git a/config/projects/scenario_config_fsec.csv b/config/projects/scenario_config_fsec.csv index f986caf4c6..c830f7fed0 100644 --- a/config/projects/scenario_config_fsec.csv +++ b/config/projects/scenario_config_fsec.csv @@ -76,9 +76,9 @@ gms$s62_max_dem_bioplastic;0;;;;400;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; gms$c70_fac_req_regr;reg;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; gms$c70_feed_scen;;;;;;;;;;;;;;;;;;ssp1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; gms$c73_build_demand;;;;;;;;;;;;;;;;;;;;;;;;50pc;;;;;;;;;;;;;;;;;;;;;;;;;;; -input['cellular'];rev4.111_FSEC_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.111_FSEC_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.111_FSEC_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;;rev4.111_FSEC_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.111_FSEC_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.111_FSEC_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.111_FSEC_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz;;; -input['regional'];rev4.111_FSEC_magpie.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -input['validation'];rev4.111_FSEC_validation.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -input['additional'];additional_data_rev4.51.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -input['calibration'];calibration_FSEC_26Mar24.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +input['cellular'];rev4.116_FSEC_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.116_FSEC_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.116_FSEC_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;;rev4.116_FSEC_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.116_FSEC_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.116_FSEC_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.116_FSEC_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz;;; +input['regional'];rev4.116_FSEC_magpie.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +input['validation'];rev4.116_FSEC_validation.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +input['additional'];additional_data_rev4.59.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +input['calibration'];calibration_FSEC_19Nov24.tgz;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; magicc_emis_scen;bjoernAR6_C_SSP2-NDC.mif;;;bjoernAR6_C_SSP2-PkBudg900.mif;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;bjoernAR6_C_SSP1-NDC.mif;;;;;;;;;;;;bjoernAR6_C_RemSDP-900-MagSSP1.mif;; diff --git a/config/scenario_config.csv b/config/scenario_config.csv index afe1469f1b..39fff4e2e2 100755 --- a/config/scenario_config.csv +++ b/config/scenario_config.csv @@ -1,77 +1,76 @@ -;cc;nocc;nocc_hist;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SDP;SDP-EI;SDP-RC;SDP-MC;BASE;NPI;NDC;coupling;emulator;input;eat_lancet_diet_v1;eat_lancet_diet_v2;ForestryEndo;ForestryExo;ForestryOff;rcp1p9;rcp2p6;rcp4p5;rcp6p0;rcp7p0;rcp8p5 -gms$c_timesteps;;;;;;;;;;;;;;;;;less_TS;less_TS;;;;;;;;;;;; -gms$c09_pop_scenario;;;;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SSP1;SSP1;SSP1;SSP1;;;;;;;;;;;;;;;;; -gms$c09_gdp_scenario;;;;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SSP1;SDP_EI;SDP_RC;SDP_MC;;;;;;;;;;;;;;;;; -gms$c09_pal_scenario;;;;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SSP1;SSP2;SSP1;SSP1;;;;;;;;;;;;;;;;; -gms$c14_yields_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;; -gms$c15_food_scenario;;;;SSP1;SSP2;SSP2;SSP3;SSP4;SSP5;SSP1;SSP2;SSP1;SSP1;;;;;;;;;;;;;;;;; -gms$s15_rumdairy_scp_substitution;;;;;;;;;;0;0.5;0;0;;;;;;;;;;;;;;;;; -gms$s15_food_subst_functional_form;;;;;;;;;;;2;;;;;;;;;;;;;;;;;;; -gms$s15_food_substitution_start;;;;;;;;;;;2020;;;;;;;;;;;;;;;;;;; -gms$s15_food_substitution_target;;;;;;;;;;;2050;;;;;;;;;;;;;;;;;;; -gms$kfo_rd;;;;;;;;;;;livst_rum;;;;;;;;;;;;;;;;;;; -gms$s15_exo_foodscen_convergence;;;;;;;;;;1;1;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_exo_foodscen_functional_form;;;;;;;;;;1;1;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_exo_foodscen_start;;;;;;;;;;2020;2020;2020;2020;;;;;;;2025;2025;;;;;;;;; -gms$s15_exo_foodscen_target;;;;;;;;;;2050;2050;2050;2070;;;;;;;2050;2050;;;;;;;;; -gms$s15_exo_waste;;;;;;;;;;1;1;1;1;;;;;;;;;;;;;;;;; -gms$s15_waste_scen;;;;;;;;;;1.2;1.3;1.2;1.25;;;;;;;;;;;;;;;;; -gms$s15_exo_diet;;;;;;;;;;1;1;1;1;;;;;;;1;3;;;;;;;;; -gms$c15_kcal_scen;;;;;;;;;;healthy_BMI;no_underweight;healthy_BMI;healthy_BMI;;;;;;;healthy_BMI;;;;;;;;;; -gms$c15_EAT_scen;;;;;;;;;;FLX;;FLX;FLX;;;;;;;FLX;;;;;;;;;; -gms$s15_exo_monogastric;;;;;;;;;;1;0;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_exo_ruminant;;;;;;;;;;1;0;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_exo_fish;;;;;;;;;;1;0;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_exo_fruitvegnut;;;;;;;;;;1;0;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_exo_roots;;;;;;;;;;1;0;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_exo_pulses;;;;;;;;;;1;0;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_exo_sugar;;;;;;;;;;1;0;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_exo_oils;;;;;;;;;;1;0;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_exo_brans;;;;;;;;;;1;0;1;1;;;;;;;1;0;;;;;;;;; -gms$s15_exo_scp;;;;;;;;;;1;0;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_exo_alcohol;;;;;;;;;;1;0;1;1;;;;;;;1;1;;;;;;;;; -gms$s15_alc_scen;;;;;;;;;;;;;;;;;;;;0.014;0;;;;;;;;; -gms$c21_trade_liberalization;;;;l908080r807070;l909090r808080;l909090r808080;l909595r809090;l908080r807070;l908080r807070;l908080r807070;l908080r807070;l909595r809090;l908080r807070;;;;;;;;;;;;;;;;; -gms$c22_protect_scenario;;;;;;;;;;BH;none;BH_IFL;BH;;;;;;;;;;;;;;;;; -gms$s29_snv_shr;;;;;;;;;;0;0;0;0.2;;;;;;;;;;;;;;;;; -gms$s29_snv_scenario_target;;;;;;;;;;;;;2030;;;;;;;;;;;;;;;;; -gms$c30_bioen_water;;;;;;;;;;rainfed;all;rainfed;rainfed;;;;;;;;;;;;;;;;; -gms$c31_grassl_yld_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;; -gms$s32_initial_distribution;;;;;;;;;;;;;;;;;;;;;;1;1;0;;;;;; -gms$s32_hvarea;;;;;;;;;;;;;;;;;;;;;;2;1;0;;;;;; -gms$s32_aff_plantation;;;;;;;;;;0;1;0;0;;;;;;;;;;;;;;;;; -gms$s32_aff_bii_coeff;;;;;;;;;;0;1;0;0;;;;;;;;;;;;;;;;; -gms$s32_max_aff_area;;;;;;;;;;500;350;0;700;;;;;;;;;;;;;;;;; -gms$c32_aff_mask;;;;;;;;;;onlytropical;onlytropical;onlytropical;onlytropical;;;;;;;;;;;;;;;;; -gms$c34_urban_scenario;;;;SSP1;SSP2;SSP2;SSP3;SSP4;SSP5;SSP1;SSP1;SSP2;SSP1;;;;;;;;;;;;;;;;; -gms$c32_aff_policy;;;;;;;;;;;;;;none;npi;ndc;;;;;;;;;;;;;; -gms$s32_planing_horizon;;;;;;;;;;50;30;50;50;;;;;;;;;;;;;;;;; -gms$c35_ad_policy;;;;;;;;;;;;;;none;npi;ndc;;;;;;;;;;;;;; -gms$c35_aolc_policy;;;;;;;;;;;;;;none;npi;ndc;;;;;;;;;;;;;; -gms$c35_pot_forest_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;; -gms$s35_forest_damage_end;;;;2030;2050;2050;2050;2050;2030;2030;2030;2030;2030;;;;;;;;;;;;;;;;; -gms$s35_secdf_distribution;;;;;;;;;;;;;;;;;;;;;;2;2;0;;;;;; -gms$s35_hvarea;;;;;;;;;;;;;;;;;;;;;;2;2;0;;;;;; -gms$c42_watdem_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;; -gms$s42_watdem_nonagr_scenario;;;;1;2;2;3;2;1;1;1;3;1;;;;;;;;;;;;;;;;; -gms$s42_irrig_eff_scenario;;;;;;;;;;3;3;3;3;;;;;;;;;;;;;;;;; -gms$c42_env_flow_policy;;;;on;off;off;off;mixed;on;on;on;on;on;;;;;;;;;;;;;;;;; -gms$s42_efp_targetyear;;;;;;;;;;2040;2050;2070;2050;;;;;;;;;;;;;;;;; -gms$c43_watavail_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;; -gms$c50_scen_neff;;;;baseeff_add3_add10_add20_max75;baseeff_add3_add5_add10_max65;baseeff_add3_add5_add10_max65;baseeff_add3_add0_add0_max55;baseeff_add3_add10_add15_max75;baseeff_add3_add5_add15_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max65;baseeff_add3_add15_add25_max75;;;;;;;;;;;;;;;;; -gms$c52_carbon_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;; -gms$c52_land_carbon_sink_rcp;;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;RCP19;RCP26;RCP45;RCP60;RCPBU;RCPBU -gms$c55_scen_conf;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;ssp1;ssp1;ssp1;ssp1;;;;;;;;;;;;;;;;; -gms$c56_pollutant_prices;;;;;;;;;;;;;;;;;coupling;emulator;coupling;;;;;;;;;;; -gms$s56_c_price_exp_aff;;;;;;;;;;50;30;50;50;;;;;;;;;;;;;;;;; -gms$s56_buffer_aff;;;;;;;;;;0.5;0.5;0.2;0.3;;;;;;;;;;;;;;;;; -gms$c56_emis_policy;;;;;;;;;;reddnatveg_nosoil;reddnatveg_nosoil;redd_nosoil;all_nosoil;;;;;;;;;;;;;;;;; -gms$s56_minimum_cprice;;;;;;;;;;;;;;0;0;18;;;;;;;;;;;;;; -gms$c59_som_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;; -gms$c60_1stgen_biodem;;;;phaseout2020;const2020;const2020;const2030;const2020;phaseout2020;phaseout2020;phaseout2020;phaseout2020;phaseout2020;;;;;;;;;;;;;;;;; -gms$c60_2ndgen_biodem;;;;;;;;;;;;;;;;;coupling;emulator;coupling;;;;;;;;;;; -gms$c60_biodem_level;;;;;;;;;;;;;;;;;1;0;;;;;;;;;;;; -gms$c60_res_2ndgenBE_dem;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;sdp;ssp2;sdp;sdp;;;;;;;;;;;;;;;;; -gms$c70_feed_scen;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;ssp1;ssp5;ssp1;ssp1;;;;;;;;;;;;;;;;; -gms$s73_timber_demand_switch;;;;;;;;;;;;;;;;;;;;;;1;1;0;;;;;; -input['cellular'];;;;;;;;;;;;;;;;;;;;;;;;;rev4.111_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.111_h12_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.111_h12_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.111_h12_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.111_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.111_h12_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz +;cc;nocc;nocc_hist;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SDP;SDP-EI;SDP-RC;SDP-MC;SSP1-POP-GDP;SSP2-POP-GDP;SSP5-POP-GDP;BASE;NPI;NDC;coupling;emulator;input;eat_lancet_diet_v1;eat_lancet_diet_v2;ForestryEndo;ForestryExo;ForestryOff;rcp1p9;rcp2p6;rcp4p5;rcp6p0;rcp7p0;rcp8p5 +gms$c_timesteps;;;;;;;;;;;;;;;;;;;;less_TS;less_TS;;;;;;;;;;;; +gms$c09_pop_scenario;;;;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SSP1;SSP1;SSP1;SSP1;SSP1;SSP2;SSP5;;;;;;;;;;;;;;;;; +gms$c09_gdp_scenario;;;;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SSP1;SDP_EI;SDP_RC;SDP_MC;SSP1;SSP2;SSP5;;;;;;;;;;;;;;;;; +gms$c09_pal_scenario;;;;SSP1;SSP2;SSP2EU;SSP3;SSP4;SSP5;SSP1;SSP2;SSP1;SSP1;;;;;;;;;;;;;;;;;;;; +gms$c14_yields_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +gms$c15_food_scenario;;;;SSP1;SSP2;SSP2;SSP3;SSP4;SSP5;SSP1;SSP2;SSP1;SSP1;;;;;;;;;;;;;;;;;;;; +gms$s15_rumdairy_scp_substitution;;;;;;;;;;0;0.5;0;0;;;;;;;;;;;;;;;;;;;; +gms$s15_food_subst_functional_form;;;;;;;;;;;2;;;;;;;;;;;;;;;;;;;;;; +gms$s15_food_substitution_start;;;;;;;;;;;2025;;;;;;;;;;;;;;;;;;;;;; +gms$s15_food_substitution_target;;;;;;;;;;;2050;;;;;;;;;;;;;;;;;;;;;; +gms$kfo_rd;;;;;;;;;;;livst_rum;;;;;;;;;;;;;;;;;;;;;; +gms$s15_exo_foodscen_convergence;;;;;;;;;;1;1;1;1;;;;;;;;;;1;1;;;;;;;;; +gms$s15_exo_foodscen_functional_form;;;;;;;;;;1;1;1;1;;;;;;;;;;1;1;;;;;;;;; +gms$s15_exo_foodscen_start;;;;;;;;;;2025;2025;2025;2025;;;;;;;;;;2025;2025;;;;;;;;; +gms$s15_exo_foodscen_target;;;;;;;;;;2050;2050;2050;2070;;;;;;;;;;2050;2050;;;;;;;;; +gms$s15_exo_waste;;;;;;;;;;1;1;1;1;;;;;;;;;;;;;;;;;;;; +gms$s15_waste_scen;;;;;;;;;;1.2;1.3;1.2;1.25;;;;;;;;;;;;;;;;;;;; +gms$s15_exo_diet;;;;;;;;;;1;1;1;1;;;;;;;;;;1;3;;;;;;;;; +gms$c15_kcal_scen;;;;;;;;;;healthy_BMI;no_underweight;healthy_BMI;healthy_BMI;;;;;;;;;;healthy_BMI;;;;;;;;;; +gms$c15_EAT_scen;;;;;;;;;;FLX;;FLX;FLX;;;;;;;;;;FLX;;;;;;;;;; +gms$s15_exo_monogastric;;;;;;;;;;1;0;1;1;;;;;;;;;;1;1;;;;;;;;; +gms$s15_exo_ruminant;;;;;;;;;;1;0;1;1;;;;;;;;;;1;1;;;;;;;;; +gms$s15_exo_fish;;;;;;;;;;1;0;1;1;;;;;;;;;;1;1;;;;;;;;; +gms$s15_exo_fruitvegnut;;;;;;;;;;1;0;1;1;;;;;;;;;;1;1;;;;;;;;; +gms$s15_exo_roots;;;;;;;;;;1;0;1;1;;;;;;;;;;1;1;;;;;;;;; +gms$s15_exo_pulses;;;;;;;;;;1;0;1;1;;;;;;;;;;1;1;;;;;;;;; +gms$s15_exo_sugar;;;;;;;;;;1;0;1;1;;;;;;;;;;1;1;;;;;;;;; +gms$s15_exo_oils;;;;;;;;;;1;0;1;1;;;;;;;;;;1;1;;;;;;;;; +gms$s15_exo_brans;;;;;;;;;;1;0;1;1;;;;;;;;;;1;0;;;;;;;;; +gms$s15_exo_scp;;;;;;;;;;1;0;1;1;;;;;;;;;;1;1;;;;;;;;; +gms$s15_exo_alcohol;;;;;;;;;;1;0;1;1;;;;;;;;;;1;1;;;;;;;;; +gms$s15_alc_scen;;;;;;;;;;;;;;;;;;;;;;;0.014;0;;;;;;;;; +gms$c21_trade_liberalization;;;;l908080r807070;l909090r808080;l909090r808080;l909595r809090;l908080r807070;l908080r807070;l908080r807070;l908080r807070;l909595r809090;l908080r807070;;;;;;;;;;;;;;;;;;;; +gms$c22_protect_scenario;;;;;;;;;;BH;none;BH_IFL;BH;;;;;;;;;;;;;;;;;;;; +gms$s29_snv_shr;;;;;;;;;;0;0;0;0.2;;;;;;;;;;;;;;;;;;;; +gms$s29_snv_scenario_target;;;;;;;;;;;;;2030;;;;;;;;;;;;;;;;;;;; +gms$c30_bioen_water;;;;;;;;;;rainfed;all;rainfed;rainfed;;;;;;;;;;;;;;;;;;;; +gms$s32_initial_distribution;;;;;;;;;;;;;;;;;;;;;;;;;1;1;0;;;;;; +gms$s32_hvarea;;;;;;;;;;;;;;;;;;;;;;;;;2;1;0;;;;;; +gms$s32_aff_plantation;;;;;;;;;;0;1;0;0;;;;;;;;;;;;;;;;;;;; +gms$s32_aff_bii_coeff;;;;;;;;;;0;1;0;0;;;;;;;;;;;;;;;;;;;; +gms$s32_max_aff_area;;;;;;;;;;500;350;0;700;;;;;;;;;;;;;;;;;;;; +gms$c32_aff_mask;;;;;;;;;;onlytropical;onlytropical;onlytropical;onlytropical;;;;;;;;;;;;;;;;;;;; +gms$c34_urban_scenario;;;;SSP1;SSP2;SSP2;SSP3;SSP4;SSP5;SSP1;SSP1;SSP2;SSP1;;;;;;;;;;;;;;;;;;;; +gms$c32_aff_policy;;;;;;;;;;;;;;;;;none;npi;ndc;;;;;;;;;;;;;; +gms$s32_planing_horizon;;;;;;;;;;50;30;50;50;;;;;;;;;;;;;;;;;;;; +gms$c35_ad_policy;;;;;;;;;;;;;;;;;none;npi;ndc;;;;;;;;;;;;;; +gms$c35_aolc_policy;;;;;;;;;;;;;;;;;none;npi;ndc;;;;;;;;;;;;;; +gms$c35_pot_forest_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +gms$s35_forest_damage_end;;;;2030;2050;2050;2050;2050;2030;2030;2030;2030;2030;;;;;;;;;;;;;;;;;;;; +gms$s35_secdf_distribution;;;;;;;;;;;;;;;;;;;;;;;;;2;2;0;;;;;; +gms$s35_hvarea;;;;;;;;;;;;;;;;;;;;;;;;;2;2;0;;;;;; +gms$c42_watdem_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +gms$s42_watdem_nonagr_scenario;;;;1;2;2;3;2;1;1;1;3;1;;;;;;;;;;;;;;;;;;;; +gms$s42_irrig_eff_scenario;;;;;;;;;;3;3;3;3;;;;;;;;;;;;;;;;;;;; +gms$c42_env_flow_policy;;;;on;off;off;off;mixed;on;on;on;on;on;;;;;;;;;;;;;;;;;;;; +gms$s42_efp_targetyear;;;;;;;;;;2040;2050;2070;2050;;;;;;;;;;;;;;;;;;;; +gms$c43_watavail_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +gms$c50_scen_neff;;;;baseeff_add3_add10_add20_max75;baseeff_add3_add5_add10_max65;baseeff_add3_add5_add10_max65;baseeff_add3_add0_add0_max55;baseeff_add3_add10_add15_max75;baseeff_add3_add5_add15_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max75;baseeff_add3_add15_add25_max65;baseeff_add3_add15_add25_max75;;;;;;;;;;;;;;;;;;;; +gms$c52_carbon_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +gms$c52_land_carbon_sink_rcp;;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;RCP19;RCP26;RCP45;RCP60;RCPBU;RCPBU +gms$c55_scen_conf;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;ssp1;ssp1;ssp1;ssp1;;;;;;;;;;;;;;;;;;;; +gms$c56_pollutant_prices;;;;;;;;;;;;;;;;;;;;coupling;emulator;coupling;;;;;;;;;;; +gms$s56_c_price_exp_aff;;;;;;;;;;50;30;50;50;;;;;;;;;;;;;;;;;;;; +gms$s56_buffer_aff;;;;;;;;;;0.5;0.5;0.2;0.3;;;;;;;;;;;;;;;;;;;; +gms$c56_emis_policy;;;;;;;;;;reddnatveg_nosoil;reddnatveg_nosoil;redd_nosoil;all_nosoil;;;;;;;;;;;;;;;;;;;; +gms$s56_minimum_cprice;;;;;;;;;;;;;;;;;0;0;18;;;;;;;;;;;;;; +gms$c59_som_scenario;cc;nocc;nocc_hist;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +gms$c60_1stgen_biodem;;;;phaseout2020;const2020;const2020;const2030;const2020;phaseout2020;phaseout2020;phaseout2020;phaseout2020;phaseout2020;;;;;;;;;;;;;;;;;;;; +gms$c60_2ndgen_biodem;;;;;;;;;;;;;;;;;;;;coupling;emulator;coupling;;;;;;;;;;; +gms$c60_biodem_level;;;;;;;;;;;;;;;;;;;;1;0;;;;;;;;;;;; +gms$c60_res_2ndgenBE_dem;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;sdp;ssp2;sdp;sdp;;;;;;;;;;;;;;;;;;;; +gms$c70_feed_scen;;;;ssp1;ssp2;ssp2;ssp3;ssp4;ssp5;ssp1;ssp5;ssp1;ssp1;;;;;;;;;;;;;;;;;;;; +gms$s73_timber_demand_switch;;;;;;;;;;;;;;;;;;;;;;;;;1;1;0;;;;;; +input['cellular'];;;;;;;;;;;;;;;;;;;;;;;;;;;;rev4.116_h12_0bd54110_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1.tgz;rev4.116_h12_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz;rev4.116_h12_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz;rev4.116_h12_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz;rev4.116_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz;rev4.116_h12_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz diff --git a/core/sets.gms b/core/sets.gms index d68a6b0774..e0a63e1bf7 100644 --- a/core/sets.gms +++ b/core/sets.gms @@ -264,7 +264,10 @@ sets ac Age classes / ac0,ac5,ac10,ac15,ac20,ac25,ac30,ac35,ac40,ac45,ac50, ac55,ac60,ac65,ac70,ac75,ac80,ac85,ac90,ac95,ac100, ac105,ac110,ac115,ac120,ac125,ac130,ac135,ac140,ac145, - ac150,ac155,acx / + ac150,ac155,ac160,ac165,ac170,ac175,ac180,ac185,ac190,ac195, + ac200,ac205,ac210,ac215,ac220,ac225,ac230,ac235,ac240,ac245, + ac250,ac255,ac260,ac265,ac270,ac275,ac280,ac285,ac290,ac295, + ac300, acx / ac_est(ac) Dynamic subset of age classes for establishment diff --git a/literature.bib b/literature.bib index 64b837e368..ec51852a27 100644 --- a/literature.bib +++ b/literature.bib @@ -1361,6 +1361,19 @@ @article{poulter2018global publisher = {NASA National Aeronautics and Space Administration, PANGAEA} } +@misc{poulter_global_2019, + title = {The global forest age dataset and its uncertainties (GFADv1.1)}, + copyright = {info:eu-repo/semantics/openAccess}, + url = {https://doi.pangaea.de/10.1594/PANGAEA.897392}, + doi = {10.1594/PANGAEA.897392}, + urldate = {2024-10-27}, + publisher = {PANGAEA}, + author = {Poulter, Benjamin and Aragão, Luiz and Andela, Niels and Bellassen, Valentin and Ciais, Philippe and Kato, Tomomichi and Lin, Xin and Nachin, Baatarbileg and Luyssaert, Sebastiaan and Pederson, Niel and Peylin, Philippe and Piao, Shilong and Pugh, Tom and Saatchi, Sassan and Schepaschenko, Dmitry and Schelhaas, Martjan and Shivdenko, Anatoly}, + year = {2019}, + note = {Publication Title: NASA National Aeronautics and Space Administration}, + keywords = {age class, GFAD, Poulter}, +} + @article{zabel_global_2014, title = {Global {{Agricultural Land Resources}} \textendash{} {{A High Resolution Suitability Evaluation}} and {{Its Perspectives}} until 2100 under {{Climate Change Conditions}}}, author = {Zabel, Florian and Putzenlechner, Birgitta and Mauser, Wolfram}, @@ -1698,3 +1711,13 @@ @article{jarvio_LCA_MP_2021 keywords = {LCA, Food, Hydrogen-oxidizing bacteria, Cellular agriculture, Microbial protein}, pages = {145764}, } + + +@techreport{budynski_straw_2020, + title = {Straw manufacturing in {Alberta}}, + url = {https://open.alberta.ca/dataset/690317b0-1d07-4f9e-ae71-6340e16f6493/resource/89789096-1c7a-47ab-beb2-94d55606c922/}, + language = {en}, + institution = {Published by Alberta Agriculture and Forestry}, + author = {Budynski, Stephanie}, + year = {2020}, +} diff --git a/main.gms b/main.gms index b3dc7e93f8..9b70d4a2ed 100644 --- a/main.gms +++ b/main.gms @@ -148,24 +148,23 @@ $title magpie *##################### R SECTION START (VERSION INFO) ########################## * -* Used data set: rev4.109_h12_magpie.tgz +* Used data set: rev4.116_h12_magpie.tgz * md5sum: NA -* Repository: scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output +* Repository: https://rse.pik-potsdam.de/data/magpie/public * -* Used data set: rev4.109_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz +* Used data set: rev4.116_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz * md5sum: NA -* Repository: scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output +* Repository: https://rse.pik-potsdam.de/data/magpie/public * -* Used data set: rev4.109_h12_validation.tgz +* Used data set: rev4.116_h12_validation.tgz * md5sum: NA -* Repository: scp://cluster.pik-potsdam.de/p/projects/rd3mod/inputdata/output +* Repository: https://rse.pik-potsdam.de/data/magpie/public * -* Used data set: additional_data_rev4.50.tgz +* Used data set: additional_data_rev4.59.tgz * md5sum: NA * Repository: https://rse.pik-potsdam.de/data/magpie/public - * -* Used data set: calibration_H12_26Mar24.tgz +* Used data set: calibration_H12_27Sep24.tgz * md5sum: NA * Repository: https://rse.pik-potsdam.de/data/magpie/public * @@ -180,11 +179,11 @@ $title magpie * * Regionscode: 62eff8f7 * -* Regions data revision: 4.109 +* Regions data revision: 4.114 * * lpj2magpie settings: * * LPJmL data: MRI-ESM2-0:ssp370 -* * Revision: 4.109 +* * Revision: 4.114 * * aggregation settings: * * Input resolution: 0.5 @@ -196,8 +195,7 @@ $title magpie * * Call: withCallingHandlers(expr, message = messageHandler, warning = warningHandler, error = errorHandler) * * -* Last modification (input data): Tue Jun 18 09:52:31 2024 - +* Last modification (input data): Sun Oct 27 00:37:36 2024 * *###################### R SECTION END (VERSION INFO) ########################### @@ -249,7 +247,7 @@ $setglobal processing substitution_may21 $setglobal trade selfsuff_reduced $setglobal land_conservation area_based_apr22 -$setglobal ageclass feb21 +$setglobal ageclass oct24 $setglobal cropland simple_apr24 $setglobal croparea simple_apr24 diff --git a/modules/09_drivers/aug17/declarations.gms b/modules/09_drivers/aug17/declarations.gms index 004c7bc854..d58fb9c2b7 100644 --- a/modules/09_drivers/aug17/declarations.gms +++ b/modules/09_drivers/aug17/declarations.gms @@ -12,22 +12,22 @@ parameters i09_pop_raw(t_all,i,pop_gdp_scen09) Population (mio. per yr) * GDP in MER - i09_gdp_mer_iso(t_all,iso) Income in market exchange rates (mio. USD05MER per yr) - im_gdp_pc_mer_iso(t_all,iso) Income in market exchange rates (mio. USD05MER per yr) - i09_gdp_mer_raw(t_all,i,pop_gdp_scen09) Income in market exchange rates (mio. USD05MER per yr) + i09_gdp_mer_iso(t_all,iso) Income in market exchange rates (mio. USD17MER per yr) + im_gdp_pc_mer_iso(t_all,iso) Income in market exchange rates (mio. USD17MER per yr) + i09_gdp_mer_raw(t_all,i,pop_gdp_scen09) Income in market exchange rates (mio. USD17MER per yr) - i09_gdp_pc_mer_raw(t_all,i,pop_gdp_scen09) Per capita income in market exchange rates (USD05MER per cap per yr) - im_gdp_pc_mer(t_all,i) Per capita income in market exchange rates (USD05MER per cap per yr) - i09_gdp_pc_mer_iso_raw(t_all,iso,pop_gdp_scen09) Per capita income in market exchange rates (USD05MER per cap per yr) + i09_gdp_pc_mer_raw(t_all,i,pop_gdp_scen09) Per capita income in market exchange rates (USD17MER per cap per yr) + im_gdp_pc_mer(t_all,i) Per capita income in market exchange rates (USD17MER per cap per yr) + i09_gdp_pc_mer_iso_raw(t_all,iso,pop_gdp_scen09) Per capita income in market exchange rates (USD17MER per cap per yr) * GDP in PPP - i09_gdp_ppp_iso(t_all,iso) Income in purchasing power parity (mio. USD05PPP per yr) - i09_gdp_ppp_raw(t_all,i,pop_gdp_scen09) Income in purchasing power parity (mio. USD05PPP per yr) - - i09_gdp_pc_ppp_raw(t_all,i,pop_gdp_scen09) Per capita income in purchasing power parity (USD05PPP per cap per yr) - i09_gdp_pc_ppp_iso_raw(t_all,iso,pop_gdp_scen09) Per capita income in purchasing power parity (USD05PPP per cap per yr) - im_gdp_pc_ppp_iso(t_all,iso) Per capita income in purchasing power parity (USD05PPP per cap per yr) + i09_gdp_ppp_iso(t_all,iso) Income in purchasing power parity (mio. USD17PPP per yr) + i09_gdp_ppp_raw(t_all,i,pop_gdp_scen09) Income in purchasing power parity (mio. USD17PPP per yr) + i09_gdp_pc_ppp_raw(t_all,i,pop_gdp_scen09) Per capita income in purchasing power parity (USD17PPP per cap per yr) + i09_gdp_pc_ppp_iso_raw(t_all,iso,pop_gdp_scen09) Per capita income in purchasing power parity (USD17PPP per cap per yr) + im_gdp_pc_ppp_iso(t_all,iso) Per capita income in purchasing power parity (USD17PPP per cap per yr) + * Development State im_development_state(t_all,i) Development state according to the World Bank definition where 0=low income country 1=high income country in high income level (1) im_physical_inactivity(t_all,iso,sex,age) Share of population which is physically inactive (1) diff --git a/modules/09_drivers/aug17/input.gms b/modules/09_drivers/aug17/input.gms index 627d78607b..490be58bdc 100644 --- a/modules/09_drivers/aug17/input.gms +++ b/modules/09_drivers/aug17/input.gms @@ -23,12 +23,12 @@ parameters sm_fix_cc year until which all parameters affected by cc are fixed to historical values (year) / 2025 / ; -table f09_gdp_ppp_iso(t_all,iso,pop_gdp_scen09) Income in purchasing power parity (mio. USD05PPP per yr) +table f09_gdp_ppp_iso(t_all,iso,pop_gdp_scen09) Income in purchasing power parity (mio. USD17PPP per yr) $ondelim $include "./modules/09_drivers/input/f09_gdp_ppp_iso.csv" $offdelim; -table f09_gdp_mer_iso(t_all,iso,pop_gdp_scen09) Income in market exchange rates (mio. USD05MER per yr) +table f09_gdp_mer_iso(t_all,iso,pop_gdp_scen09) Income in market exchange rates (mio. USD17MER per yr) $ondelim $include "./modules/09_drivers/input/f09_gdp_mer_iso.csv" $offdelim; @@ -52,3 +52,10 @@ table f09_physical_inactivity(t_all,iso,pop_gdp_scen09,sex,age) Share of populat $ondelim $include "./modules/09_drivers/input/f09_physical_inactivity.cs3" $offdelim; + +parameter fm_gdp_defl_ppp(iso) GDP deflator +/ +$ondelim +$include "./modules/09_drivers/input/fm_gdp_defl_ppp.cs4" +$offdelim +/; diff --git a/modules/09_drivers/input/files b/modules/09_drivers/input/files index 752a896349..cac0468831 100644 --- a/modules/09_drivers/input/files +++ b/modules/09_drivers/input/files @@ -6,3 +6,4 @@ f09_pop_iso.csv f09_urban_iso.csv f09_demography.cs3 f09_physical_inactivity.cs3 +fm_gdp_defl_ppp.cs4 diff --git a/modules/10_land/landmatrix_dec18/declarations.gms b/modules/10_land/landmatrix_dec18/declarations.gms index 8a7737a301..b0fb5b0616 100644 --- a/modules/10_land/landmatrix_dec18/declarations.gms +++ b/modules/10_land/landmatrix_dec18/declarations.gms @@ -19,19 +19,17 @@ positive variables vm_land(j,land) Land area of the different land types (mio. ha) vm_landexpansion(j,land) Land expansion (mio. ha) vm_landreduction(j,land) Land reduction (mio. ha) - vm_cost_land_transition(j) Costs for lu transitions (mio. USD05MER per yr) + vm_cost_land_transition(j) Costs for lu transitions (mio. USD17MER per yr) vm_lu_transitions(j,land_from,land_to) Land transitions between time steps (mio. ha) - v10_balance_positive(j) Balance variable for land transitions (mio. ha) - v10_balance_negative(j) Balance variable for land transitions (mio. ha) ; equations - q10_transition_matrix(j) Land transition constraint cell area (mio. ha) + q10_land_area(j) Land transition constraint cell area (mio. ha) q10_transition_to(j,land_to) Land transition constraint to (mio. ha) q10_transition_from(j,land_from) Land transition constraint from (mio. ha) q10_landexpansion(j,land_to) Land expansion constraint (mio. ha) q10_landreduction(j,land_from) Land reduction constraint (mio. ha) - q10_cost(j) Costs for lu transitions (mio. USD05MER per yr) + q10_cost(j) Costs for lu transitions (mio. USD17MER per yr) q10_landdiff Land difference constraint (mio. ha) ; @@ -41,16 +39,14 @@ parameters ov_land(t,j,land,type) Land area of the different land types (mio. ha) ov_landexpansion(t,j,land,type) Land expansion (mio. ha) ov_landreduction(t,j,land,type) Land reduction (mio. ha) - ov_cost_land_transition(t,j,type) Costs for lu transitions (mio. USD05MER per yr) + ov_cost_land_transition(t,j,type) Costs for lu transitions (mio. USD17MER per yr) ov_lu_transitions(t,j,land_from,land_to,type) Land transitions between time steps (mio. ha) - ov10_balance_positive(t,j,type) Balance variable for land transitions (mio. ha) - ov10_balance_negative(t,j,type) Balance variable for land transitions (mio. ha) - oq10_transition_matrix(t,j,type) Land transition constraint cell area (mio. ha) + oq10_land_area(t,j,type) Land transition constraint cell area (mio. ha) oq10_transition_to(t,j,land_to,type) Land transition constraint to (mio. ha) oq10_transition_from(t,j,land_from,type) Land transition constraint from (mio. ha) oq10_landexpansion(t,j,land_to,type) Land expansion constraint (mio. ha) oq10_landreduction(t,j,land_from,type) Land reduction constraint (mio. ha) - oq10_cost(t,j,type) Costs for lu transitions (mio. USD05MER per yr) + oq10_cost(t,j,type) Costs for lu transitions (mio. USD17MER per yr) oq10_landdiff(t,type) Land difference constraint (mio. ha) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/10_land/landmatrix_dec18/equations.gms b/modules/10_land/landmatrix_dec18/equations.gms index e086f12cfa..aab102ce92 100644 --- a/modules/10_land/landmatrix_dec18/equations.gms +++ b/modules/10_land/landmatrix_dec18/equations.gms @@ -7,20 +7,15 @@ *' @equations -*' The following three equations describe the general structure of the land transition matrix. -*' The first equation defines the total amount of land to be constant over time. -*' The two balancing variables `v10_balance_positive` and `v10_balance_negative` are needed -*' to avoid technical infeasibilities due to small differences in accuracy between -*' variables and parameters in GAMS. The use of `v10_balance_positive` and -*' `v10_balance_negative` is minimized by putting a high cost factor on these variables -*' (`q10_cost`). In practice, `v10_balance_positive` and -*' `v10_balance_negative`should deviate from zero only in exceptional cases. - - q10_transition_matrix(j2) .. - sum((land_from,land_to), vm_lu_transitions(j2,land_from,land_to)) - + v10_balance_positive(j2) - v10_balance_negative(j2) =e= + +*' This equation defines the total amount of land to be constant over time. + + q10_land_area(j2) .. + sum(land, vm_land(j2,land)) =e= sum(land, pcm_land(j2,land)); +*' The following two equations describe the land transition matrix. + q10_transition_to(j2,land_to) .. sum(land_from, vm_lu_transitions(j2,land_from,land_to)) =e= vm_land(j2,land_to); @@ -46,8 +41,7 @@ q10_cost(j2) .. vm_cost_land_transition(j2) =e= - sum(land, vm_landexpansion(j2,land) + vm_landreduction(j2,land)) * 1 - + (v10_balance_positive(j2) + v10_balance_negative(j2)) * s10_cost_balance; + sum(land, vm_landexpansion(j2,land) + vm_landreduction(j2,land)) * 1; *' The gross changes in land are calculated based on land expansion, land *' contraction and land changes from within the modules [35_natveg] diff --git a/modules/10_land/landmatrix_dec18/input.gms b/modules/10_land/landmatrix_dec18/input.gms index 092ae72b41..54b958cffa 100644 --- a/modules/10_land/landmatrix_dec18/input.gms +++ b/modules/10_land/landmatrix_dec18/input.gms @@ -5,10 +5,6 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -scalars - s10_cost_balance Artificial cost for balance variable (USD05MER per ha) / 1e+06 / -; - table f10_land(t_ini10,j,land) Different land type areas (mio. ha) $ondelim $include "./modules/10_land/input/avl_land_t.cs3" diff --git a/modules/10_land/landmatrix_dec18/postsolve.gms b/modules/10_land/landmatrix_dec18/postsolve.gms index b7e9c5277e..f3cbeb531e 100644 --- a/modules/10_land/landmatrix_dec18/postsolve.gms +++ b/modules/10_land/landmatrix_dec18/postsolve.gms @@ -15,9 +15,7 @@ pcm_land(j,land) = vm_land.l(j,land); ov_landreduction(t,j,land,"marginal") = vm_landreduction.m(j,land); ov_cost_land_transition(t,j,"marginal") = vm_cost_land_transition.m(j); ov_lu_transitions(t,j,land_from,land_to,"marginal") = vm_lu_transitions.m(j,land_from,land_to); - ov10_balance_positive(t,j,"marginal") = v10_balance_positive.m(j); - ov10_balance_negative(t,j,"marginal") = v10_balance_negative.m(j); - oq10_transition_matrix(t,j,"marginal") = q10_transition_matrix.m(j); + oq10_land_area(t,j,"marginal") = q10_land_area.m(j); oq10_transition_to(t,j,land_to,"marginal") = q10_transition_to.m(j,land_to); oq10_transition_from(t,j,land_from,"marginal") = q10_transition_from.m(j,land_from); oq10_landexpansion(t,j,land_to,"marginal") = q10_landexpansion.m(j,land_to); @@ -30,9 +28,7 @@ pcm_land(j,land) = vm_land.l(j,land); ov_landreduction(t,j,land,"level") = vm_landreduction.l(j,land); ov_cost_land_transition(t,j,"level") = vm_cost_land_transition.l(j); ov_lu_transitions(t,j,land_from,land_to,"level") = vm_lu_transitions.l(j,land_from,land_to); - ov10_balance_positive(t,j,"level") = v10_balance_positive.l(j); - ov10_balance_negative(t,j,"level") = v10_balance_negative.l(j); - oq10_transition_matrix(t,j,"level") = q10_transition_matrix.l(j); + oq10_land_area(t,j,"level") = q10_land_area.l(j); oq10_transition_to(t,j,land_to,"level") = q10_transition_to.l(j,land_to); oq10_transition_from(t,j,land_from,"level") = q10_transition_from.l(j,land_from); oq10_landexpansion(t,j,land_to,"level") = q10_landexpansion.l(j,land_to); @@ -45,9 +41,7 @@ pcm_land(j,land) = vm_land.l(j,land); ov_landreduction(t,j,land,"upper") = vm_landreduction.up(j,land); ov_cost_land_transition(t,j,"upper") = vm_cost_land_transition.up(j); ov_lu_transitions(t,j,land_from,land_to,"upper") = vm_lu_transitions.up(j,land_from,land_to); - ov10_balance_positive(t,j,"upper") = v10_balance_positive.up(j); - ov10_balance_negative(t,j,"upper") = v10_balance_negative.up(j); - oq10_transition_matrix(t,j,"upper") = q10_transition_matrix.up(j); + oq10_land_area(t,j,"upper") = q10_land_area.up(j); oq10_transition_to(t,j,land_to,"upper") = q10_transition_to.up(j,land_to); oq10_transition_from(t,j,land_from,"upper") = q10_transition_from.up(j,land_from); oq10_landexpansion(t,j,land_to,"upper") = q10_landexpansion.up(j,land_to); @@ -60,9 +54,7 @@ pcm_land(j,land) = vm_land.l(j,land); ov_landreduction(t,j,land,"lower") = vm_landreduction.lo(j,land); ov_cost_land_transition(t,j,"lower") = vm_cost_land_transition.lo(j); ov_lu_transitions(t,j,land_from,land_to,"lower") = vm_lu_transitions.lo(j,land_from,land_to); - ov10_balance_positive(t,j,"lower") = v10_balance_positive.lo(j); - ov10_balance_negative(t,j,"lower") = v10_balance_negative.lo(j); - oq10_transition_matrix(t,j,"lower") = q10_transition_matrix.lo(j); + oq10_land_area(t,j,"lower") = q10_land_area.lo(j); oq10_transition_to(t,j,land_to,"lower") = q10_transition_to.lo(j,land_to); oq10_transition_from(t,j,land_from,"lower") = q10_transition_from.lo(j,land_from); oq10_landexpansion(t,j,land_to,"lower") = q10_landexpansion.lo(j,land_to); diff --git a/modules/10_land/landmatrix_dec18/realization.gms b/modules/10_land/landmatrix_dec18/realization.gms index 0a32fde34d..1fdcc37d64 100644 --- a/modules/10_land/landmatrix_dec18/realization.gms +++ b/modules/10_land/landmatrix_dec18/realization.gms @@ -17,7 +17,6 @@ $Ifi "%phase%" == "input" $include "./modules/10_land/landmatrix_dec18/input.gms $Ifi "%phase%" == "equations" $include "./modules/10_land/landmatrix_dec18/equations.gms" $Ifi "%phase%" == "scaling" $include "./modules/10_land/landmatrix_dec18/scaling.gms" $Ifi "%phase%" == "start" $include "./modules/10_land/landmatrix_dec18/start.gms" -$Ifi "%phase%" == "preloop" $include "./modules/10_land/landmatrix_dec18/preloop.gms" $Ifi "%phase%" == "presolve" $include "./modules/10_land/landmatrix_dec18/presolve.gms" $Ifi "%phase%" == "postsolve" $include "./modules/10_land/landmatrix_dec18/postsolve.gms" *######################## R SECTION END (PHASES) ############################### diff --git a/modules/11_costs/default/declarations.gms b/modules/11_costs/default/declarations.gms index fd1a7dba6a..f118c86d89 100644 --- a/modules/11_costs/default/declarations.gms +++ b/modules/11_costs/default/declarations.gms @@ -6,20 +6,20 @@ *** | Contact: magpie@pik-potsdam.de variables - vm_cost_glo Total costs of production (mio. USD05MER per yr) - v11_cost_reg(i) Regional costs (mio. USD05MER per yr) + vm_cost_glo Total costs of production (mio. USD17MER per yr) + v11_cost_reg(i) Regional costs (mio. USD17MER per yr) ; equations - q11_cost_glo Objective function (mio. USD05MER per yr) - q11_cost_reg(i) Regional cost constraint (mio. USD05MER per yr) + q11_cost_glo Objective function (mio. USD17MER per yr) + q11_cost_reg(i) Regional cost constraint (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_glo(t,type) Total costs of production (mio. USD05MER per yr) - ov11_cost_reg(t,i,type) Regional costs (mio. USD05MER per yr) - oq11_cost_glo(t,type) Objective function (mio. USD05MER per yr) - oq11_cost_reg(t,i,type) Regional cost constraint (mio. USD05MER per yr) + ov_cost_glo(t,type) Total costs of production (mio. USD17MER per yr) + ov11_cost_reg(t,i,type) Regional costs (mio. USD17MER per yr) + oq11_cost_glo(t,type) Objective function (mio. USD17MER per yr) + oq11_cost_reg(t,i,type) Regional cost constraint (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/11_costs/default/equations.gms b/modules/11_costs/default/equations.gms index c3d758a20d..f032c9171b 100644 --- a/modules/11_costs/default/equations.gms +++ b/modules/11_costs/default/equations.gms @@ -40,7 +40,7 @@ + sum(cell(i2,j2), vm_cost_cropland(j2)) + sum(cell(i2,j2),vm_cost_bv_loss(j2)) + sum(cell(i2,j2),vm_cost_urban(j2)) - + sum(cell(i2,j2),vm_water_cost(i2)) + + vm_water_cost(i2) ; *' The total regional production cost calculation is based on the sum of different diff --git a/modules/12_interest_rate/select_apr20/declarations.gms b/modules/12_interest_rate/select_apr20/declarations.gms index 903d83e08d..8fdfce2de8 100644 --- a/modules/12_interest_rate/select_apr20/declarations.gms +++ b/modules/12_interest_rate/select_apr20/declarations.gms @@ -8,6 +8,6 @@ parameters pm_interest(t_all,i) Interest rate in each region and timestep (% per yr) * country-specific region scenario switch - p12_country_dummy(iso) Dummy parameter indicating whether country is affected by interest rate scenario (1) + p12_country_switch(iso) Switch indicating whether country is affected by interest rate scenario (1) p12_reg_shr(t_all,i) Weighted share of region with regards to interest rate scenario of countries (1) ; diff --git a/modules/12_interest_rate/select_apr20/preloop.gms b/modules/12_interest_rate/select_apr20/preloop.gms index 2f2f490305..71eaace15d 100644 --- a/modules/12_interest_rate/select_apr20/preloop.gms +++ b/modules/12_interest_rate/select_apr20/preloop.gms @@ -9,12 +9,12 @@ * shall be applied. * In the default case, the interest rate scenario affects all countries when * activated. -p12_country_dummy(iso) = 0; -p12_country_dummy(select_countries12) = 1; +p12_country_switch(iso) = 0; +p12_country_switch(select_countries12) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by their population size. -p12_reg_shr(t_all,i) = sum(i_to_iso(i,iso), p12_country_dummy(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); +p12_reg_shr(t_all,i) = sum(i_to_iso(i,iso), p12_country_switch(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); * Interest rate in countries selected in select_countries12 $ifthen "%c12_interest_rate%" == "coupling" diff --git a/modules/13_tc/endo_jan22/declarations.gms b/modules/13_tc/endo_jan22/declarations.gms index b3b04bc8fa..dd653afdc9 100644 --- a/modules/13_tc/endo_jan22/declarations.gms +++ b/modules/13_tc/endo_jan22/declarations.gms @@ -7,33 +7,33 @@ positive variable vm_tau(h,tautype) Agricultural land use intensity tau (1) - vm_tech_cost(i) Total Annuitized costs of TC (mio. USD05PPP per yr) - v13_cost_tc(i,tautype) Technical change costs per region (mio. USD05PPP) - v13_tech_cost(i,tautype) Annuitized costs of TC for crops and pasture (mio. USD05PPP per yr) + vm_tech_cost(i) Total Annuitized costs of TC (mio. USD17MER per yr) + v13_cost_tc(i,tautype) Technical change costs per region (mio. USD17MER) + v13_tech_cost(i,tautype) Annuitized costs of TC for crops and pasture (mio. USD17MER per yr) ; equations - q13_tech_cost(i, tautype) Total annuitized costs for TC (mio. USD05PPP) - q13_cost_tc(i, tautype) Costs for TC (mio. USD05PPP per yr) - q13_tech_cost_sum(i) Total Total annuitized costs for TC (mio. USD05PPP per yr) + q13_tech_cost(i, tautype) Total annuitized costs for TC (mio. USD17MER) + q13_cost_tc(i, tautype) Costs for TC (mio. USD17MER per yr) + q13_tech_cost_sum(i) Total Total annuitized costs for TC (mio. USD17MER per yr) ; parameters pc13_land(i, tautype) Crop and grass land area per region (mio ha) pcm_tau(h, tautype) Tau factor of the previous time step (1) pc13_tcguess(h, tautype) Guess for annual tc rates in the next time step (1) - i13_tc_factor(t) Regression factor (USD05PPP per ha) + i13_tc_factor(t) Regression factor (USD17MER per ha) i13_tc_exponent(t) Regression exponent (1) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov_tau(t,h,tautype,type) Agricultural land use intensity tau (1) - ov_tech_cost(t,i,type) Total Annuitized costs of TC (mio. USD05PPP per yr) - ov13_cost_tc(t,i,tautype,type) Technical change costs per region (mio. USD05PPP) - ov13_tech_cost(t,i,tautype,type) Annuitized costs of TC for crops and pasture (mio. USD05PPP per yr) - oq13_tech_cost(t,i,tautype,type) Total annuitized costs for TC (mio. USD05PPP) - oq13_cost_tc(t,i,tautype,type) Costs for TC (mio. USD05PPP per yr) - oq13_tech_cost_sum(t,i,type) Total Total annuitized costs for TC (mio. USD05PPP per yr) + ov_tech_cost(t,i,type) Total Annuitized costs of TC (mio. USD17MER per yr) + ov13_cost_tc(t,i,tautype,type) Technical change costs per region (mio. USD17MER) + ov13_tech_cost(t,i,tautype,type) Annuitized costs of TC for crops and pasture (mio. USD17MER per yr) + oq13_tech_cost(t,i,tautype,type) Total annuitized costs for TC (mio. USD17MER) + oq13_cost_tc(t,i,tautype,type) Costs for TC (mio. USD17MER per yr) + oq13_tech_cost_sum(t,i,type) Total Total annuitized costs for TC (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/13_tc/endo_jan22/input.gms b/modules/13_tc/endo_jan22/input.gms index 67867ebe2e..b74ae99b53 100644 --- a/modules/13_tc/endo_jan22/input.gms +++ b/modules/13_tc/endo_jan22/input.gms @@ -27,7 +27,7 @@ $offdelim $setglobal c13_tccost medium -table f13_tc_factor(t_all,scen13) Regression factor (USD05PPP per ha) +table f13_tc_factor(t_all,scen13) Regression factor (USD17MER per ha) $ondelim $include "./modules/13_tc/input/f13_tc_factor.cs3" $offdelim @@ -45,7 +45,7 @@ $include "./modules/13_tc/input/f13_tau_historical.csv" $offdelim ; -table fm_pastr_tau_hist(t_all,h) Historical managed pasture tau (1) +table f13_pastr_tau_hist(t_all,h) Historical managed pasture tau (1) $ondelim $include "./modules/13_tc/input/f13_pastr_tau_hist.csv" $offdelim diff --git a/modules/13_tc/endo_jan22/preloop.gms b/modules/13_tc/endo_jan22/preloop.gms index b96d0b99a3..31cbb0fe18 100644 --- a/modules/13_tc/endo_jan22/preloop.gms +++ b/modules/13_tc/endo_jan22/preloop.gms @@ -16,5 +16,5 @@ loop(t, ); pcm_tau(h,"crop") = fm_tau1995(h); -pcm_tau(h,"pastr") = fm_pastr_tau_hist("y1995",h); +pcm_tau(h,"pastr") = f13_pastr_tau_hist("y1995",h); pc13_tcguess(h,tautype) = f13_tcguess(h); diff --git a/modules/13_tc/endo_jan22/presolve.gms b/modules/13_tc/endo_jan22/presolve.gms index f769dc97ba..9e37d6aae3 100644 --- a/modules/13_tc/endo_jan22/presolve.gms +++ b/modules/13_tc/endo_jan22/presolve.gms @@ -10,7 +10,7 @@ pc13_land(i,"pastr") = sum(cell(i,j),pcm_land(j,"past")); pc13_land(i,"crop") = sum(cell(i,j),pcm_land(j,"crop")); if (sum(sameas(t_past,t),1) = 1 AND s13_ignore_tau_historical = 0, - vm_tau.lo(h,"pastr") = fm_pastr_tau_hist(t,h); + vm_tau.lo(h,"pastr") = f13_pastr_tau_hist(t,h); vm_tau.lo(h,"crop") = f13_tau_historical(t,h); else vm_tau.lo(h, tautype) = pcm_tau(h, tautype); diff --git a/modules/13_tc/exo/declarations.gms b/modules/13_tc/exo/declarations.gms index 3309d3dc41..969660738f 100644 --- a/modules/13_tc/exo/declarations.gms +++ b/modules/13_tc/exo/declarations.gms @@ -7,21 +7,21 @@ positive variable vm_tau(h,tautype) Agricultural land use intensity tau (1) - vm_tech_cost(i) Costs of TC (mio. USD05PPP per yr) + vm_tech_cost(i) Costs of TC (mio. USD17MER per yr) ; parameters - p13_cost_tc(i,tautype) Technical change costs per region (mio. USD05PPP) + p13_cost_tc(i,tautype) Technical change costs per region (mio. USD17MER) pc13_land(i,tautype) Crop and grass land area per region (mio ha) pcm_tau(h,tautype) Tau factor of the previous time step (1) - i13_tc_factor(t) Regression factor (USD05PPP per ha) + i13_tc_factor(t) Regression factor (USD17MER per ha) i13_tc_exponent(t) Regression exponent (1) - p13_tech_cost(i,tautype) Annuitized costs of TC for crops and pasture (mio. USD05PPP per yr) + p13_tech_cost(i,tautype) Annuitized costs of TC for crops and pasture (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov_tau(t,h,tautype,type) Agricultural land use intensity tau (1) - ov_tech_cost(t,i,type) Costs of TC (mio. USD05PPP per yr) + ov_tech_cost(t,i,type) Costs of TC (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/13_tc/exo/input.gms b/modules/13_tc/exo/input.gms index bfabfea188..39b97b6336 100644 --- a/modules/13_tc/exo/input.gms +++ b/modules/13_tc/exo/input.gms @@ -15,7 +15,7 @@ $offdelim $setglobal c13_tccost medium -table f13_tc_factor(t_all,scen13) Regression factor (USD05PPP per ha) +table f13_tc_factor(t_all,scen13) Regression factor (USD17MER per ha) $ondelim $include "./modules/13_tc/input/f13_tc_factor.cs3" $offdelim @@ -34,7 +34,7 @@ $include "./modules/13_tc/input/f13_tau_scenario.csv" $offdelim ; -table fm_pastr_tau_hist(t_all,h) Historical managed pasture tau (1) +table f13_pastr_tau_hist(t_all,h) Historical managed pasture tau (1) $ondelim $include "./modules/13_tc/input/f13_pastr_tau_hist.csv" $offdelim diff --git a/modules/13_tc/exo/preloop.gms b/modules/13_tc/exo/preloop.gms index 6c62b24803..0d26231054 100644 --- a/modules/13_tc/exo/preloop.gms +++ b/modules/13_tc/exo/preloop.gms @@ -16,4 +16,4 @@ loop(t, ); pcm_tau(h,"crop") = fm_tau1995(h); -pcm_tau(h,"pastr") = fm_pastr_tau_hist("y1995",h); +pcm_tau(h,"pastr") = f13_pastr_tau_hist("y1995",h); diff --git a/modules/15_food/anthro_iso_jun22/declarations.gms b/modules/15_food/anthro_iso_jun22/declarations.gms index 07f5ef4621..2c7adc6de7 100644 --- a/modules/15_food/anthro_iso_jun22/declarations.gms +++ b/modules/15_food/anthro_iso_jun22/declarations.gms @@ -17,8 +17,8 @@ positive variables *** #### Food Demand Model equations - q15_aim Objective function of food demand model (mio. USD05PPP) - q15_budget(iso) Household budget constraint (USD05PPP per cap per day) + q15_aim Objective function of food demand model (mio. USD17PPP) + q15_budget(iso) Household budget constraint (USD17PPP per cap per day) q15_regr_bmi_shr(iso,sex,agegroup15,bmi_tree15) Estimates regression parameters for BMI regression shares (1) q15_bmi_shr_verylow(iso,sex,agegroup15) Estimates BMI share for population groups with low BMI (1) @@ -43,8 +43,8 @@ positive variables v15_kcal_regr(iso,kfo) Uncalibrated regression estimates of calorie demand (kcal per cap per day) v15_kcal_regr_total(iso) Uncalibrated regression estimates of total per cap calories (kcal per cap per day) v15_demand_regr(iso, regr15) Uncalibrated regression estimates of kcal shares (1) - v15_income_pc_real_ppp_iso(iso) Real income per cap (USD05PPP per cap) - v15_income_balance(iso) Balance variable to balance cases in which reduction in income is larger than the per capita GDP (USD05PPP per cap per yr) + v15_income_pc_real_ppp_iso(iso) Real income per cap (USD17PPP per cap) + v15_income_balance(iso) Balance variable to balance cases in which reduction in income is larger than the per capita GDP (USD17PPP per cap per yr) v15_kcal_intake_total_regr(iso) Food intake (kcal per cap per day) v15_regr_overgroups(iso,sex,agegroup15,bmi_tree15) Hierarchical tree parameter regressions (1) v15_bmi_shr_regr(iso,sex,age,bmi_group15) Uncalibrated share of population groups belonging to a certain BMI group (1) @@ -52,7 +52,7 @@ positive variables ; variables - v15_objective Objective term (USD05PPP) + v15_objective Objective term (USD17PPP) ; scalars @@ -80,8 +80,8 @@ parameters p15_exo_food_scenario_fader(t_all) Exogenous diet scenario fader (1) * prices - p15_prices_kcal(t,iso,kfo,iter15) Prices from MAgPIE after optimization (USD05PPP per kcal) - i15_prices_initial_kcal(iso,kfo) Initial prices that capture the approximate level of prices in 1961-2010 (USD05PPP per kcal) + p15_prices_kcal(t,iso,kfo,iter15) Prices from MAgPIE after optimization (USD17PPP per kcal) + i15_prices_initial_kcal(iso,kfo) Initial prices that capture the approximate level of prices in 1961-2010 (USD17PPP per kcal) * anthropometrics p15_bodyheight(t,iso,sex,age,estimates15) Body height (cm per cap) @@ -176,10 +176,10 @@ parameters i15_exo_foodscen_fader(t,iso) Fader that converges per capita food consumption to an exogenous diet scenario (1) * country-specific scenario switch - p15_country_dummy(iso) Dummy parameter indicating whether country is affected by diet scenarios (1) + p15_country_switch(iso) Switch indicating whether country is affected by diet scenarios (1) * calculate diet iteration breakpoint - p15_income_pc_real_ppp(t,i) Regional per capita income after price shock on regional level (USD05PPP per capita) + p15_income_pc_real_ppp(t,i) Regional per capita income after price shock on regional level (USD17PPP per capita) p15_delta_income(t,i,iter15) Regional change in per capita income due to price shock on regional level (1) ; @@ -235,16 +235,16 @@ parameters ov15_kcal_regr(t,iso,kfo,type) Uncalibrated regression estimates of calorie demand (kcal per cap per day) ov15_kcal_regr_total(t,iso,type) Uncalibrated regression estimates of total per cap calories (kcal per cap per day) ov15_demand_regr(t,iso,regr15,type) Uncalibrated regression estimates of kcal shares (1) - ov15_income_pc_real_ppp_iso(t,iso,type) Real income per cap (USD05PPP per cap) - ov15_income_balance(t,iso,type) Balance variable to balance cases in which reduction in income is larger than the per capita GDP (USD05PPP per cap per yr) + ov15_income_pc_real_ppp_iso(t,iso,type) Real income per cap (USD17PPP per cap) + ov15_income_balance(t,iso,type) Balance variable to balance cases in which reduction in income is larger than the per capita GDP (USD17PPP per cap per yr) ov15_kcal_intake_total_regr(t,iso,type) Food intake (kcal per cap per day) ov15_regr_overgroups(t,iso,sex,agegroup15,bmi_tree15,type) Hierarchical tree parameter regressions (1) ov15_bmi_shr_regr(t,iso,sex,age,bmi_group15,type) Uncalibrated share of population groups belonging to a certain BMI group (1) ov15_bmi_shr_overgroups(t,iso,sex,agegroup15,bmi_group15,type) Uncalibrated share of population groups belonging to a certain BMI group (1) - ov15_objective(t,type) Objective term (USD05PPP) + ov15_objective(t,type) Objective term (USD17PPP) oq15_food_demand(t,i,kfo,type) Food demand (mio. kcal) - oq15_aim(t,type) Objective function of food demand model (mio. USD05PPP) - oq15_budget(t,iso,type) Household budget constraint (USD05PPP per cap per day) + oq15_aim(t,type) Objective function of food demand model (mio. USD17PPP) + oq15_budget(t,iso,type) Household budget constraint (USD17PPP per cap per day) oq15_regr_bmi_shr(t,iso,sex,agegroup15,bmi_tree15,type) Estimates regression parameters for BMI regression shares (1) oq15_bmi_shr_verylow(t,iso,sex,agegroup15,type) Estimates BMI share for population groups with low BMI (1) oq15_bmi_shr_low(t,iso,sex,agegroup15,type) Estimates BMI share for population groups with very low BMI (1) diff --git a/modules/15_food/anthro_iso_jun22/equations.gms b/modules/15_food/anthro_iso_jun22/equations.gms index 7094915a69..2ae2d6014b 100644 --- a/modules/15_food/anthro_iso_jun22/equations.gms +++ b/modules/15_food/anthro_iso_jun22/equations.gms @@ -72,8 +72,8 @@ q15_regr_bmi_shr(iso,sex,agegroup15,bmi_tree15) .. v15_regr_overgroups(iso,sex,agegroup15,bmi_tree15) =e= i15_bmi_intercept(sex,agegroup15,bmi_tree15) - + (i15_bmi_saturation(sex,agegroup15,bmi_tree15) * v15_income_pc_real_ppp_iso(iso)) - / (i15_bmi_halfsat(sex,agegroup15,bmi_tree15) + v15_income_pc_real_ppp_iso(iso)); + + (i15_bmi_saturation(sex,agegroup15,bmi_tree15) * (v15_income_pc_real_ppp_iso(iso) * fm_gdp_defl_ppp(iso))) + / (i15_bmi_halfsat(sex,agegroup15,bmi_tree15) + (v15_income_pc_real_ppp_iso(iso) * fm_gdp_defl_ppp(iso))); *' Then, these regression shares are applied to parameterize the *' hierarchical tree structure: @@ -169,8 +169,8 @@ q15_regr_kcal(iso) .. q15_regr(iso, regr15) .. v15_demand_regr(iso, regr15) =e= i15_dem_intercept(iso,regr15) - + (i15_dem_saturation(iso,regr15) * v15_income_pc_real_ppp_iso(iso)) - / (i15_dem_halfsat(iso,regr15) + v15_income_pc_real_ppp_iso(iso)**i15_dem_nonsat(iso,regr15)); + + (i15_dem_saturation(iso,regr15) * (v15_income_pc_real_ppp_iso(iso) * fm_gdp_defl_ppp(iso))) + / (i15_dem_halfsat(iso,regr15) + (v15_income_pc_real_ppp_iso(iso) * fm_gdp_defl_ppp(iso) )**i15_dem_nonsat(iso,regr15)); *' In the subsequent equations, those parameters *' are used to determine the dietary composition using a hierachical tree: diff --git a/modules/15_food/anthro_iso_jun22/input.gms b/modules/15_food/anthro_iso_jun22/input.gms index e890b03251..23f7215e44 100644 --- a/modules/15_food/anthro_iso_jun22/input.gms +++ b/modules/15_food/anthro_iso_jun22/input.gms @@ -163,7 +163,7 @@ $include "./modules/15_food/input/f15_intake_pc_observed_iso.cs3" $offdelim; -parameter f15_prices_initial(kall) Food prices in initialization period (USD05MER per t DM) +parameter f15_prices_initial(kall) Food prices in initialization period (USD17MER per t DM) / $ondelim $include "./modules/15_food/input/f15_prices_initial.csv" diff --git a/modules/15_food/anthro_iso_jun22/preloop.gms b/modules/15_food/anthro_iso_jun22/preloop.gms index 77b11ab436..8c05f5927c 100644 --- a/modules/15_food/anthro_iso_jun22/preloop.gms +++ b/modules/15_food/anthro_iso_jun22/preloop.gms @@ -58,8 +58,8 @@ Elseif s15_milk_share_fadeout_india = 1, * Switch to determine countries for which exogenous food scenarios (EAT Lancet diet and * food waste scenarios), and food substitution scenarios shall be applied. * In the default case, the exogenous food scenarios affect all countries. -p15_country_dummy(iso) = 0; -p15_country_dummy(scen_countries15) = 1; +p15_country_switch(iso) = 0; +p15_country_switch(scen_countries15) = 1; ** The following lines define scenario faders for substituting different food groups * If s15_exo_foodscen_functional_form = 1, the exogenous food scenario is faded in linearly. @@ -96,13 +96,13 @@ elseif s15_food_subst_functional_form = 2, * Food substitution scenarios including functional forms, targets and transition periods -i15_ruminant_fadeout(t,iso) = 1 - p15_country_dummy(iso)*p15_ruminant_subst_fader(t); -i15_fish_fadeout(t,iso) = 1 - p15_country_dummy(iso)*p15_fish_subst_fader(t); -i15_alcohol_fadeout(t,iso) = 1 - p15_country_dummy(iso)*p15_alcohol_subst_fader(t); -i15_livestock_fadeout(t,iso) = 1 - p15_country_dummy(iso)*p15_livestock_subst_fader(t); -i15_rumdairy_fadeout(t,iso) = 1 - p15_country_dummy(iso)*p15_rumdairy_subst_fader(t); -i15_rumdairy_scp_fadeout(t,iso) = 1 - p15_country_dummy(iso)*p15_rumdairy_scp_subst_fader(t); -i15_livestock_fadeout_threshold(t,iso) = 1 - p15_country_dummy(iso)*p15_livestock_threshold_subst_fader(t); +i15_ruminant_fadeout(t,iso) = 1 - p15_country_switch(iso)*p15_ruminant_subst_fader(t); +i15_fish_fadeout(t,iso) = 1 - p15_country_switch(iso)*p15_fish_subst_fader(t); +i15_alcohol_fadeout(t,iso) = 1 - p15_country_switch(iso)*p15_alcohol_subst_fader(t); +i15_livestock_fadeout(t,iso) = 1 - p15_country_switch(iso)*p15_livestock_subst_fader(t); +i15_rumdairy_fadeout(t,iso) = 1 - p15_country_switch(iso)*p15_rumdairy_subst_fader(t); +i15_rumdairy_scp_fadeout(t,iso) = 1 - p15_country_switch(iso)*p15_rumdairy_scp_subst_fader(t); +i15_livestock_fadeout_threshold(t,iso) = 1 - p15_country_switch(iso)*p15_livestock_threshold_subst_fader(t); ** The following lines define the scenario fader for the exogeneous food scenario @@ -117,7 +117,7 @@ elseif s15_exo_foodscen_functional_form = 2, ); * Fade in scenarios at country level -i15_exo_foodscen_fader(t,iso) = p15_exo_food_scenario_fader(t) * p15_country_dummy(iso); +i15_exo_foodscen_fader(t,iso) = p15_exo_food_scenario_fader(t) * p15_country_switch(iso); * Select from the data set of EAT Lancet scenarios the target years that are * consistent with the target year of the fader: diff --git a/modules/15_food/anthro_iso_jun22/presolve.gms b/modules/15_food/anthro_iso_jun22/presolve.gms index 1fed66b995..b76d8279d5 100644 --- a/modules/15_food/anthro_iso_jun22/presolve.gms +++ b/modules/15_food/anthro_iso_jun22/presolve.gms @@ -13,14 +13,14 @@ if(m_year(t) <= sm_fix_SSP2, i15_dem_halfsat(iso,regr15) = f15_demand_paras(regr15,"SSP2","halfsaturation"); i15_dem_nonsat(iso,regr15) = f15_demand_paras(regr15,"SSP2","non_saturation"); else - i15_dem_intercept(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","intercept")*p15_country_dummy(iso) - + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","intercept")*(1-p15_country_dummy(iso)); - i15_dem_saturation(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","saturation")*p15_country_dummy(iso) - + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","saturation")*(1-p15_country_dummy(iso)); - i15_dem_halfsat(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","halfsaturation")*p15_country_dummy(iso) - + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","halfsaturation")*(1-p15_country_dummy(iso)); - i15_dem_nonsat(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","non_saturation")*p15_country_dummy(iso) - + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","non_saturation")*(1-p15_country_dummy(iso)); + i15_dem_intercept(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","intercept")*p15_country_switch(iso) + + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","intercept")*(1-p15_country_switch(iso)); + i15_dem_saturation(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","saturation")*p15_country_switch(iso) + + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","saturation")*(1-p15_country_switch(iso)); + i15_dem_halfsat(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","halfsaturation")*p15_country_switch(iso) + + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","halfsaturation")*(1-p15_country_switch(iso)); + i15_dem_nonsat(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","non_saturation")*p15_country_switch(iso) + + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","non_saturation")*(1-p15_country_switch(iso)); ); option nlp = conopt4; diff --git a/modules/15_food/anthropometrics_jan18/declarations.gms b/modules/15_food/anthropometrics_jan18/declarations.gms index 9ba90a94b5..607dac6395 100644 --- a/modules/15_food/anthropometrics_jan18/declarations.gms +++ b/modules/15_food/anthropometrics_jan18/declarations.gms @@ -20,8 +20,8 @@ positive variables equations - q15_aim Objective function of food demand model (mio. USD05PPP) - q15_budget(iso) Household budget constraint (USD05PPP per cap per day) + q15_aim Objective function of food demand model (mio. USD17PPP) + q15_budget(iso) Household budget constraint (USD17PPP per cap per day) q15_regr_bmi_shr(iso,sex,agegroup15,bmi_tree15) Estimates regression parameters for BMI regression shares (1) q15_bmi_shr_verylow(iso,sex,agegroup15) Estimates BMI share for population groups with low BMI (1) @@ -47,8 +47,8 @@ positive variables v15_kcal_regr(iso,kfo) Uncalibrated regression estimates of calorie demand (kcal per cap per day) v15_kcal_regr_total(iso) Uncalibrated regression estimates of total per cap calories (kcal per cap per day) v15_demand_regr(iso, regr15) Uncalibrated regression estimates of kcal shares (1) - v15_income_pc_real_ppp_iso(iso) Real income per cap (USD05PPP per cap) - v15_income_balance(iso) Balance variable to balance cases in which reduction in income is larger than the per capita GDP (USD05PPP per cap per yr) + v15_income_pc_real_ppp_iso(iso) Real income per cap (USD17PPP per cap) + v15_income_balance(iso) Balance variable to balance cases in which reduction in income is larger than the per capita GDP (USD17PPP per cap per yr) v15_kcal_intake_total_regr(iso) Food intake (kcal per cap per day) v15_regr_overgroups(iso,sex,agegroup15,bmi_tree15) Hierarchical tree parameter regressions (1) v15_bmi_shr_regr(iso,sex,age,bmi_group15) Uncalibrated share of population groups belonging to a certain BMI group (1) @@ -56,7 +56,7 @@ positive variables ; variables - v15_objective Objective term (USD05PPP) + v15_objective Objective term (USD17PPP) ; scalars @@ -83,8 +83,8 @@ parameters p15_exo_food_scenario_fader(t_all) Exogenous diet scenario fader (1) * prices - p15_prices_kcal(t,iso,kfo,iter15) Prices from MAgPIE after optimization (USD05PPP per kcal) - i15_prices_initial_kcal(iso,kfo) Initial prices that capture the approximate level of prices in 1961-2010 (USD05PPP per kcal) + p15_prices_kcal(t,iso,kfo,iter15) Prices from MAgPIE after optimization (USD17PPP per kcal) + i15_prices_initial_kcal(iso,kfo) Initial prices that capture the approximate level of prices in 1961-2010 (USD17PPP per kcal) * anthropometrics o15_bmi_shr(t,iso,sex,age,bmi_group15) Calibrated estimates BMI share for population groups (1) @@ -172,11 +172,11 @@ parameters i15_exo_foodscen_fader(t,i) Fader that converges per capita food consumption to an exogenous diet scenario (1) * country-specific scenario switch - p15_country_dummy(iso) Dummy parameter indicating whether country is affected by diet scenarios (1) + p15_country_switch(iso) Switch indicating whether country is affected by diet scenarios (1) p15_foodscen_region_shr(t_all,i) Weighted share of region with regards to diet scenario of countries (1) * calculate diet iteration breakpoint - p15_income_pc_real_ppp(t,i) Regional per capita income after price shock on regional level (USD05PPP per capita) + p15_income_pc_real_ppp(t,i) Regional per capita income after price shock on regional level (USD17PPP per capita) p15_delta_income(t,i,iter15) Regional change in per capita income due to price shock on regional level (1) ; @@ -236,16 +236,16 @@ parameters ov15_kcal_regr(t,iso,kfo,type) Uncalibrated regression estimates of calorie demand (kcal per cap per day) ov15_kcal_regr_total(t,iso,type) Uncalibrated regression estimates of total per cap calories (kcal per cap per day) ov15_demand_regr(t,iso,regr15,type) Uncalibrated regression estimates of kcal shares (1) - ov15_income_pc_real_ppp_iso(t,iso,type) Real income per cap (USD05PPP per cap) - ov15_income_balance(t,iso,type) Balance variable to balance cases in which reduction in income is larger than the per capita GDP (USD05PPP per cap per yr) + ov15_income_pc_real_ppp_iso(t,iso,type) Real income per cap (USD17PPP per cap) + ov15_income_balance(t,iso,type) Balance variable to balance cases in which reduction in income is larger than the per capita GDP (USD17PPP per cap per yr) ov15_kcal_intake_total_regr(t,iso,type) Food intake (kcal per cap per day) ov15_regr_overgroups(t,iso,sex,agegroup15,bmi_tree15,type) Hierarchical tree parameter regressions (1) ov15_bmi_shr_regr(t,iso,sex,age,bmi_group15,type) Uncalibrated share of population groups belonging to a certain BMI group (1) ov15_bmi_shr_overgroups(t,iso,sex,agegroup15,bmi_group15,type) Uncalibrated share of population groups belonging to a certain BMI group (1) - ov15_objective(t,type) Objective term (USD05PPP) + ov15_objective(t,type) Objective term (USD17PPP) oq15_food_demand(t,i,kfo,type) Food demand (mio. kcal) - oq15_aim(t,type) Objective function of food demand model (mio. USD05PPP) - oq15_budget(t,iso,type) Household budget constraint (USD05PPP per cap per day) + oq15_aim(t,type) Objective function of food demand model (mio. USD17PPP) + oq15_budget(t,iso,type) Household budget constraint (USD17PPP per cap per day) oq15_regr_bmi_shr(t,iso,sex,agegroup15,bmi_tree15,type) Estimates regression parameters for BMI regression shares (1) oq15_bmi_shr_verylow(t,iso,sex,agegroup15,type) Estimates BMI share for population groups with low BMI (1) oq15_bmi_shr_low(t,iso,sex,agegroup15,type) Estimates BMI share for population groups with very low BMI (1) diff --git a/modules/15_food/anthropometrics_jan18/equations.gms b/modules/15_food/anthropometrics_jan18/equations.gms index 7094915a69..0506f61ff2 100644 --- a/modules/15_food/anthropometrics_jan18/equations.gms +++ b/modules/15_food/anthropometrics_jan18/equations.gms @@ -72,8 +72,8 @@ q15_regr_bmi_shr(iso,sex,agegroup15,bmi_tree15) .. v15_regr_overgroups(iso,sex,agegroup15,bmi_tree15) =e= i15_bmi_intercept(sex,agegroup15,bmi_tree15) - + (i15_bmi_saturation(sex,agegroup15,bmi_tree15) * v15_income_pc_real_ppp_iso(iso)) - / (i15_bmi_halfsat(sex,agegroup15,bmi_tree15) + v15_income_pc_real_ppp_iso(iso)); + + (i15_bmi_saturation(sex,agegroup15,bmi_tree15) * (v15_income_pc_real_ppp_iso(iso) * fm_gdp_defl_ppp(iso) )) + / (i15_bmi_halfsat(sex,agegroup15,bmi_tree15) + (v15_income_pc_real_ppp_iso(iso) * fm_gdp_defl_ppp(iso) )); *' Then, these regression shares are applied to parameterize the *' hierarchical tree structure: @@ -169,8 +169,8 @@ q15_regr_kcal(iso) .. q15_regr(iso, regr15) .. v15_demand_regr(iso, regr15) =e= i15_dem_intercept(iso,regr15) - + (i15_dem_saturation(iso,regr15) * v15_income_pc_real_ppp_iso(iso)) - / (i15_dem_halfsat(iso,regr15) + v15_income_pc_real_ppp_iso(iso)**i15_dem_nonsat(iso,regr15)); + + (i15_dem_saturation(iso,regr15) * (v15_income_pc_real_ppp_iso(iso) * fm_gdp_defl_ppp(iso))) + / (i15_dem_halfsat(iso,regr15) + (v15_income_pc_real_ppp_iso(iso) * fm_gp_defl_ppp(iso))**i15_dem_nonsat(iso,regr15)); *' In the subsequent equations, those parameters *' are used to determine the dietary composition using a hierachical tree: diff --git a/modules/15_food/anthropometrics_jan18/input.gms b/modules/15_food/anthropometrics_jan18/input.gms index b24efd5ebd..f51b796b63 100644 --- a/modules/15_food/anthropometrics_jan18/input.gms +++ b/modules/15_food/anthropometrics_jan18/input.gms @@ -142,7 +142,7 @@ $include "./modules/15_food/input/f15_intake_pc_observed_iso.cs3" $offdelim; -parameter f15_prices_initial(kall) Food prices in initialization period (USD05MER per t DM) +parameter f15_prices_initial(kall) Food prices in initialization period (USD17MER per t DM) / $ondelim $include "./modules/15_food/input/f15_prices_initial.csv" diff --git a/modules/15_food/anthropometrics_jan18/preloop.gms b/modules/15_food/anthropometrics_jan18/preloop.gms index 6e4bae5792..ad58642464 100644 --- a/modules/15_food/anthropometrics_jan18/preloop.gms +++ b/modules/15_food/anthropometrics_jan18/preloop.gms @@ -64,13 +64,13 @@ p15_demand2intake_ratio_ref(i) = 0; * Switch to determine countries for which exogenous food scenarios (EAT Lancet diet and * food waste scenarios), and food substitution scenarios shall be applied. * In the default case, the food scenario affects all countries when activated. -p15_country_dummy(iso) = 0; -p15_country_dummy(scen_countries15) = 1; +p15_country_switch(iso) = 0; +p15_country_switch(scen_countries15) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by their population size. -p15_foodscen_region_shr(t_all,i) = sum(i_to_iso(i,iso), p15_country_dummy(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); +p15_foodscen_region_shr(t_all,i) = sum(i_to_iso(i,iso), p15_country_switch(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); ** The following lines define scenario faders for substituting different food groups diff --git a/modules/15_food/anthropometrics_jan18/presolve.gms b/modules/15_food/anthropometrics_jan18/presolve.gms index 772a0a383d..1bf780458e 100644 --- a/modules/15_food/anthropometrics_jan18/presolve.gms +++ b/modules/15_food/anthropometrics_jan18/presolve.gms @@ -13,14 +13,14 @@ if(m_year(t) <= sm_fix_SSP2, i15_dem_halfsat(iso,regr15) = f15_demand_paras(regr15,"SSP2","halfsaturation"); i15_dem_nonsat(iso,regr15) = f15_demand_paras(regr15,"SSP2","non_saturation"); else - i15_dem_intercept(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","intercept")*p15_country_dummy(iso) - + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","intercept")*(1-p15_country_dummy(iso)); - i15_dem_saturation(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","saturation")*p15_country_dummy(iso) - + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","saturation")*(1-p15_country_dummy(iso)); - i15_dem_halfsat(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","halfsaturation")*p15_country_dummy(iso) - + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","halfsaturation")*(1-p15_country_dummy(iso)); - i15_dem_nonsat(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","non_saturation")*p15_country_dummy(iso) - + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","non_saturation")*(1-p15_country_dummy(iso)); + i15_dem_intercept(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","intercept")*p15_country_switch(iso) + + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","intercept")*(1-p15_country_switch(iso)); + i15_dem_saturation(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","saturation")*p15_country_switch(iso) + + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","saturation")*(1-p15_country_switch(iso)); + i15_dem_halfsat(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","halfsaturation")*p15_country_switch(iso) + + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","halfsaturation")*(1-p15_country_switch(iso)); + i15_dem_nonsat(iso,regr15) = f15_demand_paras(regr15,"%c15_food_scenario%","non_saturation")*p15_country_switch(iso) + + f15_demand_paras(regr15,"%c15_food_scenario_noselect%","non_saturation")*(1-p15_country_switch(iso)); ); option nlp = conopt4; diff --git a/modules/18_residues/flexcluster_jul23/declarations.gms b/modules/18_residues/flexcluster_jul23/declarations.gms index 6a88c3208c..d4b62c1c20 100644 --- a/modules/18_residues/flexcluster_jul23/declarations.gms +++ b/modules/18_residues/flexcluster_jul23/declarations.gms @@ -18,7 +18,7 @@ positive variables vm_res_ag_burn(i,kcr,attributes) Regional residues burned on fields in respective attribute units DM GJ Nr P K WM C (mio. tX) vm_res_recycling(i,npk) Residues recycled to croplands in respective nutrients Nr P K units (mio. tX) - vm_cost_prod_kres(i,kres) Production costs of harvesting crop residues (mio. USD05MER per yr) + vm_cost_prod_kres(i,kres) Production costs of harvesting crop residues (mio. USD17MER per yr) ; equations @@ -36,7 +36,7 @@ equations q18_res_recycling_nr(i) Nutrient recycling of reaactive nitrogen (mio. tNr) q18_res_recycling_pk(i,pk18) Nutrient recycling of phosphorus and potash (mio. tX) - q18_cost_prod_res(i,kres) Production costs of harvesting crop residues (mio. USD05MER) + q18_cost_prod_res(i,kres) Production costs of harvesting crop residues (mio. USD17MER) q18_prod_res_reg(i,kall) Regional production of residues (mio. tDM) @@ -57,7 +57,7 @@ parameters ov18_res_ag_recycling(t,i,kcr,attributes,type) Recycling of crop residues to soils in respective attribute units DM GJ Nr P K WM C (mio. tX) ov_res_ag_burn(t,i,kcr,attributes,type) Regional residues burned on fields in respective attribute units DM GJ Nr P K WM C (mio. tX) ov_res_recycling(t,i,npk,type) Residues recycled to croplands in respective nutrients Nr P K units (mio. tX) - ov_cost_prod_kres(t,i,kres,type) Production costs of harvesting crop residues (mio. USD05MER per yr) + ov_cost_prod_kres(t,i,kres,type) Production costs of harvesting crop residues (mio. USD17MER per yr) oq18_prod_res_ag_clust(t,j,kcr,type) Cluster-level production constraint of aboveground residues (mio. tDM) oq18_prod_res_ag_reg(t,i,kcr,attributes,type) Regional production constraint of aboveground residues (mio. tDM) oq18_prod_res_bg_clust(t,i,kcr,dm_nr,type) Cluster-level production constraint of belowground residues (mio. tDM) @@ -68,7 +68,7 @@ parameters oq18_translate(t,j,kres,attributes,type) Transformation of the multiple crop residues into supply balance crop residues in respective attribute units DM GJ Nr P K WM C (mio. tX) oq18_res_recycling_nr(t,i,type) Nutrient recycling of reaactive nitrogen (mio. tNr) oq18_res_recycling_pk(t,i,pk18,type) Nutrient recycling of phosphorus and potash (mio. tX) - oq18_cost_prod_res(t,i,kres,type) Production costs of harvesting crop residues (mio. USD05MER) + oq18_cost_prod_res(t,i,kres,type) Production costs of harvesting crop residues (mio. USD17MER) oq18_prod_res_reg(t,i,kall,type) Regional production of residues (mio. tDM) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/18_residues/flexcluster_jul23/equations.gms b/modules/18_residues/flexcluster_jul23/equations.gms index cd54aa85ad..8ab10fe894 100644 --- a/modules/18_residues/flexcluster_jul23/equations.gms +++ b/modules/18_residues/flexcluster_jul23/equations.gms @@ -129,14 +129,9 @@ + vm_res_ag_burn(i2,kcr,pk18) ); -*' Costs of residues production are determined as factor costs per ton -*' assuming 15 USD per ton, using the lower range from -*' [this source](hwww1.agric.gov.ab.ca/$Department/deptdocs.nsf/All/faq7514), -*' 10USD baling costs per large round bale plus 2USD pro bale stocking and hauling, -*' 1 large round bale is approximately 500 kg, resulting in 24USD per ton, -*' for developing prices see [here](citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.557.5823&rep=rep1&type=pdf). -*' Tha calcuated factor costs per ton are therefore 24 for `res_cereals`, `res_fibrous` -*' and `res_nonfibrous`. +*' Costs of residue harvest are based on straw baling and hauling from +*' Budynski, Stephanie. 2020. Straw Manufacturing in Alberta (@budynski_straw_2020), +*' using the lower range of the US costs. q18_cost_prod_res(i2,kres) .. vm_cost_prod_kres(i2,kres) diff --git a/modules/18_residues/flexcluster_jul23/input.gms b/modules/18_residues/flexcluster_jul23/input.gms index 2f28619264..a5923f2aa4 100644 --- a/modules/18_residues/flexcluster_jul23/input.gms +++ b/modules/18_residues/flexcluster_jul23/input.gms @@ -41,7 +41,7 @@ $include "./modules/18_residues/input/f18_res_combust_eff.cs4" $offdelim /; -parameter f18_fac_req_kres(kres) Factor requirements (USD05MER per tDM) +parameter f18_fac_req_kres(kres) Factor requirements (USD17MER per tDM) / $ondelim $include "./modules/18_residues/flexcluster_jul23/input/f18_fac_req_kres.csv" diff --git a/modules/18_residues/flexreg_apr16/declarations.gms b/modules/18_residues/flexreg_apr16/declarations.gms index 432df99796..a84eac5eaa 100644 --- a/modules/18_residues/flexreg_apr16/declarations.gms +++ b/modules/18_residues/flexreg_apr16/declarations.gms @@ -14,7 +14,7 @@ positive variables v18_res_ag_recycling(i,kcr,attributes) Recylcing of crop residues to soils in respective attribute units DM GJ Nr P K WM C (mio. tX) vm_res_ag_burn(i,kcr,attributes) Residues burned on fields in respective attribute units DM GJ Nr P K WM C (mio. tX) vm_res_recycling(i,npk) Residues recycled to croplands in respective nutrients Nr P K units (mio. tX) - vm_cost_prod_kres(i,kres) Production costs of harvesting crop residues (mio. USD05MER per yr) + vm_cost_prod_kres(i,kres) Production costs of harvesting crop residues (mio. USD17MER per yr) ; equations @@ -29,7 +29,7 @@ equations q18_res_recycling_nr(i) Nutrient recycling of reaactive nitrogen (mio. tNr) q18_res_recycling_pk(i,pk18) Nutrient recycling of phosphorus and potash (mio. tX) - q18_cost_prod_res(i,kres) Production costs of harvesting crop residues (mio. USD05MER) + q18_cost_prod_res(i,kres) Production costs of harvesting crop residues (mio. USD17MER) ; @@ -46,7 +46,7 @@ parameters ov18_res_ag_recycling(t,i,kcr,attributes,type) Recylcing of crop residues to soils in respective attribute units DM GJ Nr P K WM C (mio. tX) ov_res_ag_burn(t,i,kcr,attributes,type) Residues burned on fields in respective attribute units DM GJ Nr P K WM C (mio. tX) ov_res_recycling(t,i,npk,type) Residues recycled to croplands in respective nutrients Nr P K units (mio. tX) - ov_cost_prod_kres(t,i,kres,type) Production costs of harvesting crop residues (mio. USD05MER per yr) + ov_cost_prod_kres(t,i,kres,type) Production costs of harvesting crop residues (mio. USD17MER per yr) oq18_prod_res_ag_reg(t,i,kcr,attributes,type) Production constraint of aboveground residues (mio. tDM) oq18_prod_res_bg_reg(t,i,kcr,dm_nr,type) Production constraint of belowground residues (mio. tDM) oq18_res_field_balance(t,i,kcr,attributes,type) Calculation of the residues amount recycled to soils (mio. tDM) @@ -55,7 +55,7 @@ parameters oq18_prod_res_cell(t,j,kres,type) Allows for distribution of residues to cellular level (mio. tDM) oq18_res_recycling_nr(t,i,type) Nutrient recycling of reaactive nitrogen (mio. tNr) oq18_res_recycling_pk(t,i,pk18,type) Nutrient recycling of phosphorus and potash (mio. tX) - oq18_cost_prod_res(t,i,kres,type) Production costs of harvesting crop residues (mio. USD05MER) + oq18_cost_prod_res(t,i,kres,type) Production costs of harvesting crop residues (mio. USD17MER) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/18_residues/flexreg_apr16/equations.gms b/modules/18_residues/flexreg_apr16/equations.gms index 70d151afd8..8d9d7e0c30 100644 --- a/modules/18_residues/flexreg_apr16/equations.gms +++ b/modules/18_residues/flexreg_apr16/equations.gms @@ -107,14 +107,9 @@ + vm_res_ag_burn(i2,kcr,pk18) ); -*' Costs of residues production are determined as factor costs per ton -*' assuming 15 USD per ton, using the lower range from -*' [this source](hwww1.agric.gov.ab.ca/$Department/deptdocs.nsf/All/faq7514), -*' 10USD baling costs per large round bale plus 2USD pro bale stocking and hauling, -*' 1 large round bale is approximately 500 kg, resulting in 24USD per ton, -*' for developing prices see [here](citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.557.5823&rep=rep1&type=pdf). -*' Tha calcuated factor costs per ton are therefore 24 for `res_cereals`, `res_fibrous` -*' and `res_nonfibrous`. +*' Costs of residue harvest are based on straw baling and hauling from +*' Budynski, Stephanie. 2020. Straw Manufacturing in Alberta (@budynski_straw_2020), +*' using the lower range of the US costs. q18_cost_prod_res(i2,kres) .. vm_cost_prod_kres(i2,kres) diff --git a/modules/18_residues/flexreg_apr16/input.gms b/modules/18_residues/flexreg_apr16/input.gms index 1ee2c089fe..9ab7245ace 100644 --- a/modules/18_residues/flexreg_apr16/input.gms +++ b/modules/18_residues/flexreg_apr16/input.gms @@ -41,7 +41,7 @@ $include "./modules/18_residues/input/f18_res_combust_eff.cs4" $offdelim /; -parameter f18_fac_req_kres(kres) Factor requirements (USD05MER per tDM) +parameter f18_fac_req_kres(kres) Factor requirements (USD17MER per tDM) / $ondelim $include "./modules/18_residues/flexreg_apr16/input/f18_fac_req_kres.csv" diff --git a/modules/18_residues/off/declarations.gms b/modules/18_residues/off/declarations.gms index 8329f0d299..320ee7a062 100644 --- a/modules/18_residues/off/declarations.gms +++ b/modules/18_residues/off/declarations.gms @@ -11,7 +11,7 @@ positive variables vm_res_biomass_bg(i,kcr,dm_nr) production of belowground residues in each region (mio. tDM) vm_res_recycling(i,npk) residues recycled to croplands (mio tons nutrients) vm_res_ag_burn(i,kcr,attributes) Residues burned on fields in respective attribute units DM GJ Nr P K WM C (mio. tX) - vm_cost_prod_kres(i,kres) Production costs of harvesting crop residues (mio. USD05MER per yr) + vm_cost_prod_kres(i,kres) Production costs of harvesting crop residues (mio. USD17MER per yr) ; @@ -21,7 +21,7 @@ parameters ov_res_biomass_bg(t,i,kcr,dm_nr,type) production of belowground residues in each region (mio. tDM) ov_res_recycling(t,i,npk,type) residues recycled to croplands (mio tons nutrients) ov_res_ag_burn(t,i,kcr,attributes,type) Residues burned on fields in respective attribute units DM GJ Nr P K WM C (mio. tX) - ov_cost_prod_kres(t,i,kres,type) Production costs of harvesting crop residues (mio. USD05MER per yr) + ov_cost_prod_kres(t,i,kres,type) Production costs of harvesting crop residues (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/20_processing/substitution_may21/declarations.gms b/modules/20_processing/substitution_may21/declarations.gms index 72d97ed3cf..8c4a5ed686 100644 --- a/modules/20_processing/substitution_may21/declarations.gms +++ b/modules/20_processing/substitution_may21/declarations.gms @@ -8,7 +8,7 @@ parameters i20_processing_shares(t_all,i,ksd,kpr) Shares of secondary products coming from a primary product (1) i20_processing_conversion_factors(t_all,processing20,ksd,kpr) Conversion factors of primary products into secondary products (1) - i20_processing_unitcosts(ksd,kpr) Costs of transforming x units kpr into 1 unit ksd (USD05MER per tDM) + i20_processing_unitcosts(ksd,kpr) Costs of transforming x units kpr into 1 unit ksd (USD17MER per tDM) ; @@ -17,11 +17,11 @@ positive variables v20_dem_processing(i,processing_subst20,kpr) Demand for processing use by process (mio. tDM per yr) v20_secondary_substitutes(i,ksd,kpr) Substitutes for inferior secondary products (mio. tDM per yr) vm_secondary_overproduction(i,kall,kpr) Overproduction of secondary couple products (mio. tDM per yr) - vm_cost_processing(i) Processing costs (mio. USD05MER per yr) + vm_cost_processing(i) Processing costs (mio. USD17MER per yr) ; variables - vm_processing_substitution_cost(i) Costs or benefits of substituting one product by another (mio. USD05MER per yr) + vm_processing_substitution_cost(i) Costs or benefits of substituting one product by another (mio. USD17MER per yr) ; equations @@ -33,7 +33,7 @@ equations q20_processing_substitution_brans(i) Substitution of brans by cereals (mio. tNr per yr) q20_processing_substitution_sugar(i) Substitution of molasses by sugar (mio. tDM per yr) q20_processing_substitution_protein(i) Substitution of protein products by other protein products (mio. tNr per yr) - q20_processing_costs(i) Processing costs (mio. USD05MER per yr) + q20_processing_costs(i) Processing costs (mio. USD17MER per yr) q20_substitution_utility_loss(i) Utility loss when one product has to be substituted by another (mio. t Nr per year) ; @@ -43,8 +43,8 @@ parameters ov20_dem_processing(t,i,processing_subst20,kpr,type) Demand for processing use by process (mio. tDM per yr) ov20_secondary_substitutes(t,i,ksd,kpr,type) Substitutes for inferior secondary products (mio. tDM per yr) ov_secondary_overproduction(t,i,kall,kpr,type) Overproduction of secondary couple products (mio. tDM per yr) - ov_cost_processing(t,i,type) Processing costs (mio. USD05MER per yr) - ov_processing_substitution_cost(t,i,type) Costs or benefits of substituting one product by another (mio. USD05MER per yr) + ov_cost_processing(t,i,type) Processing costs (mio. USD17MER per yr) + ov_processing_substitution_cost(t,i,type) Costs or benefits of substituting one product by another (mio. USD17MER per yr) oq20_processing(t,i,kpr,ksd,type) Processing equation (mio. tDM per yr) oq20_processing_aggregation_nocereals(t,i,kpr,type) Connecting processing activity to processing flows (mio. tDM per yr) oq20_processing_aggregation_cereals(t,i,kcereals20,type) Connecting processing activity to food use for milling (mio. tDM per yr) @@ -53,7 +53,7 @@ parameters oq20_processing_substitution_brans(t,i,type) Substitution of brans by cereals (mio. tNr per yr) oq20_processing_substitution_sugar(t,i,type) Substitution of molasses by sugar (mio. tDM per yr) oq20_processing_substitution_protein(t,i,type) Substitution of protein products by other protein products (mio. tNr per yr) - oq20_processing_costs(t,i,type) Processing costs (mio. USD05MER per yr) + oq20_processing_costs(t,i,type) Processing costs (mio. USD17MER per yr) oq20_substitution_utility_loss(t,i,type) Utility loss when one product has to be substituted by another (mio. t Nr per year) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/20_processing/substitution_may21/input.gms b/modules/20_processing/substitution_may21/input.gms index 65a320e6de..f4292d5a5e 100644 --- a/modules/20_processing/substitution_may21/input.gms +++ b/modules/20_processing/substitution_may21/input.gms @@ -22,12 +22,12 @@ $ondelim $include "./modules/20_processing/input/f20_processing_shares.cs3" $offdelim ; -table f20_processing_unitcosts(ksd,kpr) Costs of transforming x units kpr into 1 unit ksd (USD05MER per tDM) +table f20_processing_unitcosts(ksd,kpr) Costs of transforming x units kpr into 1 unit ksd (USD17MER per tDM) $ondelim $include "./modules/20_processing/input/f20_processing_unitcosts.cs3" $offdelim ; -table f20_quality_cost(ksd,kpr) Costs for difference in quality between secondary products from diverging origins (USD per tDM) +table f20_quality_cost(ksd,kpr) Costs for difference in quality between secondary products from diverging origins (USD17MER per tDM) $ondelim $include "./modules/20_processing/substitution_may21/input/f20_quality_cost.cs3" $offdelim ; @@ -42,7 +42,7 @@ $ondelim $include "./modules/20_processing/input/f20_scp_processing_shares.csv" $offdelim; -parameter f20_scp_unitcosts(scptype) Costs of production of one unit of SCP exclusive of feedstock costs (USD per tDM) +parameter f20_scp_unitcosts(scptype) Costs of production of one unit of SCP exclusive of feedstock costs (USD17MER per tDM) / $ondelim $include "./modules/20_processing/input/f20_scp_unitcosts.csv" diff --git a/modules/21_trade/exo/declarations.gms b/modules/21_trade/exo/declarations.gms index 67b0151950..cb13b215e1 100644 --- a/modules/21_trade/exo/declarations.gms +++ b/modules/21_trade/exo/declarations.gms @@ -6,7 +6,7 @@ *** | Contact: magpie@pik-potsdam.de positive variables - vm_cost_trade(i) Regional trade costs (mio. USD05MER per yr) + vm_cost_trade(i) Regional trade costs (mio. USD17MER per yr) ; equations @@ -15,7 +15,7 @@ equations *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_trade(t,i,type) Regional trade costs (mio. USD05MER per yr) + ov_cost_trade(t,i,type) Regional trade costs (mio. USD17MER per yr) oq21_notrade(t,h,kall,type) Superregional production constraint of non-tradable commodities (mio. tDM per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/21_trade/free_apr16/declarations.gms b/modules/21_trade/free_apr16/declarations.gms index 811b4f5676..a13a97b6bb 100644 --- a/modules/21_trade/free_apr16/declarations.gms +++ b/modules/21_trade/free_apr16/declarations.gms @@ -7,12 +7,12 @@ parameters i21_trade_bal_reduction(t_all,k_trade) Trade balance reduction (1) - i21_trade_margin(h,k_trade) Trade margins (USD05MER per tDM) - i21_trade_tariff(h,k_trade) Trade tariffs (USD05MER per tDM) + i21_trade_margin(h,k_trade) Trade margins (USD17MER per tDM) + i21_trade_tariff(h,k_trade) Trade tariffs (USD17MER per tDM) ; positive variables - vm_cost_trade(i) Regional trade costs (mio. USD05MER per yr) + vm_cost_trade(i) Regional trade costs (mio. USD17MER per yr) ; equations @@ -22,7 +22,7 @@ equations *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_trade(t,i,type) Regional trade costs (mio. USD05MER per yr) + ov_cost_trade(t,i,type) Regional trade costs (mio. USD17MER per yr) oq21_trade_glo(t,k_trade,type) Global production constraint (mio. tDM per yr) oq21_notrade(t,h,k_notrade,type) Superregional production constraint of non-tradable commodities (mio. tDM per yr) ; diff --git a/modules/21_trade/input/files b/modules/21_trade/input/files index a2dc71b741..dbc4131c7f 100644 --- a/modules/21_trade/input/files +++ b/modules/21_trade/input/files @@ -4,7 +4,5 @@ f21_trade_export_share.cs3 f21_trade_balanceflow.cs3 f21_trade_margin.cs3 f21_trade_tariff.cs3 -f21_trade_tariff_export.cs3 -f21_trade_tariff_import.cs3 f21_trade_balance.cs3 f21_trade_bal_reduction.cs3 diff --git a/modules/21_trade/off/declarations.gms b/modules/21_trade/off/declarations.gms index 5488673ee2..a66f2d5dd9 100644 --- a/modules/21_trade/off/declarations.gms +++ b/modules/21_trade/off/declarations.gms @@ -6,7 +6,7 @@ *** | Contact: magpie@pik-potsdam.de positive variables - vm_cost_trade(i) Regional trade costs (mio. USD05MER per yr) + vm_cost_trade(i) Regional trade costs (mio. USD17MER per yr) ; equations @@ -15,7 +15,7 @@ equations *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_trade(t,i,type) Regional trade costs (mio. USD05MER per yr) + ov_cost_trade(t,i,type) Regional trade costs (mio. USD17MER per yr) oq21_notrade(t,h,kall,type) Superregional production constraint of non-tradable commodities (mio. tDM per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/21_trade/selfsuff_reduced/declarations.gms b/modules/21_trade/selfsuff_reduced/declarations.gms index 59bc20b4d9..fbc984e246 100644 --- a/modules/21_trade/selfsuff_reduced/declarations.gms +++ b/modules/21_trade/selfsuff_reduced/declarations.gms @@ -7,15 +7,15 @@ parameters i21_trade_bal_reduction(t_all,k_trade) Trade balance reduction (1) - i21_trade_margin(h,k_trade) Trade margins (USD05MER per tDM) - i21_trade_tariff(h,k_trade) Trade tariffs (USD05MER per tDM) + i21_trade_margin(h,k_trade) Trade margins (USD17MER per tDM) + i21_trade_tariff(h,k_trade) Trade tariffs (USD17MER per tDM) ; positive variables v21_excess_dem(k_trade) Global excess demand (mio. tDM per yr) v21_excess_prod(h,k_trade) Superregional excess production (mio. tDM per yr) - vm_cost_trade(i) Regional trade costs (mio. USD05MER per yr) - v21_cost_trade_reg(h,k_trade) Superregional trade costs for each tradable commodity (mio. USD05MER per yr) + vm_cost_trade(i) Regional trade costs (mio. USD17MER per yr) + v21_cost_trade_reg(h,k_trade) Superregional trade costs for each tradable commodity (mio. USD17MER per yr) v21_import_for_feasibility(h,k_trade) Additional imports to maintain feasibility (mio. tDM per yr) ; @@ -26,16 +26,16 @@ equations q21_trade_reg_up(h,k_trade) Superregional trade balances i.e. maximum self-sufficiency ratio (1) q21_excess_dem(k_trade) Global excess demand (mio. tDM per yr) q21_excess_supply(h,k_trade) Superregional excess production (mio. tDM per yr) - q21_cost_trade(h) Superregional trade costs (mio. USD05MER per yr) - q21_cost_trade_reg(h,k_trade) Superregional trade costs for each tradable commodity (mio. USD05MER per yr) + q21_cost_trade(h) Superregional trade costs (mio. USD17MER per yr) + q21_cost_trade_reg(h,k_trade) Superregional trade costs for each tradable commodity (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov21_excess_dem(t,k_trade,type) Global excess demand (mio. tDM per yr) ov21_excess_prod(t,h,k_trade,type) Superregional excess production (mio. tDM per yr) - ov_cost_trade(t,i,type) Regional trade costs (mio. USD05MER per yr) - ov21_cost_trade_reg(t,h,k_trade,type) Superregional trade costs for each tradable commodity (mio. USD05MER per yr) + ov_cost_trade(t,i,type) Regional trade costs (mio. USD17MER per yr) + ov21_cost_trade_reg(t,h,k_trade,type) Superregional trade costs for each tradable commodity (mio. USD17MER per yr) ov21_import_for_feasibility(t,h,k_trade,type) Additional imports to maintain feasibility (mio. tDM per yr) oq21_trade_glo(t,k_trade,type) Global production constraint (mio. tDM per yr) oq21_notrade(t,h,k_notrade,type) Superregional production constraint of non-tradable commodities (mio. tDM per yr) @@ -43,7 +43,7 @@ parameters oq21_trade_reg_up(t,h,k_trade,type) Superregional trade balances i.e. maximum self-sufficiency ratio (1) oq21_excess_dem(t,k_trade,type) Global excess demand (mio. tDM per yr) oq21_excess_supply(t,h,k_trade,type) Superregional excess production (mio. tDM per yr) - oq21_cost_trade(t,h,type) Superregional trade costs (mio. USD05MER per yr) - oq21_cost_trade_reg(t,h,k_trade,type) Superregional trade costs for each tradable commodity (mio. USD05MER per yr) + oq21_cost_trade(t,h,type) Superregional trade costs (mio. USD17MER per yr) + oq21_cost_trade_reg(t,h,k_trade,type) Superregional trade costs for each tradable commodity (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/21_trade/selfsuff_reduced/input.gms b/modules/21_trade/selfsuff_reduced/input.gms index 19a8d28d00..f170ff39f0 100644 --- a/modules/21_trade/selfsuff_reduced/input.gms +++ b/modules/21_trade/selfsuff_reduced/input.gms @@ -15,8 +15,8 @@ sets scalars s21_trade_tariff Trade tariff switch (1=on 0=off) (1) / 1 / - s21_cost_import Cost for additional imports to maintain feasibility (USD05MER per tDM) / 10000 / - s21_min_trade_margin_forestry Minimum trade margin for forestry products (USD05MER per tDM) / 50 / + s21_cost_import Cost for additional imports to maintain feasibility (USD17MER per tDM) / 12300 / + s21_min_trade_margin_forestry Minimum trade margin for forestry products (USD17MER per tDM) / 62 / ; table f21_trade_bal_reduction(t_all,trade_groups21,trade_regime21) Share of inelastic trade pool (1) @@ -39,13 +39,13 @@ $ondelim $include "./modules/21_trade/input/f21_trade_balanceflow.cs3" $offdelim; -table f21_trade_margin(h,kall) Costs of freight and insurance (USD05MER per tDM) +table f21_trade_margin(h,kall) Costs of freight and insurance (USD17MER per tDM) $ondelim $include "./modules/21_trade/input/f21_trade_margin.cs3" $offdelim ; -table f21_trade_tariff(h,kall) Specific duty tariffs (USD05MER per tDM) +table f21_trade_tariff(h,kall) Specific duty tariffs (USD17MER per tDM) $ondelim $include "./modules/21_trade/input/f21_trade_tariff.cs3" $offdelim diff --git a/modules/21_trade/selfsuff_reduced/scaling.gms b/modules/21_trade/selfsuff_reduced/scaling.gms index b785809e7b..445ed50447 100644 --- a/modules/21_trade/selfsuff_reduced/scaling.gms +++ b/modules/21_trade/selfsuff_reduced/scaling.gms @@ -6,4 +6,4 @@ *** | Contact: magpie@pik-potsdam.de vm_cost_trade.scale(i) = 10e5; -v21_cost_trade_reg.scale(h,k_trade) = 10e3; +v21_cost_trade_reg.scale(h,k_trade) = 10e4; diff --git a/modules/21_trade/selfsuff_reduced_bilateral22/declarations.gms b/modules/21_trade/selfsuff_reduced_bilateral22/declarations.gms index 52bfeefb13..3df42f1cd1 100644 --- a/modules/21_trade/selfsuff_reduced_bilateral22/declarations.gms +++ b/modules/21_trade/selfsuff_reduced_bilateral22/declarations.gms @@ -7,18 +7,18 @@ parameters i21_trade_bal_reduction(t_all,k_trade) Trade balance reduction (1) - i21_trade_margin(i_ex,i_im,k_trade) Trade transport and admin costs (USD05MER per tDM) - i21_trade_tariff(t_all, i_ex,i_im,k_trade) Trade tariffs (USD05MER per tDM) + i21_trade_margin(i_ex,i_im,k_trade) Trade transport and admin costs (USD17MER per tDM) + i21_trade_tariff(t_all, i_ex,i_im,k_trade) Trade tariffs (USD17MER per tDM) ; positive variables v21_excess_dem(k_trade) Demand exceeding the minimum self-sufficiency (mio. tDM per yr) v21_excess_prod(h,k_trade) Superregional production exceeding the minimum self-sufficiency production (mio. tDM per yr) v21_trade(i_ex,i_im,k_trade) Amounts traded bilaterally (mio. tDM per yr) - v21_cost_tariff_reg(i,k_trade) Regional trade tariffs for each tradable commodity (mio. USD05MER per yr) - v21_cost_margin_reg(i,k_trade) Rregional trade margins for each tradable commodity (mio. USD05MER per yr) - vm_cost_trade(i) Regional trade costs (mio. USD05MER per yr) - v21_cost_trade_reg(i,k_trade) Superregional trade costs for each tradable commodity (mio. USD05MER per yr) + v21_cost_tariff_reg(i,k_trade) Regional trade tariffs for each tradable commodity (mio. USD17MER per yr) + v21_cost_margin_reg(i,k_trade) Rregional trade margins for each tradable commodity (mio. USD17MER per yr) + vm_cost_trade(i) Regional trade costs (mio. USD17MER per yr) + v21_cost_trade_reg(i,k_trade) Superregional trade costs for each tradable commodity (mio. USD17MER per yr) v21_import_for_feasibility(h,k_trade) Additional imports to maintain feasibility (mio. tDM per yr) ; @@ -30,11 +30,11 @@ equations q21_excess_dem(k_trade) Global excess demand (mio. tDM per yr) q21_excess_supply(h,k_trade) Superregional excess production (mio. tDM per yr) q21_trade_bilat(h, k_trade) Superregional bilateral trade requirements (mio. tDM per yr) - q21_costs_tariffs(i, k_trade) Regional trade tariff costs (mio. USD05MER per yr) + q21_costs_tariffs(i, k_trade) Regional trade tariff costs (mio. USD17MER per yr) q21_costs_margins(i,k_trade) Regional bilateral trade requirements - q21_cost_trade_reg(i,k_trade) Regional trade costs for each tradable commodity (mio. USD05MER per yr) - q21_cost_trade_reg(i,k_trade) Superregional trade costs for each tradable commodity (mio. USD05MER per yr) - q21_cost_trade(i) Superregional trade costs (mio. USD05MER per yr) + q21_cost_trade_reg(i,k_trade) Regional trade costs for each tradable commodity (mio. USD17MER per yr) + q21_cost_trade_reg(i,k_trade) Superregional trade costs for each tradable commodity (mio. USD17MER per yr) + q21_cost_trade(i) Superregional trade costs (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### @@ -42,10 +42,10 @@ parameters ov21_excess_dem(t,k_trade,type) Demand exceeding the minimum self-sufficiency (mio. tDM per yr) ov21_excess_prod(t,h,k_trade,type) Superregional production exceeding the minimum self-sufficiency production (mio. tDM per yr) ov21_trade(t,i_ex,i_im,k_trade,type) Amounts traded bilaterally (mio. tDM per yr) - ov21_cost_tariff_reg(t,i,k_trade,type) Regional trade tariffs for each tradable commodity (mio. USD05MER per yr) - ov21_cost_margin_reg(t,i,k_trade,type) Rregional trade margins for each tradable commodity (mio. USD05MER per yr) - ov_cost_trade(t,i,type) Regional trade costs (mio. USD05MER per yr) - ov21_cost_trade_reg(t,i,k_trade,type) Superregional trade costs for each tradable commodity (mio. USD05MER per yr) + ov21_cost_tariff_reg(t,i,k_trade,type) Regional trade tariffs for each tradable commodity (mio. USD17MER per yr) + ov21_cost_margin_reg(t,i,k_trade,type) Rregional trade margins for each tradable commodity (mio. USD17MER per yr) + ov_cost_trade(t,i,type) Regional trade costs (mio. USD17MER per yr) + ov21_cost_trade_reg(t,i,k_trade,type) Superregional trade costs for each tradable commodity (mio. USD17MER per yr) ov21_import_for_feasibility(t,h,k_trade,type) Additional imports to maintain feasibility (mio. tDM per yr) oq21_trade_glo(t,k_trade,type) Global production constraint (mio. tDM per yr) oq21_notrade(t,h,k_notrade,type) Superregional production constraint of non-tradable commodities (mio. tDM per yr) @@ -54,10 +54,10 @@ parameters oq21_excess_dem(t,k_trade,type) Global excess demand (mio. tDM per yr) oq21_excess_supply(t,h,k_trade,type) Superregional excess production (mio. tDM per yr) oq21_trade_bilat(t,h,k_trade,type) Superregional bilateral trade requirements (mio. tDM per yr) - oq21_costs_tariffs(t,i,k_trade,type) Regional trade tariff costs (mio. USD05MER per yr) + oq21_costs_tariffs(t,i,k_trade,type) Regional trade tariff costs (mio. USD17MER per yr) oq21_costs_margins(t,i,k_trade,type) Regional bilateral trade requirements - oq21_cost_trade_reg(t,i,k_trade,type) Regional trade costs for each tradable commodity (mio. USD05MER per yr) - oq21_cost_trade_reg(t,i,k_trade,type) Superregional trade costs for each tradable commodity (mio. USD05MER per yr) - oq21_cost_trade(t,i,type) Superregional trade costs (mio. USD05MER per yr) + oq21_cost_trade_reg(t,i,k_trade,type) Regional trade costs for each tradable commodity (mio. USD17MER per yr) + oq21_cost_trade_reg(t,i,k_trade,type) Superregional trade costs for each tradable commodity (mio. USD17MER per yr) + oq21_cost_trade(t,i,type) Superregional trade costs (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/21_trade/selfsuff_reduced_bilateral22/input.gms b/modules/21_trade/selfsuff_reduced_bilateral22/input.gms index e73d9007a3..69e1830f27 100644 --- a/modules/21_trade/selfsuff_reduced_bilateral22/input.gms +++ b/modules/21_trade/selfsuff_reduced_bilateral22/input.gms @@ -18,8 +18,8 @@ scalars s21_trade_tariff_fadeout fadeout scenario setting for trade tariffs / 0 / s21_trade_tariff_startyear year to start fading out trade tariffs / 2025 / s21_trade_tariff_targetyear year to finish fading out trade tariffs / 2050 / - s21_cost_import Cost for additional imports to maintain feasibility (USD05MER per tDM) / 10000 / - s21_min_trade_margin_forestry Minimum trade margin for forestry products (USD05MER per tDM) / 50 / + s21_cost_import Cost for additional imports to maintain feasibility (USD17MER per tDM) / 12300 / + s21_min_trade_margin_forestry Minimum trade margin for forestry products (USD17MER per tDM) / 62 / ; table f21_trade_bal_reduction(t_all,trade_groups21,trade_regime21) Share of inelastic trade pool (1) @@ -42,14 +42,14 @@ $ondelim $include "./modules/21_trade/input/f21_trade_balanceflow.cs3" $offdelim; -parameter f21_trade_margin(i_ex,i_im,kall) Costs of freight and insurance (USD05MER per tDM) +parameter f21_trade_margin(i_ex,i_im,kall) Costs of freight and insurance (USD17MER per tDM) / $ondelim $include "./modules/21_trade/selfsuff_reduced_bilateral22/input/f21_trade_margin_bilat.cs5" $offdelim /; -parameter f21_trade_tariff(i_ex,i_im,kall) Specific duty tariffs (USD05MER per tDM) +parameter f21_trade_tariff(i_ex,i_im,kall) Specific duty tariffs (USD17MER per tDM) / $ondelim $include "./modules/21_trade/selfsuff_reduced_bilateral22/input/f21_trade_tariff_bilat.cs5" diff --git a/modules/21_trade/selfsuff_reduced_bilateral22/scaling.gms b/modules/21_trade/selfsuff_reduced_bilateral22/scaling.gms index b9df882f1a..2a4d3ae97a 100644 --- a/modules/21_trade/selfsuff_reduced_bilateral22/scaling.gms +++ b/modules/21_trade/selfsuff_reduced_bilateral22/scaling.gms @@ -6,4 +6,4 @@ *** | Contact: magpie@pik-potsdam.de vm_cost_trade.scale(i) = 10e5; -v21_cost_trade_reg.scale(i,k_trade) = 10e3; +v21_cost_trade_reg.scale(i,k_trade) = 10e4; diff --git a/modules/22_land_conservation/area_based_apr22/declarations.gms b/modules/22_land_conservation/area_based_apr22/declarations.gms index c036eee1ea..7a4302d79a 100644 --- a/modules/22_land_conservation/area_based_apr22/declarations.gms +++ b/modules/22_land_conservation/area_based_apr22/declarations.gms @@ -19,7 +19,7 @@ parameters p22_past_restore_pot(t,j) Potential pasture restoration area (mio. ha) p22_other_restore_pot(t,j) Potential other land restoration area (mio. ha) p22_country_weight(i) Land conservation country weight per region (1) - p22_country_dummy(iso) Dummy parameter indicating whether country is affected by selected land conservation policy (1) + p22_country_switch(iso) Switch indicating whether country is affected by selected land conservation policy (1) i22_land_iso(iso) Total land area at ISO level (mio. ha) ; diff --git a/modules/22_land_conservation/area_based_apr22/preloop.gms b/modules/22_land_conservation/area_based_apr22/preloop.gms index ab4b497f81..ab856aaf83 100644 --- a/modules/22_land_conservation/area_based_apr22/preloop.gms +++ b/modules/22_land_conservation/area_based_apr22/preloop.gms @@ -12,13 +12,13 @@ * Regional share of land conservation policies in selective countries: * Country switch to determine countries for which land conservation shall be applied. * In the default case, the land conservation affects all countries when activated. -p22_country_dummy(iso) = 0; -p22_country_dummy(policy_countries22) = 1; +p22_country_switch(iso) = 0; +p22_country_switch(policy_countries22) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by total land area. i22_land_iso(iso) = sum(land, fm_land_iso("y1995",iso,land)); -p22_country_weight(i) = sum(i_to_iso(i,iso), p22_country_dummy(iso) * i22_land_iso(iso)) / sum(i_to_iso(i,iso), i22_land_iso(iso)); +p22_country_weight(i) = sum(i_to_iso(i,iso), p22_country_switch(iso) * i22_land_iso(iso)) / sum(i_to_iso(i,iso), i22_land_iso(iso)); * --------------------------------------------------------------------- * Initialise baseline protection and conservation priority areas diff --git a/modules/28_ageclass/feb21/declarations.gms b/modules/28_ageclass/feb21/declarations.gms deleted file mode 100644 index baefc0ebb4..0000000000 --- a/modules/28_ageclass/feb21/declarations.gms +++ /dev/null @@ -1,10 +0,0 @@ -*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - -parameter - im_plantedclass_ac(j,ac) Raw Distribution of ageclass in secondary forest as a proxy for planted forest (mio. ha) -; diff --git a/modules/28_ageclass/feb21/preloop.gms b/modules/28_ageclass/feb21/preloop.gms deleted file mode 100644 index 12cffe2e9c..0000000000 --- a/modules/28_ageclass/feb21/preloop.gms +++ /dev/null @@ -1,15 +0,0 @@ -*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - -* Ben Poulter age class distribution -im_plantedclass_ac(j,ac) = 0; -*im_plantedclass_ac(j,ac) = sum(ac_poulter_to_ac(ac_poulter,ac),f28_forestageclasses(j,ac_poulter)$(not sameas(ac_poulter,"class15"))); -im_plantedclass_ac(j,ac) = sum(ac_poulter_to_ac(ac_poulter,ac),f28_forestageclasses(j,ac_poulter)); - -* As summing over makes double counting (two magpie age classes in one poulter class) -* We divide by 2 -im_plantedclass_ac(j,ac) = im_plantedclass_ac(j,ac) /2; diff --git a/modules/28_ageclass/feb21/realization.gms b/modules/28_ageclass/feb21/realization.gms deleted file mode 100644 index f88a2c1b85..0000000000 --- a/modules/28_ageclass/feb21/realization.gms +++ /dev/null @@ -1,26 +0,0 @@ -*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - -*' @description This realization calculates use the results from @poulter2018global -*' for secondary forests (and timber plantations) based on MODIS satellite data. -*' This is used in [32_forestry] and [35_natveg] for initialization of forest areas -*' based on specification of endogenous (or exogenous) forest harvests. These numbers -*' are the most consistent dataset available on spatial scale and are preferred over -*' extarcting such numbers from LUH data due to ease of generating these numbers. - -*' @limitations Forest fires change how the age structures of secondary or -*' human-intervention forests over time. This being a satellite observation data -*' probably includes such disturbances. These disturbances are not modeled extensively -*' in MAgPIE and hence using these numbers directly in the model might generate biases. - -*####################### R SECTION START (PHASES) ############################## -$Ifi "%phase%" == "sets" $include "./modules/28_ageclass/feb21/sets.gms" -$Ifi "%phase%" == "declarations" $include "./modules/28_ageclass/feb21/declarations.gms" -$Ifi "%phase%" == "input" $include "./modules/28_ageclass/feb21/input.gms" -$Ifi "%phase%" == "preloop" $include "./modules/28_ageclass/feb21/preloop.gms" -$Ifi "%phase%" == "presolve" $include "./modules/28_ageclass/feb21/presolve.gms" -*######################## R SECTION END (PHASES) ############################### diff --git a/modules/28_ageclass/module.gms b/modules/28_ageclass/module.gms index 27f03a3081..30488315fb 100644 --- a/modules/28_ageclass/module.gms +++ b/modules/28_ageclass/module.gms @@ -7,12 +7,12 @@ *' @title Age class -*' @description The age-class module calculates the distribution of secondary -*' forests and timber plantations based on Poulter dataset. This is used in -*' [32_forestry] and [35_natveg] for initialization of forest areas. +*' @description The age-class module provides forest area in age-classes +*' to other modules. The interface `im_forest_ageclass` is used in +*' [35_natveg] for the initialization of secondary forest areas. *' @authors Abhijeet Mishra, Florian Humpenöder *###################### R SECTION START (MODULETYPES) ########################## -$Ifi "%ageclass%" == "feb21" $include "./modules/28_ageclass/feb21/realization.gms" +$Ifi "%ageclass%" == "oct24" $include "./modules/28_ageclass/oct24/realization.gms" *###################### R SECTION END (MODULETYPES) ############################ diff --git a/modules/58_peatland/v2/scaling.gms b/modules/28_ageclass/oct24/declarations.gms similarity index 79% rename from modules/58_peatland/v2/scaling.gms rename to modules/28_ageclass/oct24/declarations.gms index 787936e8ca..96fdac64c9 100644 --- a/modules/58_peatland/v2/scaling.gms +++ b/modules/28_ageclass/oct24/declarations.gms @@ -5,5 +5,6 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -v58_peatlandChange.scale(j,land58) = 10e-3; -v58_peatland.scale(j,land58) = 10e-3; +parameter + im_forest_ageclass(j,ac) Forest area in 5-year age-classes based on GFAD (mio. ha) +; diff --git a/modules/28_ageclass/feb21/input.gms b/modules/28_ageclass/oct24/input.gms similarity index 83% rename from modules/28_ageclass/feb21/input.gms rename to modules/28_ageclass/oct24/input.gms index 7e645fecdb..4183a2e0fe 100644 --- a/modules/28_ageclass/feb21/input.gms +++ b/modules/28_ageclass/oct24/input.gms @@ -5,7 +5,7 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -table f28_forestageclasses(j,ac_poulter) Poulter age-class area in each cluster (1) +table f28_forestageclasses(j,ac_gfad) Forest area in 15 10-year age classes from GFAD (Mha) $ondelim $include "./modules/28_ageclass/input/forestageclasses.cs3" $offdelim diff --git a/modules/28_ageclass/oct24/preloop.gms b/modules/28_ageclass/oct24/preloop.gms new file mode 100644 index 0000000000..b077389274 --- /dev/null +++ b/modules/28_ageclass/oct24/preloop.gms @@ -0,0 +1,14 @@ +*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) +*** | authors, and contributors see CITATION.cff file. This file is part +*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of +*** | AGPL-3.0, you are granted additional permissions described in the +*** | MAgPIE License Exception, version 1.0 (see LICENSE file). +*** | Contact: magpie@pik-potsdam.de + +* Two age-classes in `ac` are mapped to one age-class in `ac_gfad`. +* Therefore, each age-class in `ac_gfad` is distributed equally to all belonging age-classes in `ac`. +im_forest_ageclass(j,ac) = 0; +im_forest_ageclass(j,ac) = sum(ac_gfad_to_ac(ac_gfad,ac),f28_forestageclasses(j,ac_gfad)) / 2; +* `class15` in GFAD1.1 includes forests that are 150 years or older, also including primary forest. +* Therefore, `class15` is mapped to the highest age-class `acx`. +im_forest_ageclass(j,"acx") = f28_forestageclasses(j,"class15"); diff --git a/modules/28_ageclass/feb21/presolve.gms b/modules/28_ageclass/oct24/presolve.gms similarity index 100% rename from modules/28_ageclass/feb21/presolve.gms rename to modules/28_ageclass/oct24/presolve.gms diff --git a/modules/28_ageclass/oct24/realization.gms b/modules/28_ageclass/oct24/realization.gms new file mode 100644 index 0000000000..918f99d9e6 --- /dev/null +++ b/modules/28_ageclass/oct24/realization.gms @@ -0,0 +1,22 @@ +*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) +*** | authors, and contributors see CITATION.cff file. This file is part +*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of +*** | AGPL-3.0, you are granted additional permissions described in the +*** | MAgPIE License Exception, version 1.0 (see LICENSE file). +*** | Contact: magpie@pik-potsdam.de + +*' @description This realization provides forest area in age-classes `im_forest_ageclass` +*' based on the Global Forest Age Dataset (GFAD V1.1) from @poulter_global_2019. + +*' @limitations Disturbances such as forest fires change the age structure of forests over time. +*' GFAD V1.1 likely includes such disturbances in younger age-classes (`ac_young`). +*' Since forest disturbances are not modeled extensively in MAgPIE, +*' using these numbers directly in the model might generate biases. + +*####################### R SECTION START (PHASES) ############################## +$Ifi "%phase%" == "sets" $include "./modules/28_ageclass/oct24/sets.gms" +$Ifi "%phase%" == "declarations" $include "./modules/28_ageclass/oct24/declarations.gms" +$Ifi "%phase%" == "input" $include "./modules/28_ageclass/oct24/input.gms" +$Ifi "%phase%" == "preloop" $include "./modules/28_ageclass/oct24/preloop.gms" +$Ifi "%phase%" == "presolve" $include "./modules/28_ageclass/oct24/presolve.gms" +*######################## R SECTION END (PHASES) ############################### diff --git a/modules/28_ageclass/feb21/sets.gms b/modules/28_ageclass/oct24/sets.gms similarity index 69% rename from modules/28_ageclass/feb21/sets.gms rename to modules/28_ageclass/oct24/sets.gms index 0673fbb64e..9fc3483ce4 100644 --- a/modules/28_ageclass/feb21/sets.gms +++ b/modules/28_ageclass/oct24/sets.gms @@ -6,19 +6,15 @@ *** | Contact: magpie@pik-potsdam.de sets -ac_poulter Forest age classes in Poulter data set +ac_gfad Forest age classes in GFAD data set / class1, class2, class3, class4, class5, class6, class7, class8, class9, class10, class11, class12, class13, class14, class15 / -ac_planted(ac) Young age classes which probably belong to managed forest +ac_young(ac) Young age classes / ac0, ac5, ac10, ac15, ac20, ac25, ac30 / -ac_plantations(ac) Possible age classes which probably belong to plantations -/ ac0, ac5, ac10, ac15, ac20, ac25, ac30, - ac35, ac40, ac45, ac50, ac55, ac60 / - -ac_poulter_to_ac(ac_poulter,ac) mapping between ac and ac_poulter +ac_gfad_to_ac(ac_gfad,ac) mapping between ac and ac_gfad / class1 . (ac5,ac10) class2 . (ac15,ac20) @@ -34,10 +30,9 @@ class11 . (ac105,ac110) class12 . (ac115,ac120) class13 . (ac125,ac130) class14 . (ac135,ac140) -class15 . (ac145,ac150) / ; -alias(ac_poulter,ac_poulter2); +alias(ac_gfad,ac_gfad2); alias(ac,ac2); diff --git a/modules/29_cropland/detail_apr24/declarations.gms b/modules/29_cropland/detail_apr24/declarations.gms index bfa7e79f98..01ec807afd 100644 --- a/modules/29_cropland/detail_apr24/declarations.gms +++ b/modules/29_cropland/detail_apr24/declarations.gms @@ -16,13 +16,13 @@ parameters i29_snv_relocation_target(j) Overall cropland area that requires relocation due to SNV policy (mio. ha) p29_snv_relocation(t,j) Cropland area that is actually relocated during time step (mio. ha) p29_max_snv_relocation(t,j) Maximum cropland relocation during time step (mio. ha) - p29_country_dummy(iso) Dummy parameter indicating whether country is affected by selected cropland policy (1) + p29_country_switch(iso) Switch indicating whether country is affected by selected cropland policy (1) pm_avl_cropland_iso(iso) Available land area for cropland at ISO level (mio. ha) i29_snv_scenario_fader(t_all) SNV scenario fader (1) i29_treecover_scenario_fader(t_all) Cropland treecover scenario fader (1) i29_treecover_target(t,j) Target share for treecover on total cropland (1) - i29_treecover_penalty(t) Penalty for violation of treecover target (USD05MER per ha) + i29_treecover_penalty(t) Penalty for violation of treecover target (USD17MER per ha) p29_treecover_bii_coeff(bii_class_secd,potnatveg) BII coefficient for cropland treecover (1) p29_carbon_density_ac(t,j,ac,ag_pools) Carbon density for ac and ag_pools (tC per ha) p29_treecover(t,j,ac) Cropland tree cover per age class (mio. ha) @@ -31,16 +31,16 @@ parameters i29_fallow_scenario_fader(t_all) Fallow land scenario fader (1) i29_fallow_target(t) Target share for fallow land on total cropland (1) - i29_fallow_penalty(t) Penalty for violation of fallow target (USD05MER per ha) + i29_fallow_penalty(t) Penalty for violation of fallow target (USD17MER per ha) ; positive variables - vm_cost_cropland(j) Cost for total cropland (mio. USD05MER per yr) + vm_cost_cropland(j) Cost for total cropland (mio. USD17MER per yr) vm_treecover(j) Cropland tree cover (mio. ha) v29_treecover(j,ac) Cropland tree cover per age class (mio. ha) v29_treecover_missing(j) Missing treecover area towards target (mio. ha) - v29_cost_treecover_est(j) Establishment cost for cropland tree cover (mio. USD05MER per yr) - v29_cost_treecover_recur(j) Recurring cost for cropland tree cover (mio. USD05MER per yr) + v29_cost_treecover_est(j) Establishment cost for cropland tree cover (mio. USD17MER per yr) + v29_cost_treecover_recur(j) Recurring cost for cropland tree cover (mio. USD17MER per yr) vm_fallow(j) Fallow land is temporarily fallow cropland (mio. ha) v29_fallow_missing(j) Missing fallow land towards target (mio. ha) ; @@ -48,7 +48,7 @@ positive variables equations q29_cropland(j) Total cropland calculation (mio. ha) q29_avl_cropland(j) Available cropland constraint (mio. ha) - q29_cost_cropland(j) Costs and benefits related to agroforestry (mio. USD05MER per yr) + q29_cost_cropland(j) Costs and benefits related to agroforestry (mio. USD17MER per yr) q29_carbon(j,ag_pools,stockType) Cropland above ground carbon content calculation (mio. tC) q29_land_snv(j) Land constraint for the SNV policy in cropland areas (mio. ha) q29_land_snv_trans(j) Land transition constraint for SNV policy in cropland areas (mio. ha) @@ -59,24 +59,24 @@ equations q29_treecover_min(j) Missing treecover area towards target (mio. ha) q29_treecover_max(j) Maximum treecover area (mio. ha) q29_treecover_bv(j,potnatveg) Biodiversity value for cropland treecover (mio. ha) - q29_cost_treecover_est(j) Establishment cost for cropland tree cover (mio. USD05MER per yr) - q29_cost_treecover_recur(j) Recurring cost for cropland tree cover (mio. USD05MER per yr) + q29_cost_treecover_est(j) Establishment cost for cropland tree cover (mio. USD17MER per yr) + q29_cost_treecover_recur(j) Recurring cost for cropland tree cover (mio. USD17MER per yr) q29_treecover_est(j,ac) Cropland treecover establishment (mio. ha) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_cropland(t,j,type) Cost for total cropland (mio. USD05MER per yr) + ov_cost_cropland(t,j,type) Cost for total cropland (mio. USD17MER per yr) ov_treecover(t,j,type) Cropland tree cover (mio. ha) ov29_treecover(t,j,ac,type) Cropland tree cover per age class (mio. ha) ov29_treecover_missing(t,j,type) Missing treecover area towards target (mio. ha) - ov29_cost_treecover_est(t,j,type) Establishment cost for cropland tree cover (mio. USD05MER per yr) - ov29_cost_treecover_recur(t,j,type) Recurring cost for cropland tree cover (mio. USD05MER per yr) + ov29_cost_treecover_est(t,j,type) Establishment cost for cropland tree cover (mio. USD17MER per yr) + ov29_cost_treecover_recur(t,j,type) Recurring cost for cropland tree cover (mio. USD17MER per yr) ov_fallow(t,j,type) Fallow land is temporarily fallow cropland (mio. ha) ov29_fallow_missing(t,j,type) Missing fallow land towards target (mio. ha) oq29_cropland(t,j,type) Total cropland calculation (mio. ha) oq29_avl_cropland(t,j,type) Available cropland constraint (mio. ha) - oq29_cost_cropland(t,j,type) Costs and benefits related to agroforestry (mio. USD05MER per yr) + oq29_cost_cropland(t,j,type) Costs and benefits related to agroforestry (mio. USD17MER per yr) oq29_carbon(t,j,ag_pools,stockType,type) Cropland above ground carbon content calculation (mio. tC) oq29_land_snv(t,j,type) Land constraint for the SNV policy in cropland areas (mio. ha) oq29_land_snv_trans(t,j,type) Land transition constraint for SNV policy in cropland areas (mio. ha) @@ -87,8 +87,8 @@ parameters oq29_treecover_min(t,j,type) Missing treecover area towards target (mio. ha) oq29_treecover_max(t,j,type) Maximum treecover area (mio. ha) oq29_treecover_bv(t,j,potnatveg,type) Biodiversity value for cropland treecover (mio. ha) - oq29_cost_treecover_est(t,j,type) Establishment cost for cropland tree cover (mio. USD05MER per yr) - oq29_cost_treecover_recur(t,j,type) Recurring cost for cropland tree cover (mio. USD05MER per yr) + oq29_cost_treecover_est(t,j,type) Establishment cost for cropland tree cover (mio. USD17MER per yr) + oq29_cost_treecover_recur(t,j,type) Recurring cost for cropland tree cover (mio. USD17MER per yr) oq29_treecover_est(t,j,ac,type) Cropland treecover establishment (mio. ha) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/29_cropland/detail_apr24/input.gms b/modules/29_cropland/detail_apr24/input.gms index 0b8b21899e..77f9113cce 100644 --- a/modules/29_cropland/detail_apr24/input.gms +++ b/modules/29_cropland/detail_apr24/input.gms @@ -15,8 +15,8 @@ scalars s29_snv_scenario_target SNV scenario target year / 2050 / s29_snv_relocation_data_x1 First reference value in SNV target cropland data (1) / 0.2 / s29_snv_relocation_data_x2 Second reference value in SNV target cropland data (1) / 0.5 / - s29_cost_treecover_est Tree cover establishment cost (USD05MER per ha) / 2000 / - s29_cost_treecover_recur Tree cover recurring cost (USD05MER per ha) / 500 / + s29_cost_treecover_est Tree cover establishment cost (USD17MER per ha) / 2460 / + s29_cost_treecover_recur Tree cover recurring cost (USD17MER per ha) / 615 / s29_treecover_plantation Growth curve switch for tree cover on cropland 0=natveg 1=plantations (1) / 0 / s29_treecover_bii_coeff BII coefficent to be used for tree cover on cropland 0=secondary vegetation 1=timber plantations (1) / 0 / s29_treecover_scenario_start Cropland treecover scenario start year / 2025 / @@ -25,13 +25,13 @@ scalars s29_treecover_target_noselect Minimum share of treecover on total cropland in target year (1) / 0 / s29_treecover_keep Avoid loss of existing treecover (1=yes 0=no) / 0 / s29_treecover_max Maximum share of treecover on total cropland (1) / 0.4 / - s29_treecover_penalty_before Penalty for violation of treecover target before scenario start (USD05MER per ha) / 0 / - s29_treecover_penalty Penalty for violation of treecover target after sceanrio start (USD05MER per ha) / 5000 / + s29_treecover_penalty_before Penalty for violation of treecover target before scenario start (USD17MER per ha) / 0 / + s29_treecover_penalty Penalty for violation of treecover target after sceanrio start (USD17MER per ha) / 6150 / s29_fallow_scenario_start Fallow land scenario start year / 2025 / s29_fallow_scenario_target Fallow land scenario target year / 2050 / s29_fallow_target Minimum share of fallow land on total cropland in target year (1) / 0 / s29_fallow_max Maximum share of fallow land on total cropland (1) / 0.4 / - s29_fallow_penalty Penalty for violation of fallow target (USD05MER per ha) / 500 / + s29_fallow_penalty Penalty for violation of fallow target (USD17MER per ha) / 615 / s29_treecover_map Treecover map for initialization (binary) / 0 / s29_fader_functional_form Switch for functional form of faders (1) / 2 / ; @@ -67,7 +67,7 @@ sets UGA,UKR,UMI,URY,USA,UZB,VAT,VCT,VEN,VGB, VIR,VNM,VUT,WLF,WSM,YEM,ZAF,ZMB,ZWE / -land_snv(land) land types allowed in the SNV policy / secdforest, forestry, past, other / +land_snv(land) land types allowed in the SNV policy / secdforest, other / ; ********* AVAILABLE CROPLAND ******************************************* diff --git a/modules/29_cropland/detail_apr24/preloop.gms b/modules/29_cropland/detail_apr24/preloop.gms index 34c0fe6eac..2d87573ce5 100644 --- a/modules/29_cropland/detail_apr24/preloop.gms +++ b/modules/29_cropland/detail_apr24/preloop.gms @@ -59,10 +59,19 @@ elseif s29_treecover_bii_coeff = 1, * Country switch to determine countries for which certain policies shall be applied. * In the default case, the policy affects all countries when activated. -p29_country_dummy(iso) = 0; -p29_country_dummy(policy_countries29) = 1; +p29_country_switch(iso) = 0; +p29_country_switch(policy_countries29) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by available cropland area. pm_avl_cropland_iso(iso) = f29_avl_cropland_iso(iso,"%c29_marginal_land%"); -p29_country_weight(i) = sum(i_to_iso(i,iso), p29_country_dummy(iso) * pm_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), pm_avl_cropland_iso(iso)); +p29_country_weight(i) = sum(i_to_iso(i,iso), p29_country_switch(iso) * pm_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), pm_avl_cropland_iso(iso)); + +* Initialize biodiversity value +vm_fallow.l(j) = 0; +vm_bv.l(j,"crop_fallow",potnatveg) = + vm_fallow.l(j) * fm_bii_coeff("crop_per",potnatveg) * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j2,"crop_tree",potnatveg) = + sum(bii_class_secd, sum(ac_to_bii_class_secd(ac,bii_class_secd), pc29_treecover(j2,ac)) * + p29_treecover_bii_coeff(bii_class_secd,potnatveg)) * fm_luh2_side_layers(j2,potnatveg); diff --git a/modules/29_cropland/detail_apr24/presolve.gms b/modules/29_cropland/detail_apr24/presolve.gms index e1a7d63bcf..99e6d3014d 100644 --- a/modules/29_cropland/detail_apr24/presolve.gms +++ b/modules/29_cropland/detail_apr24/presolve.gms @@ -64,11 +64,10 @@ if (s29_treecover_keep = 1, i29_treecover_target(t,j)$(i29_treecover_target(t,j) < pc29_treecover_share(j)) = pc29_treecover_share(j); ); -* Bounds for treecover. Only ac_est can increase in optimization. ac_sub can only decrease. +* Bounds for treecover. Only ac_est can increase in optimization. ac_sub is fixed. v29_treecover.lo(j,ac_est) = 0; v29_treecover.up(j,ac_est) = Inf; -v29_treecover.lo(j,ac_sub) = 0; -v29_treecover.up(j,ac_sub) = pc29_treecover(j,ac_sub); +v29_treecover.fx(j,ac_sub) = pc29_treecover(j,ac_sub); m_boundfix(v29_treecover,(j,ac_sub),l,1e-6); * set treecover penalty @@ -110,3 +109,11 @@ else vm_fallow.lo(j) = 0; vm_fallow.up(j) = p29_avl_cropland(t,j); m_boundfix(vm_fallow,(j),l,1e-6); + +* Update biodiversity value +vm_bv.l(j,"crop_fallow",potnatveg) = + vm_fallow.l(j) * fm_bii_coeff("crop_per",potnatveg) * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j,"crop_tree",potnatveg) = + sum(bii_class_secd, sum(ac_to_bii_class_secd(ac,bii_class_secd), pc29_treecover(j,ac)) * + p29_treecover_bii_coeff(bii_class_secd,potnatveg)) * fm_luh2_side_layers(j,potnatveg); diff --git a/modules/29_cropland/simple_apr24/declarations.gms b/modules/29_cropland/simple_apr24/declarations.gms index 625f819b2c..d7aaf7f4ff 100644 --- a/modules/29_cropland/simple_apr24/declarations.gms +++ b/modules/29_cropland/simple_apr24/declarations.gms @@ -12,13 +12,13 @@ parameters i29_snv_relocation_target(j) Overall cropland area that requires relocation due to SNV policy (mio. ha) p29_snv_relocation(t,j) Cropland area that is actually relocated during time step (mio. ha) p29_max_snv_relocation(t,j) Maximum cropland relocation during time step (mio. ha) - p29_country_dummy(iso) Dummy parameter indicating whether country is affected by selected cropland policy (1) + p29_country_switch(iso) Switch indicating whether country is affected by selected cropland policy (1) pm_avl_cropland_iso(iso) Available land area for cropland at ISO level (mio. ha) i29_snv_scenario_fader(t_all) SNV scenario fader (1) ; positive variables - vm_cost_cropland(j) Cost for total cropland (mio. USD05MER per yr) + vm_cost_cropland(j) Cost for total cropland (mio. USD17MER per yr) vm_fallow(j) Fallow land is temporarily fallow cropland (mio. ha) vm_treecover(j) Cropland tree cover (mio. ha) ; @@ -33,7 +33,7 @@ equations *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_cropland(t,j,type) Cost for total cropland (mio. USD05MER per yr) + ov_cost_cropland(t,j,type) Cost for total cropland (mio. USD17MER per yr) ov_fallow(t,j,type) Fallow land is temporarily fallow cropland (mio. ha) ov_treecover(t,j,type) Cropland tree cover (mio. ha) oq29_cropland(t,j,type) Total cropland calculation (mio. ha) diff --git a/modules/29_cropland/simple_apr24/input.gms b/modules/29_cropland/simple_apr24/input.gms index f13c46f56f..70513be844 100644 --- a/modules/29_cropland/simple_apr24/input.gms +++ b/modules/29_cropland/simple_apr24/input.gms @@ -47,7 +47,7 @@ sets UGA,UKR,UMI,URY,USA,UZB,VAT,VCT,VEN,VGB, VIR,VNM,VUT,WLF,WSM,YEM,ZAF,ZMB,ZWE / -land_snv(land) land types allowed in the SNV policy / secdforest, forestry, past, other / +land_snv(land) land types allowed in the SNV policy / secdforest, other / ; ********* AVAILABLE CROPLAND ******************************************* diff --git a/modules/29_cropland/simple_apr24/preloop.gms b/modules/29_cropland/simple_apr24/preloop.gms index 9b06b11d8f..3b4d075840 100644 --- a/modules/29_cropland/simple_apr24/preloop.gms +++ b/modules/29_cropland/simple_apr24/preloop.gms @@ -27,10 +27,10 @@ elseif s29_snv_shr > s29_snv_relocation_data_x1, * Country switch to determine countries for which certain policies shall be applied. * In the default case, the policy affects all countries when activated. -p29_country_dummy(iso) = 0; -p29_country_dummy(policy_countries29) = 1; +p29_country_switch(iso) = 0; +p29_country_switch(policy_countries29) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by available cropland area. pm_avl_cropland_iso(iso) = f29_avl_cropland_iso(iso,"%c29_marginal_land%"); -p29_country_weight(i) = sum(i_to_iso(i,iso), p29_country_dummy(iso) * pm_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), pm_avl_cropland_iso(iso)); +p29_country_weight(i) = sum(i_to_iso(i,iso), p29_country_switch(iso) * pm_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), pm_avl_cropland_iso(iso)); diff --git a/modules/30_croparea/detail_apr24/declarations.gms b/modules/30_croparea/detail_apr24/declarations.gms index 749c03c37b..dfb1647f1d 100644 --- a/modules/30_croparea/detail_apr24/declarations.gms +++ b/modules/30_croparea/detail_apr24/declarations.gms @@ -7,22 +7,22 @@ parameters i30_rotation_rules(t_all,rota30) Rotational constraints (1) - i30_rotation_incentives(t_all,rota30) Penalty for violating rotational constraints (USD05MER per ha) + i30_rotation_incentives(t_all,rota30) Penalty for violating rotational constraints (USD17MER per ha) i30_rotation_scenario_fader(t_all) Crop rotation scenario fader (1) i30_implementation Switch for rule-based (1) or penalty-based (0) implementation of rotation scenarios i30_betr_scenario_fader(t_all) Bioenergy land scenario fader (1) i30_betr_target(t,j) Target share for bioenergy land on total cropland (1) - i30_betr_penalty(t) Penalty for violation of betr target (USD05MER per ha) + i30_betr_penalty(t) Penalty for violation of betr target (USD17MER per ha) p30_country_weight(i) Policy country weight per region (1) - p30_country_dummy(iso) Dummy parameter indicating whether country is affected by selected policy (1) + p30_country_switch(iso) Switch indicating whether country is affected by selected policy (1) ; positive variables vm_area(j,kcr,w) Agricultural production area (mio. ha) - vm_rotation_penalty(i) Penalty for violating rotational constraints (mio. USD05MER) + vm_rotation_penalty(i) Penalty for violating rotational constraints (mio. USD17MER) vm_carbon_stock_croparea(j,ag_pools) Carbon stock in croparea (tC) - v30_penalty_max_irrig(j,rotamax30) Penalty for violating max rotational constraints on irrigated land (mio. USD05MER) - v30_penalty(j,rota30) Penalty for violating rotational constraints (mio. USD05MER) + v30_penalty_max_irrig(j,rotamax30) Penalty for violating max rotational constraints on irrigated land (mio. USD17MER) + v30_penalty(j,rota30) Penalty for violating rotational constraints (mio. USD17MER) v30_betr_missing(j) Missing bioenergy tree land towards target (mio. ha) v30_crop_area(i) Total regional crop production area (mio. ha) ; @@ -30,7 +30,7 @@ positive variables equations q30_prod(j,kcr) Production of cropped products (mio. tDM) q30_betr_missing(j) Missing bioenergy tree land towards target (mio. ha) - q30_rotation_penalty(i) Total penalty for rotational constraint violations (mio. USD05MER) + q30_rotation_penalty(i) Total penalty for rotational constraint violations (mio. USD17MER) q30_rotation_max(j,rotamax30) Local maximum rotational constraints (mio. ha) q30_rotation_min(j,rotamin30) Local minimum rotational constraints (mio. ha) q30_rotation_max2(j,rotamax30) Local maximum rotational constraints (mio. ha) @@ -45,15 +45,15 @@ equations *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov_area(t,j,kcr,w,type) Agricultural production area (mio. ha) - ov_rotation_penalty(t,i,type) Penalty for violating rotational constraints (mio. USD05MER) + ov_rotation_penalty(t,i,type) Penalty for violating rotational constraints (mio. USD17MER) ov_carbon_stock_croparea(t,j,ag_pools,type) Carbon stock in croparea (tC) - ov30_penalty_max_irrig(t,j,rotamax30,type) Penalty for violating max rotational constraints on irrigated land (mio. USD05MER) - ov30_penalty(t,j,rota30,type) Penalty for violating rotational constraints (mio. USD05MER) + ov30_penalty_max_irrig(t,j,rotamax30,type) Penalty for violating max rotational constraints on irrigated land (mio. USD17MER) + ov30_penalty(t,j,rota30,type) Penalty for violating rotational constraints (mio. USD17MER) ov30_betr_missing(t,j,type) Missing bioenergy tree land towards target (mio. ha) ov30_crop_area(t,i,type) Total regional crop production area (mio. ha) oq30_prod(t,j,kcr,type) Production of cropped products (mio. tDM) oq30_betr_missing(t,j,type) Missing bioenergy tree land towards target (mio. ha) - oq30_rotation_penalty(t,i,type) Total penalty for rotational constraint violations (mio. USD05MER) + oq30_rotation_penalty(t,i,type) Total penalty for rotational constraint violations (mio. USD17MER) oq30_rotation_max(t,j,rotamax30,type) Local maximum rotational constraints (mio. ha) oq30_rotation_min(t,j,rotamin30,type) Local minimum rotational constraints (mio. ha) oq30_rotation_max2(t,j,rotamax30,type) Local maximum rotational constraints (mio. ha) diff --git a/modules/30_croparea/detail_apr24/input.gms b/modules/30_croparea/detail_apr24/input.gms index 47c979fc0e..ec84dd5d8f 100644 --- a/modules/30_croparea/detail_apr24/input.gms +++ b/modules/30_croparea/detail_apr24/input.gms @@ -28,7 +28,7 @@ scalars s30_betr_start_noselect Share of bioenergy land on total cropland in start year (1) / 0 / s30_betr_target Share of bioenergy land on total cropland in target year (1) / 0 / s30_betr_target_noselect Share of bioenergy land on total cropland in target year (1) / 0 / - s30_betr_penalty Penalty for violation of betr target (USD05MER per ha) / 2000 / + s30_betr_penalty Penalty for violation of betr target (USD17MER per ha) / 2460 / s30_annual_max_growth Max annual cropland growth as share of previous cropland (1) / Inf / ; @@ -82,7 +82,7 @@ m_fillmissingyears(fm_croparea,"j,w,kcr"); ********* CROP-ROTATIONAL CONSTRAINT ******************************************* -table f30_rotation_incentives(rota30,incentscen30) penalties for violating rotation rules (USD05MER) +table f30_rotation_incentives(rota30,incentscen30) penalties for violating rotation rules (USD17MER) $ondelim $include "./modules/30_croparea/detail_apr24/input/f30_rotation_incentives.csv" $offdelim diff --git a/modules/30_croparea/detail_apr24/preloop.gms b/modules/30_croparea/detail_apr24/preloop.gms index cdef528e7f..c392b62370 100644 --- a/modules/30_croparea/detail_apr24/preloop.gms +++ b/modules/30_croparea/detail_apr24/preloop.gms @@ -33,9 +33,18 @@ if(s30_implementation = 1, * Country switch to determine countries for which certain policies shall be applied. * In the default case, the policy affects all countries when activated. -p30_country_dummy(iso) = 0; -p30_country_dummy(policy_countries30) = 1; +p30_country_switch(iso) = 0; +p30_country_switch(policy_countries30) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by available cropland area. -p30_country_weight(i) = sum(i_to_iso(i,iso), p30_country_dummy(iso) * pm_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), pm_avl_cropland_iso(iso)); +p30_country_weight(i) = sum(i_to_iso(i,iso), p30_country_switch(iso) * pm_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), pm_avl_cropland_iso(iso)); + +* Initialize biodiversity value +vm_bv.l(j,"crop_ann",potnatveg) = + sum((crop_ann30,w), fm_croparea("y1995",j,w,crop_ann30)) * fm_bii_coeff("crop_ann",potnatveg) + * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j,"crop_per",potnatveg) = + sum((crop_per30,w), fm_croparea("y1995",j,w,crop_per30)) * fm_bii_coeff("crop_per",potnatveg) + * fm_luh2_side_layers(j,potnatveg); diff --git a/modules/30_croparea/simple_apr24/declarations.gms b/modules/30_croparea/simple_apr24/declarations.gms index cc118fa84a..d1584ebe44 100644 --- a/modules/30_croparea/simple_apr24/declarations.gms +++ b/modules/30_croparea/simple_apr24/declarations.gms @@ -9,14 +9,14 @@ parameters i30_rotation_scenario_fader(t_all) Crop rotation scenario fader (1) i30_betr_scenario_fader(t_all) Bioenergy land scenario fader (1) i30_betr_target(t,j) Target share for bioenergy land on total cropland (1) - i30_betr_penalty(t) Penalty for violation of betr target (USD05MER per ha) + i30_betr_penalty(t) Penalty for violation of betr target (USD17MER per ha) p30_country_weight(i) Policy country weight per region (1) - p30_country_dummy(iso) Dummy parameter indicating whether country is affected by selected policy (1) + p30_country_switch(iso) Switch indicating whether country is affected by selected policy (1) ; positive variables vm_area(j,kcr,w) Agricultural production area (mio. ha) - vm_rotation_penalty(i) Penalty for violating rotational constraints (mio. USD05MER) + vm_rotation_penalty(i) Penalty for violating rotational constraints (mio. USD17MER) vm_carbon_stock_croparea(j,ag_pools) Carbon stock in croparea (tC) v30_betr_missing(j) Missing bioenergy tree land towards target (mio. ha) v30_crop_area(i) Total regional crop production area (mio. ha) @@ -25,7 +25,7 @@ positive variables equations q30_prod(j,kcr) Production of cropped products (mio. tDM) q30_betr_missing(j) Missing bioenergy tree land towards target (mio. ha) - q30_cost(i) Cost (mio. USD05MER) + q30_cost(i) Cost (mio. USD17MER) q30_rotation_max(j,crp30,w) Local maximum rotational constraints (mio. ha) q30_rotation_min(j,crp30,w) Local minimum rotational constraints (mio. ha) q30_carbon(j,ag_pools) Croplarea above ground carbon content calculation (mio. tC) @@ -37,13 +37,13 @@ equations *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov_area(t,j,kcr,w,type) Agricultural production area (mio. ha) - ov_rotation_penalty(t,i,type) Penalty for violating rotational constraints (mio. USD05MER) + ov_rotation_penalty(t,i,type) Penalty for violating rotational constraints (mio. USD17MER) ov_carbon_stock_croparea(t,j,ag_pools,type) Carbon stock in croparea (tC) ov30_betr_missing(t,j,type) Missing bioenergy tree land towards target (mio. ha) ov30_crop_area(t,i,type) Total regional crop production area (mio. ha) oq30_prod(t,j,kcr,type) Production of cropped products (mio. tDM) oq30_betr_missing(t,j,type) Missing bioenergy tree land towards target (mio. ha) - oq30_cost(t,i,type) Cost (mio. USD05MER) + oq30_cost(t,i,type) Cost (mio. USD17MER) oq30_rotation_max(t,j,crp30,w,type) Local maximum rotational constraints (mio. ha) oq30_rotation_min(t,j,crp30,w,type) Local minimum rotational constraints (mio. ha) oq30_carbon(t,j,ag_pools,type) Croplarea above ground carbon content calculation (mio. tC) diff --git a/modules/30_croparea/simple_apr24/input.gms b/modules/30_croparea/simple_apr24/input.gms index e99a128cb0..5c22a85779 100644 --- a/modules/30_croparea/simple_apr24/input.gms +++ b/modules/30_croparea/simple_apr24/input.gms @@ -23,7 +23,7 @@ scalars s30_betr_start_noselect Share of bioenergy land on total cropland in start year (1) / 0 / s30_betr_target Share of bioenergy land on total cropland in target year (1) / 0 / s30_betr_target_noselect Share of bioenergy land on total cropland in target year (1) / 0 / - s30_betr_penalty Penalty for violation of betr target (USD05MER per ha) / 2000 / + s30_betr_penalty Penalty for violation of betr target (USD17MER per ha) / 2460 / s30_annual_max_growth Max annual cropland growth as share of previous cropland (1) / Inf / ; diff --git a/modules/30_croparea/simple_apr24/preloop.gms b/modules/30_croparea/simple_apr24/preloop.gms index adffa58780..97c5e5f7c9 100644 --- a/modules/30_croparea/simple_apr24/preloop.gms +++ b/modules/30_croparea/simple_apr24/preloop.gms @@ -17,9 +17,18 @@ fm_croparea(t_past,j,w,kcr)$(fm_croparea(t_past,j,w,kcr)<0) = 0; * Country switch to determine countries for which certain policies shall be applied. * In the default case, the policy affects all countries when activated. -p30_country_dummy(iso) = 0; -p30_country_dummy(policy_countries30) = 1; +p30_country_switch(iso) = 0; +p30_country_switch(policy_countries30) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by available cropland area. -p30_country_weight(i) = sum(i_to_iso(i,iso), p30_country_dummy(iso) * pm_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), pm_avl_cropland_iso(iso)); +p30_country_weight(i) = sum(i_to_iso(i,iso), p30_country_switch(iso) * pm_avl_cropland_iso(iso)) / sum(i_to_iso(i,iso), pm_avl_cropland_iso(iso)); + +* Initialize biodiversity value +vm_bv.l(j,"crop_ann",potnatveg) = + sum((crop_ann30,w), fm_croparea("y1995",j,w,crop_ann30)) * fm_bii_coeff("crop_ann",potnatveg) + * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j,"crop_per",potnatveg) = + sum((crop_per30,w), fm_croparea("y1995",j,w,crop_per30)) * fm_bii_coeff("crop_per",potnatveg) + * fm_luh2_side_layers(j,potnatveg); diff --git a/modules/31_past/endo_jun13/declarations.gms b/modules/31_past/endo_jun13/declarations.gms index 69c530d44e..2630ffc3e0 100644 --- a/modules/31_past/endo_jun13/declarations.gms +++ b/modules/31_past/endo_jun13/declarations.gms @@ -9,20 +9,20 @@ equations q31_prod(j) Cellular pasture production constraint (mio. tDM per yr) q31_carbon(j,ag_pools,stockType) Above ground carbon content calculation for pasture (mio tC) - q31_cost_prod_past(i) Costs for putting animals on pastures (mio. USD05MER per yr) + q31_cost_prod_past(i) Costs for putting animals on pastures (mio. USD17MER per yr) q31_bv_manpast(j,potnatveg) Biodiversity value for managed pastures (Mha) q31_bv_rangeland(j,potnatveg) Biodiversity value for rangeland (Mha) ; positive variables - vm_cost_prod_past(i) Costs for putting animals on pastures (mio. USD05MER per yr) + vm_cost_prod_past(i) Costs for putting animals on pastures (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_prod_past(t,i,type) Costs for putting animals on pastures (mio. USD05MER per yr) + ov_cost_prod_past(t,i,type) Costs for putting animals on pastures (mio. USD17MER per yr) oq31_prod(t,j,type) Cellular pasture production constraint (mio. tDM per yr) oq31_carbon(t,j,ag_pools,stockType,type) Above ground carbon content calculation for pasture (mio tC) - oq31_cost_prod_past(t,i,type) Costs for putting animals on pastures (mio. USD05MER per yr) + oq31_cost_prod_past(t,i,type) Costs for putting animals on pastures (mio. USD17MER per yr) oq31_bv_manpast(t,j,potnatveg,type) Biodiversity value for managed pastures (Mha) oq31_bv_rangeland(t,j,potnatveg,type) Biodiversity value for rangeland (Mha) ; diff --git a/modules/31_past/endo_jun13/input.gms b/modules/31_past/endo_jun13/input.gms index b2055729cd..766e8e479f 100644 --- a/modules/31_past/endo_jun13/input.gms +++ b/modules/31_past/endo_jun13/input.gms @@ -7,5 +7,5 @@ scalars - s31_fac_req_past Factor requirements (USD05MER per tDM) / 1 / + s31_fac_req_past Factor requirements (USD17MER per tDM) / 1 / ; diff --git a/modules/31_past/endo_jun13/not_used.txt b/modules/31_past/endo_jun13/not_used.txt deleted file mode 100644 index 2b47ed0ec1..0000000000 --- a/modules/31_past/endo_jun13/not_used.txt +++ /dev/null @@ -1,5 +0,0 @@ -name,type,reason -pcm_land, input, not needed -vm_tau,input,questionnaire -fm_pastr_tau_hist,input,questionnaire -sm_fix_cc, input, not needed diff --git a/modules/71_disagg_lvst/foragebased_aug18/scaling.gms b/modules/31_past/endo_jun13/preloop.gms similarity index 52% rename from modules/71_disagg_lvst/foragebased_aug18/scaling.gms rename to modules/31_past/endo_jun13/preloop.gms index a9ec69a79e..0a411a741f 100644 --- a/modules/71_disagg_lvst/foragebased_aug18/scaling.gms +++ b/modules/31_past/endo_jun13/preloop.gms @@ -5,6 +5,10 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -vm_costs_additional_mon.scale(i) = 10e4; -*Don't scale this variable. Model is very sensitive to scaling this variable and might become infeasible or very slow. -*v71_feed_balanceflow.scale(j,kli_rum,kforage) = 10e3; +* Initialize biodiversity value +vm_bv.l(j,"manpast",potnatveg) = + pcm_land(j,"past") * fm_luh2_side_layers(j,"manpast") * fm_bii_coeff("manpast",potnatveg) * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j,"rangeland",potnatveg) = + pcm_land(j,"past") * fm_luh2_side_layers(j,"rangeland") * fm_bii_coeff("rangeland",potnatveg) * fm_luh2_side_layers(j,potnatveg); + diff --git a/modules/31_past/endo_jun13/realization.gms b/modules/31_past/endo_jun13/realization.gms index f85b630f32..d06a7405f6 100644 --- a/modules/31_past/endo_jun13/realization.gms +++ b/modules/31_past/endo_jun13/realization.gms @@ -21,6 +21,7 @@ $Ifi "%phase%" == "declarations" $include "./modules/31_past/endo_jun13/declarations.gms" $Ifi "%phase%" == "input" $include "./modules/31_past/endo_jun13/input.gms" $Ifi "%phase%" == "equations" $include "./modules/31_past/endo_jun13/equations.gms" +$Ifi "%phase%" == "preloop" $include "./modules/31_past/endo_jun13/preloop.gms" $Ifi "%phase%" == "presolve" $include "./modules/31_past/endo_jun13/presolve.gms" $Ifi "%phase%" == "postsolve" $include "./modules/31_past/endo_jun13/postsolve.gms" *######################## R SECTION END (PHASES) ############################### diff --git a/modules/31_past/grasslands_apr22/declarations.gms b/modules/31_past/grasslands_apr22/declarations.gms deleted file mode 100644 index fa3568dee3..0000000000 --- a/modules/31_past/grasslands_apr22/declarations.gms +++ /dev/null @@ -1,52 +0,0 @@ -*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - - -equations -q31_carbon(j,ag_pools,stockType) Above ground carbon content calculation for pasture (mio tC) -q31_cost_prod_past(i) Costs for putting animals on grasslands and shifting between grassland types (mio. USD05MER per yr) -q31_bv_manpast(j,potnatveg) Biodiversity value for managed pastures (Mha) -q31_bv_rangeland(j,potnatveg) Biodiversity value for rangeland (Mha) -q31_pasture_areas(j) Total grassland calculation (mio. ha) -q31_prod_pm(j) Cellular grass production constraint (mio. tDM per yr) -q31_expansion_cost(j, grassland) Grassland expansion cost constraint (mio. USD05MER) -; - -positive variables -v31_grass_area(j,grassland) Grassland areas (mio. ha) -v31_cost_grass_expansion(j, grassland) Costs of grassland expansion (mio. USD05MER) -vm_cost_prod_past(i) Costs for putting animals on grasslands and shifting between grassland types (mio. USD05MER per yr) -; - -parameters -i31_manpast_suit(t_all,j) Areas suitable for managed pastures (mio. ha) -pc31_grass(j,grassland) Grassland areas in previous time step (mio. ha) -i31_grass_calib(t_all,j,grassland) Regional grassland calibration factor correcting for FAO yield levels (1) -i31_grass_modeled_yld(t_all,i,grassland) Biophysical input yields average over region and grassland cover type at the historical reference year (tDM per ha) -i31_grass_yields(t_all,j,grassland) Cellular biophysical input yields (tDM per ha) -i31_grassl_areas(t_all,j) Celullar grassland areas (mio. ha) -i31_lambda_grass(t,i,grassland) Grassland Scaling factor for non-linear management calibration (1) -i31_grassl_yld_hist_reg(t,i,grassland) Grassland FAO yields per region at the historical referende year (tDM per ha) -i31_grass_hist_yld(t_all,i, grassland) FAO gassland yields (tDM per ha) -; - -*#################### R SECTION START (OUTPUT DECLARATIONS) #################### -parameters - ov31_grass_area(t,j,grassland,type) Grassland areas (mio. ha) - ov31_cost_grass_expansion(t,j,grassland,type) Costs of grassland expansion (mio. USD05MER) - ov_cost_prod_past(t,i,type) Costs for putting animals on grasslands and shifting between grassland types (mio. USD05MER per yr) - oq31_carbon(t,j,ag_pools,stockType,type) Above ground carbon content calculation for pasture (mio tC) - oq31_cost_prod_past(t,i,type) Costs for putting animals on grasslands and shifting between grassland types (mio. USD05MER per yr) - oq31_bv_manpast(t,j,potnatveg,type) Biodiversity value for managed pastures (Mha) - oq31_bv_rangeland(t,j,potnatveg,type) Biodiversity value for rangeland (Mha) - oq31_pasture_areas(t,j,type) Total grassland calculation (mio. ha) - oq31_prod_pm(t,j,type) Cellular grass production constraint (mio. tDM per yr) - oq31_expansion_cost(t,j,grassland,type) Grassland expansion cost constraint (mio. USD05MER) -; -*##################### R SECTION END (OUTPUT DECLARATIONS) ##################### - -*** EOF declarations.gms *** diff --git a/modules/31_past/grasslands_apr22/equations.gms b/modules/31_past/grasslands_apr22/equations.gms deleted file mode 100644 index b80ad66e98..0000000000 --- a/modules/31_past/grasslands_apr22/equations.gms +++ /dev/null @@ -1,56 +0,0 @@ -*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - -*' @equations - -*' Grassland production is estimated by multiplying grassland areas and yields. -*' Technological change is applied to managed pastures yields through 'vm_tau', -*' whereas rangeland yields are kept unaltered after the preloop calibration of -*' 'i31_grass_yields'. - -q31_prod_pm(j2) .. - vm_prod(j2,"pasture") =l= v31_grass_area(j2,"range") * sum(ct,i31_grass_yields(ct,j2,"range")) - + v31_grass_area(j2,"pastr") * sum(ct,i31_grass_yields(ct,j2,"pastr")) * - sum((cell(i2,j2), supreg(h2,i2)), vm_tau(h2, "pastr") / fm_pastr_tau_hist("y1995",h2)); - -*' The sum of managed pastures and rangelands areas equal the parent -*' land class pastures areas in 'vm_land'. - -q31_pasture_areas(j2).. - vm_land(j2,"past") =e= sum(grassland, v31_grass_area(j2,grassland)); - -*' To avoid unrealistic conversions between rangelands and managed pastures areas, -*' a cost is associated with the expansion of rangelands and managed pastures 'v31_cost_grass_expansion' -*' in comparison with areas in the previous time step 'pc31_grass'. - -q31_expansion_cost(j2,grassland) .. - v31_cost_grass_expansion(j2, grassland) =g= - (v31_grass_area(j2, grassland) - pc31_grass(j2,grassland)) * s31_cost_expansion; - -*' Cost of production account for the cost of moving animals to grassland areas plus the costs of -*' expanding aras of production. - -q31_cost_prod_past(i2) .. - vm_cost_prod_past(i2) =e= sum(cell(i2,j2), vm_prod(j2,"pasture")) * s31_cost_grass_prod + - sum((cell(i2,j2), grassland), v31_cost_grass_expansion(j2,grassland)); - -*' On the basis of the required pasture area, cellular above ground carbon stocks are calculated: - -q31_carbon(j2,ag_pools,stockType) .. - vm_carbon_stock(j2,"past",ag_pools,stockType) =e= - m_carbon_stock(vm_land,fm_carbon_density,"past"); - -*' By estimating the different area of managed pasture and rangeland via the luh2 side layers, the biodiversity value for pastures and rangeland is calculated in following: - q31_bv_manpast(j2,potnatveg) .. vm_bv(j2,"manpast",potnatveg) - =e= - vm_land(j2,"past") * fm_luh2_side_layers(j2,"manpast") * fm_bii_coeff("manpast",potnatveg) * fm_luh2_side_layers(j2,potnatveg); - - q31_bv_rangeland(j2,potnatveg) .. vm_bv(j2,"rangeland",potnatveg) - =e= - vm_land(j2,"past") * fm_luh2_side_layers(j2,"rangeland") * fm_bii_coeff("rangeland",potnatveg) * fm_luh2_side_layers(j2,potnatveg); - -*** EOF constraints.gms *** diff --git a/modules/31_past/grasslands_apr22/input.gms b/modules/31_past/grasslands_apr22/input.gms deleted file mode 100644 index e0b33a5632..0000000000 --- a/modules/31_past/grasslands_apr22/input.gms +++ /dev/null @@ -1,55 +0,0 @@ -*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - - -scalars - s31_cost_expansion Grasslands expansion costs (USD05MER per hectare) / 1 / - s31_cost_grass_prod Grasslands factor costs (USD05MER per tDM) / 1 / -; - -$setglobal c31_grassl_yld_scenario cc -* options: cc (climate change) -* nocc (no climate change) -* nocc_hist (no climate change after year defined by sm_fix_cc) - -parameter f31_pastr_suitability(t_all,j) Areas suitable for pasture management (mio. ha) -/ -$ondelim -$include "./modules/31_past/input/f31_pastr_suitability.cs2" -$offdelim -/; - -i31_manpast_suit(t_all,j) = f31_pastr_suitability(t_all,j) -* set values to 1995 if nocc scenario is used, or to sm_fix_cc after sm_fix_cc if nocc_hist is used -$if "%c31_grassl_yld_scenario%" == "nocc" i31_manpast_suit(t_all,j) = f31_pastr_suitability("y1995",j); -$if "%c31_grassl_yld_scenario%" == "nocc_hist" i31_manpast_suit(t_all,j)$(m_year(t_all) > sm_fix_cc) = i31_manpast_suit(t_all,j)$(m_year(t_all) = sm_fix_cc); - - -scalar s31_limit_calib Relative managament calibration switch (1=limited 0=pure relative) / 1 /; - - -table f31_grassl_yld(t_all,j,grassland,w) LPJmL potential yields per cell (rainfed only) (tDM per ha) -$ondelim -$include "./modules/31_past/input/f31_grassl_yld.cs3" -$offdelim -; -* set values to 1995 if nocc scenario is used, or to sm_fix_cc after sm_fix_cc if nocc_hist is used -$if "%c31_grassl_yld_scenario%" == "nocc" f31_grassl_yld(t_all,j,grassland,w) = f31_grassl_yld("y1995",j,grassland,w); -$if "%c31_grassl_yld_scenario%" == "nocc_hist" f31_grassl_yld(t_all,j,grassland,w)$(m_year(t_all) > sm_fix_cc) = f31_grassl_yld(t_all,j,grassland,w)$(m_year(t_all) = sm_fix_cc); - - -table f31_grass_bio(t_all,i, grassland) Estimated regional grass biomass consumption in the past (tDM) -$ondelim -$include "./modules/31_past/input/f31_grass_bio_hist.cs3" -$offdelim; - - - -table f31_LUH2v2(t_all,j, f31_luh) LUH2v2 land classes separating rangelands from managed pastures -$ondelim -$include "./modules/31_past/input/f31_LUH2v2.cs3" -$offdelim; diff --git a/modules/31_past/grasslands_apr22/not_used.txt b/modules/31_past/grasslands_apr22/not_used.txt deleted file mode 100644 index d1f943c5f1..0000000000 --- a/modules/31_past/grasslands_apr22/not_used.txt +++ /dev/null @@ -1,3 +0,0 @@ -name,type,reason -pcm_land, input, not needed -vm_yld,variable, not needed diff --git a/modules/31_past/grasslands_apr22/postsolve.gms b/modules/31_past/grasslands_apr22/postsolve.gms deleted file mode 100644 index a0bae99662..0000000000 --- a/modules/31_past/grasslands_apr22/postsolve.gms +++ /dev/null @@ -1,54 +0,0 @@ -*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - -*** Land Patterns are transferred to next timestep - pc31_grass(j,grassland) = v31_grass_area.l(j,grassland); - -*#################### R SECTION START (OUTPUT DEFINITIONS) ##################### - ov31_grass_area(t,j,grassland,"marginal") = v31_grass_area.m(j,grassland); - ov31_cost_grass_expansion(t,j,grassland,"marginal") = v31_cost_grass_expansion.m(j,grassland); - ov_cost_prod_past(t,i,"marginal") = vm_cost_prod_past.m(i); - oq31_carbon(t,j,ag_pools,stockType,"marginal") = q31_carbon.m(j,ag_pools,stockType); - oq31_cost_prod_past(t,i,"marginal") = q31_cost_prod_past.m(i); - oq31_bv_manpast(t,j,potnatveg,"marginal") = q31_bv_manpast.m(j,potnatveg); - oq31_bv_rangeland(t,j,potnatveg,"marginal") = q31_bv_rangeland.m(j,potnatveg); - oq31_pasture_areas(t,j,"marginal") = q31_pasture_areas.m(j); - oq31_prod_pm(t,j,"marginal") = q31_prod_pm.m(j); - oq31_expansion_cost(t,j,grassland,"marginal") = q31_expansion_cost.m(j,grassland); - ov31_grass_area(t,j,grassland,"level") = v31_grass_area.l(j,grassland); - ov31_cost_grass_expansion(t,j,grassland,"level") = v31_cost_grass_expansion.l(j,grassland); - ov_cost_prod_past(t,i,"level") = vm_cost_prod_past.l(i); - oq31_carbon(t,j,ag_pools,stockType,"level") = q31_carbon.l(j,ag_pools,stockType); - oq31_cost_prod_past(t,i,"level") = q31_cost_prod_past.l(i); - oq31_bv_manpast(t,j,potnatveg,"level") = q31_bv_manpast.l(j,potnatveg); - oq31_bv_rangeland(t,j,potnatveg,"level") = q31_bv_rangeland.l(j,potnatveg); - oq31_pasture_areas(t,j,"level") = q31_pasture_areas.l(j); - oq31_prod_pm(t,j,"level") = q31_prod_pm.l(j); - oq31_expansion_cost(t,j,grassland,"level") = q31_expansion_cost.l(j,grassland); - ov31_grass_area(t,j,grassland,"upper") = v31_grass_area.up(j,grassland); - ov31_cost_grass_expansion(t,j,grassland,"upper") = v31_cost_grass_expansion.up(j,grassland); - ov_cost_prod_past(t,i,"upper") = vm_cost_prod_past.up(i); - oq31_carbon(t,j,ag_pools,stockType,"upper") = q31_carbon.up(j,ag_pools,stockType); - oq31_cost_prod_past(t,i,"upper") = q31_cost_prod_past.up(i); - oq31_bv_manpast(t,j,potnatveg,"upper") = q31_bv_manpast.up(j,potnatveg); - oq31_bv_rangeland(t,j,potnatveg,"upper") = q31_bv_rangeland.up(j,potnatveg); - oq31_pasture_areas(t,j,"upper") = q31_pasture_areas.up(j); - oq31_prod_pm(t,j,"upper") = q31_prod_pm.up(j); - oq31_expansion_cost(t,j,grassland,"upper") = q31_expansion_cost.up(j,grassland); - ov31_grass_area(t,j,grassland,"lower") = v31_grass_area.lo(j,grassland); - ov31_cost_grass_expansion(t,j,grassland,"lower") = v31_cost_grass_expansion.lo(j,grassland); - ov_cost_prod_past(t,i,"lower") = vm_cost_prod_past.lo(i); - oq31_carbon(t,j,ag_pools,stockType,"lower") = q31_carbon.lo(j,ag_pools,stockType); - oq31_cost_prod_past(t,i,"lower") = q31_cost_prod_past.lo(i); - oq31_bv_manpast(t,j,potnatveg,"lower") = q31_bv_manpast.lo(j,potnatveg); - oq31_bv_rangeland(t,j,potnatveg,"lower") = q31_bv_rangeland.lo(j,potnatveg); - oq31_pasture_areas(t,j,"lower") = q31_pasture_areas.lo(j); - oq31_prod_pm(t,j,"lower") = q31_prod_pm.lo(j); - oq31_expansion_cost(t,j,grassland,"lower") = q31_expansion_cost.lo(j,grassland); -*##################### R SECTION END (OUTPUT DEFINITIONS) ###################### - -*** EOF postsolve.gms *** diff --git a/modules/31_past/grasslands_apr22/preloop.gms b/modules/31_past/grasslands_apr22/preloop.gms deleted file mode 100644 index 4b32591636..0000000000 --- a/modules/31_past/grasslands_apr22/preloop.gms +++ /dev/null @@ -1,95 +0,0 @@ -*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - - -pc31_grass(j,grassland) = f31_LUH2v2("y1995",j,grassland); - - -***YIELD CORRECTION ACCOUNTING FOR REGIONAL DIFFERENCES IN MANAGEMENT*** - -*' @code - -*' Grassland yields for rangelands and managed pastures are calibrated to match estimated -*' historical pasture productivity. - -*' The following equations calibrate the grassland cellular yield patterns ('f31_grassl_yld') to match -*' 'estimated historical yields' ('i31_grass_hist_yld') by calculating a calibration term called -*' 'i31_grass_calib'. For most cases, 'i31_grass_calib' is the ratio of the 'i31_grass_hist_yld' -*' and modeled yields ('i31_grass_modeled_yld') given historic grassland area patterns -*' ('i31_grassl_areas') and cellular yields coming from crop models like LPJmL 'f31_grassl_yld'. -*' In these cases, 'i31_grass_calib' represents a purely relative calibration factor that depends -*' only on the initial conditions of the starting year. -*' -*' However, when estimated yields 'i31_grass_hist_yld' are significantly higher than -*' given by the cellular yield inputs 'f31_grassl_yld' we refer to this as an underestimated -*' baseline. In this situation the relative calibration terms can lead to unrealistically -*' large yields in the case of future yield increases within the cellular yield patterns. -*' -*' To address this issue, we introduce the factor 'i31_lambda_grass' that determines the degree -*' to which the baseline 'i31_grass_hist_yld' is under- or overestimated by the modeled yields -*' 'i31_grass_modeled_yld'. This factor is used to control whether the calibration factor is -*' applied as an absolute or relative change. For 'i31_grass_hist_yld' smaller than -*' 'i31_grass_modeled_yld' (overestimated baseline) 'i31_lambda_grass' is 1, which is -*' equivalent to an entirely relative calibration. For underestimated yields, 'i31_lambda_grass' -*' is calculated as the squared root of the ratio between modeled yields 'i31_grass_modeled_yld' -*' and the historical estimates 'i31_grass_hist_yld'. For underestimated yields, as 'i31_lambda_grass' -*' approaches 0, it reduces the applied relative change resulting in a mean change increasingly -*' similar to an additive term (@Heinke.2013). - -*' This concept is referred to as limited calibration, as it limits the calibration -*' to an additive term in case of a strongly underestimated baseline. The scalar -* 's31_limit_calib' can be used to switch limited calibration on (1) and off (0). - -i31_grass_yields(t,j,grassland) = f31_grassl_yld(t,j,grassland,"rainfed"); -i31_grassl_areas(t_all,j) = sum(grassland, f31_LUH2v2(t_all,j,grassland)); -i31_grass_hist_yld(t_past,i,grassland) = (f31_grass_bio(t_past,i, grassland) / - sum(cell(i,j),f31_LUH2v2(t_past,j,grassland)))$(sum(cell(i,j), f31_LUH2v2(t_past,j,grassland))>0); - -i31_grass_modeled_yld(t_past,i,grassland) - = (sum(cell(i,j),i31_grass_yields(t_past,j,grassland) * f31_LUH2v2(t_past,j,grassland)) / - sum(cell(i,j),f31_LUH2v2(t_past,j,grassland)))$(sum(cell(i,j), f31_LUH2v2(t_past,j,grassland))>0) - + (sum(cell(i,j),i31_grassl_areas(t_past,j) * i31_grass_yields(t_past,j,grassland)) / - sum(cell(i,j),i31_grassl_areas(t_past,j)))$(sum(cell(i,j), f31_LUH2v2(t_past,j,grassland))=0); - -loop(t, - if(sum(sameas(t,"y1995"),1)=1, - - if ((s31_limit_calib = 0), - i31_lambda_grass(t,i,grassland) = 1; - - Elseif (s31_limit_calib =1 ), - i31_lambda_grass(t,i,grassland) = - 1$(i31_grass_hist_yld(t,i,grassland) <= i31_grass_modeled_yld(t,i,grassland)) - + sqrt(i31_grass_modeled_yld(t,i,grassland)/i31_grass_hist_yld(t,i,grassland))$ - (i31_grass_hist_yld(t,i,grassland) > i31_grass_modeled_yld(t,i,grassland)); - ); - - i31_grassl_yld_hist_reg(t,i,grassland) = i31_grass_hist_yld(t,i,grassland); - - Else - i31_grass_modeled_yld(t,i,grassland) = i31_grass_modeled_yld(t-1,i,grassland); - i31_grassl_yld_hist_reg(t,i,grassland) = i31_grassl_yld_hist_reg(t-1,i,grassland); - i31_lambda_grass(t,i,grassland) = i31_lambda_grass(t-1,i,grassland); - ); -); - - -*' The calibrated cellular yield 'i31_grass_yields' is calculated for each time step depending -*' on the constant values 'i31_grass_modeled_yld', 'i31_grassl_yld_hist_reg', 'i31_lambda_grass' -*' and the uncalibrated, cellular yield 'f31_grassl_yld' following the idea of eq. (9) in @Heinke.2013: - -i31_grass_calib(t,j,grassland) = - 1 + (sum(cell(i,j), i31_grassl_yld_hist_reg(t,i,grassland) - i31_grass_modeled_yld(t,i,grassland)) / - f31_grassl_yld(t,j,grassland,"rainfed") * - (f31_grassl_yld(t,j,grassland,"rainfed") / (sum(cell(i,j),i31_grass_modeled_yld(t,i,grassland))+10**(-8))) ** - sum(cell(i,j),i31_lambda_grass(t,i,grassland)))$(f31_grassl_yld(t,j,grassland,"rainfed")>0); - -i31_grass_yields(t,j,"range") = i31_grass_yields(t,j,"range") * i31_grass_calib(t,j,"range"); -i31_grass_yields(t,j,"pastr") = i31_grass_yields(t,j,"pastr") * i31_grass_calib(t,j,"pastr"); - -*' Note that the calculation is split into two parts for better readability. -*' @stop diff --git a/modules/31_past/grasslands_apr22/presolve.gms b/modules/31_past/grasslands_apr22/presolve.gms deleted file mode 100644 index 3f5ef77c20..0000000000 --- a/modules/31_past/grasslands_apr22/presolve.gms +++ /dev/null @@ -1,20 +0,0 @@ -*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - -*' @code - -*' Socioeconomic and environmental conditions determine the potential managed pastures -*' areas ('i31_manpast_suit'). 'i31_manpast_suit' is estimated by determining areas -*' with more than five inhabitants per km2 and with aridity greater than 0.5 following -*' the methodology established by @KleinGoldewijk.2017 - -v31_grass_area.up(j,"pastr") = i31_manpast_suit(t,j); - -*' Total grassland area cannot be smaller than legally protected grassland area -vm_land.lo(j,"past") = sum(consv_type, pm_land_conservation(t,j,"past",consv_type)); - -*' @stop diff --git a/modules/31_past/grasslands_apr22/realization.gms b/modules/31_past/grasslands_apr22/realization.gms deleted file mode 100644 index c9bdd9650d..0000000000 --- a/modules/31_past/grasslands_apr22/realization.gms +++ /dev/null @@ -1,40 +0,0 @@ -*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - -*' @description In the grasslands_apr22 realization, grassland areas and related -*' carbon stocks are modelled endogenously. The initial spatially explicit patterns -*' of grasslands ("past") are defined in the module [10_land] by the land use input -*' data set. These areas are further divided into rangelands and managed pastures -*' under different management assumptions. For future time steps, grasslands spatial -*' distribution depend on the demand of grass biomass to feed livestock as calculated -*' in the module [70_livestock] and from the intensity of grassland utilization -*' ("grassland yields"). Grassland yields are defined separately for rangelands -*' and managed pasture based on historical estimates or areas and biomass production -*' for these two systems. Managed pastures yields can be increased endogenously -*' by investments in technology as calculated in [13_tc]. Rising yields alter the -*' nitrogen budged on grasslands triggering costs for N inorganic fertilization as -*' calculated in [50_nr_soil_budget] and control the balance between intensive and -*' extensive grass biomass production. - -*' @limitations At the moment this realization only runs with a single climate scenario -*' (SPP1-RCP2p6 from MRI_ESM-0), which is used in all (except constant climate) settings. -*' We currently do not accout for specific differences within intensive -*' pasture management systems and related degradation of grasslands for both -*' rangelands or managed pastures. Grass production costs and conversion costs between -*' grassland types are set 1 USD05MER per unit due to lack of data. - - - -*####################### R SECTION START (PHASES) ############################## -$Ifi "%phase%" == "sets" $include "./modules/31_past/grasslands_apr22/sets.gms" -$Ifi "%phase%" == "declarations" $include "./modules/31_past/grasslands_apr22/declarations.gms" -$Ifi "%phase%" == "input" $include "./modules/31_past/grasslands_apr22/input.gms" -$Ifi "%phase%" == "equations" $include "./modules/31_past/grasslands_apr22/equations.gms" -$Ifi "%phase%" == "preloop" $include "./modules/31_past/grasslands_apr22/preloop.gms" -$Ifi "%phase%" == "presolve" $include "./modules/31_past/grasslands_apr22/presolve.gms" -$Ifi "%phase%" == "postsolve" $include "./modules/31_past/grasslands_apr22/postsolve.gms" -*######################## R SECTION END (PHASES) ############################### diff --git a/modules/31_past/grasslands_apr22/sets.gms b/modules/31_past/grasslands_apr22/sets.gms deleted file mode 100644 index a85206326b..0000000000 --- a/modules/31_past/grasslands_apr22/sets.gms +++ /dev/null @@ -1,22 +0,0 @@ -*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - -sets - - f31_luh LHUv2 land cover types - / primf, primn, secdf, secdn, urban, c3ann, c4ann, c3per, c4per, c3nfx, pastr, range / - - grassland(f31_luh) Grassland cover types (pastr = managed pastures and range = rangelands) - / pastr, range / - - grass_to31(grassland) pasture management options - / pastr,range / - - grass_from31(grassland) pasture management options - / pastr,range / - -; diff --git a/modules/31_past/input/files b/modules/31_past/input/files deleted file mode 100644 index b628d2f69c..0000000000 --- a/modules/31_past/input/files +++ /dev/null @@ -1,5 +0,0 @@ -* list of files that are required here -f31_pastr_suitability.cs2 -f31_LUH2v2.cs3 -f31_grassl_yld.cs3 -f31_grass_bio_hist.cs3 diff --git a/modules/31_past/module.gms b/modules/31_past/module.gms index f2058d5d0f..2628d1af7d 100644 --- a/modules/31_past/module.gms +++ b/modules/31_past/module.gms @@ -18,6 +18,5 @@ *###################### R SECTION START (MODULETYPES) ########################## $Ifi "%past%" == "endo_jun13" $include "./modules/31_past/endo_jun13/realization.gms" -$Ifi "%past%" == "grasslands_apr22" $include "./modules/31_past/grasslands_apr22/realization.gms" $Ifi "%past%" == "static" $include "./modules/31_past/static/realization.gms" *###################### R SECTION END (MODULETYPES) ############################ diff --git a/modules/31_past/static/not_used.txt b/modules/31_past/static/not_used.txt index 6bd07855f0..3b1a814ba5 100644 --- a/modules/31_past/static/not_used.txt +++ b/modules/31_past/static/not_used.txt @@ -2,6 +2,3 @@ name,type,reason vm_prod, input, not needed vm_yld, input, not needed pm_land_conservation,input,questionnaire -vm_tau,input,questionnaire -fm_pastr_tau_hist,input,questionnaire -sm_fix_cc, input, not needed diff --git a/modules/32_forestry/dynamic_may24/declarations.gms b/modules/32_forestry/dynamic_may24/declarations.gms index fe6faa21f5..1034b8cfd2 100644 --- a/modules/32_forestry/dynamic_may24/declarations.gms +++ b/modules/32_forestry/dynamic_may24/declarations.gms @@ -54,16 +54,17 @@ parameters p32_forestry_product_dist(t,i,kforestry) Distribution of wood products (1) p32_future_to_current_demand_ratio(t,i) Ratio of future and current timber demand (1) p32_demand_forestry_future(t,i,kforestry) Future forestry demand in current time step (tDM per yr) - p32_est_cost(type32) Establishment cost (USD per ha) + p32_est_cost(type32) Establishment cost (USD17MER per ha) + i32_recurring_cost(type32) Recurring costs (USD17MER per ha) ; positive variables vm_cost_fore(i) Forestry costs (Mio USD) - v32_cost_hvarea(i) Cost of harvesting timber from forests (mio. USD per yr) + v32_cost_hvarea(i) Cost of harvesting timber from forests (mio. USD17MER per yr) v32_land(j,type32,ac) Forestry land pools (mio. ha) v32_land_missing(j) Technical area balance term for timber plantation establishment (mio. ha) vm_landdiff_forestry Aggregated difference in forestry land compared to previous timestep (mio. ha) - v32_cost_recur(i) Recurring forest management costs (USD per ha) + v32_cost_recur(i) Recurring forest management costs (USD17MER per ha) v32_land_expansion(j,type32) Forestry land expansion (mio. ha) v32_land_reduction(j,type32,ac) Forestry land reduction (mio. ha) v32_cost_establishment(i) Cost of establishment calculated at the current time step (mio. USD) @@ -102,7 +103,7 @@ equations q32_cost_establishment(i) Present value of cost of establishment (mio. USD) q32_bgp_aff(j,ac) Biophysical afforestation calculation (mio. tCeq) q32_forestry_est(j,type32,ac) Distribution of forestry establishment over ac_est (mio. ha) - q32_cost_hvarea(i) Cost of harvesting timber from forests (mio. USD per yr) + q32_cost_hvarea(i) Cost of harvesting timber from forests (mio. USD17MER per yr) q32_prod_forestry(j) Production of woody biomass from commercial plantations (mio. tDM per yr) q32_bv_aff(j,potnatveg) Biodiversity value for aff forestry land (Mha) q32_bv_ndc(j,potnatveg) Biodiversity value for ndc forestry land (Mha) @@ -116,11 +117,11 @@ equations *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov_cost_fore(t,i,type) Forestry costs (Mio USD) - ov32_cost_hvarea(t,i,type) Cost of harvesting timber from forests (mio. USD per yr) + ov32_cost_hvarea(t,i,type) Cost of harvesting timber from forests (mio. USD17MER per yr) ov32_land(t,j,type32,ac,type) Forestry land pools (mio. ha) ov32_land_missing(t,j,type) Technical area balance term for timber plantation establishment (mio. ha) ov_landdiff_forestry(t,type) Aggregated difference in forestry land compared to previous timestep (mio. ha) - ov32_cost_recur(t,i,type) Recurring forest management costs (USD per ha) + ov32_cost_recur(t,i,type) Recurring forest management costs (USD17MER per ha) ov32_land_expansion(t,j,type32,type) Forestry land expansion (mio. ha) ov32_land_reduction(t,j,type32,ac,type) Forestry land reduction (mio. ha) ov32_cost_establishment(t,i,type) Cost of establishment calculated at the current time step (mio. USD) @@ -153,7 +154,7 @@ parameters oq32_cost_establishment(t,i,type) Present value of cost of establishment (mio. USD) oq32_bgp_aff(t,j,ac,type) Biophysical afforestation calculation (mio. tCeq) oq32_forestry_est(t,j,type32,ac,type) Distribution of forestry establishment over ac_est (mio. ha) - oq32_cost_hvarea(t,i,type) Cost of harvesting timber from forests (mio. USD per yr) + oq32_cost_hvarea(t,i,type) Cost of harvesting timber from forests (mio. USD17MER per yr) oq32_prod_forestry(t,j,type) Production of woody biomass from commercial plantations (mio. tDM per yr) oq32_bv_aff(t,j,potnatveg,type) Biodiversity value for aff forestry land (Mha) oq32_bv_ndc(t,j,potnatveg,type) Biodiversity value for ndc forestry land (Mha) diff --git a/modules/32_forestry/dynamic_may24/equations.gms b/modules/32_forestry/dynamic_may24/equations.gms index c2f861d0d5..42555a0c50 100644 --- a/modules/32_forestry/dynamic_may24/equations.gms +++ b/modules/32_forestry/dynamic_may24/equations.gms @@ -158,7 +158,7 @@ q32_cost_establishment(i2).. *' trees established for re/afforestation purposes. q32_cost_recur(i2) .. v32_cost_recur(i2) =e= - sum((cell(i2,j2),type32,ac_sub), v32_land(j2,type32,ac_sub)) * s32_recurring_cost; + sum((cell(i2,j2),type32,ac_sub), v32_land(j2,type32,ac_sub) * i32_recurring_cost(type32)); **** Plantation establishment decision diff --git a/modules/32_forestry/dynamic_may24/input.gms b/modules/32_forestry/dynamic_may24/input.gms index 4561adace6..7dfde9491a 100644 --- a/modules/32_forestry/dynamic_may24/input.gms +++ b/modules/32_forestry/dynamic_may24/input.gms @@ -24,16 +24,16 @@ $setglobal c32_shock_scenario none scalars s32_hvarea Flag for harvested area and establishemt (0=zero 1=exognous 2=endogneous) / 2 / - s32_est_cost_plant Establishment cost for plantations (USD per ha) / 2000 / - s32_est_cost_natveg Establishment cost for natural vegetation (USD per ha) / 2000 / - s32_recurring_cost Recurring costs (USD per ha) / 500 / - s32_harvesting_cost Harvesting cost (USD per ha) / 2000 / + s32_est_cost_plant Establishment cost for plantations (USD17MER per ha) / 2460 / + s32_est_cost_natveg Establishment cost for natural vegetation (USD17MER per ha) / 2460 / + s32_recurring_cost Recurring costs (USD17MER per ha) / 615 / + s32_harvesting_cost Harvesting cost (USD17MER per ha) / 2460 / s32_planing_horizon Afforestation planing horizon (years) / 50 / s32_rotation_extension Rotation extension factor 1=original rotations 2=100 percent increase in rotations etc (1) / 1 / s32_faustmann_rotation Switch to activate faustmann rotations (1=on 0=off) / 0 / s32_initial_distribution Switch to Activate ageclass distribution in plantations 0=off 1=equal distribution / 1 / - s32_price Price for timber (USD) / 45 / - s32_free_land_cost Penalty for technial area balance term (USD per ha) / 1e+06 / + s32_price Price for timber (USD17MER) / 55 / + s32_free_land_cost Penalty for technial area balance term (USD17MER per ha) / 1e+06 / s32_max_aff_area Maximum total global afforestation (mio. ha) / Inf / s32_aff_plantation Switch for using growth curves for afforestation 0=natveg 1=plantations (1) / 0 / s32_tcre_local Switch for local (1) or global (0) TRCE factors (1) / 1 / @@ -48,6 +48,7 @@ scalars s32_plant_contr_growth_endvalue End value for plantation contribution growth fader (percent per year) / 0 / s32_plant_contr_max Maximum plantation contribution for establishment decision (percent) / 0.5 / s32_demand_establishment Boolean switch for establishment demand assumption 1=forward looking 0=static (1) / 1 / + s32_npi_ndc_reversal Year in which NPI NDC reversal should take place (1) / Inf / ; parameter f32_aff_mask(j) afforestation mask (binary) diff --git a/modules/32_forestry/dynamic_may24/preloop.gms b/modules/32_forestry/dynamic_may24/preloop.gms index bcf1b96ed1..6a02ea1608 100644 --- a/modules/32_forestry/dynamic_may24/preloop.gms +++ b/modules/32_forestry/dynamic_may24/preloop.gms @@ -5,7 +5,8 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -*m_sigmoid_time_interpol(i32_plant_contr_fader,2020,2050,0.05,0); +i32_recurring_cost(type32) = s32_recurring_cost; + m_sigmoid_time_interpol(i32_plant_contr_growth_fader,s32_plant_contr_growth_startyear,s32_plant_contr_growth_endyear,s32_plant_contr_growth_startvalue,s32_plant_contr_growth_endvalue); p32_est_cost("plant") = s32_est_cost_plant; @@ -228,3 +229,16 @@ p32_land(t,j,type32,ac) = 0; * initialize forest disturbance losses p32_disturbance_loss_ftype32(t,j,"aff",ac) = 0; + +* Initialize biodiversity value +vm_bv.l(j,"aff_co2p",potnatveg) = + sum(bii_class_secd, sum(ac_to_bii_class_secd(ac,bii_class_secd), pc32_land(j,"aff",ac)) * + p32_bii_coeff("aff",bii_class_secd,potnatveg)) * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j,"aff_ndc",potnatveg) = + sum(bii_class_secd, sum(ac_to_bii_class_secd(ac,bii_class_secd), pc32_land(j,"ndc",ac)) * + p32_bii_coeff("ndc",bii_class_secd,potnatveg)) * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j,"plant",potnatveg) = + sum(bii_class_secd, sum(ac_to_bii_class_secd(ac,bii_class_secd), pc32_land(j,"plant",ac)) * + p32_bii_coeff("plant",bii_class_secd,potnatveg)) * fm_luh2_side_layers(j,potnatveg); diff --git a/modules/32_forestry/dynamic_may24/presolve.gms b/modules/32_forestry/dynamic_may24/presolve.gms index 6ebf6d3240..bee79ec879 100644 --- a/modules/32_forestry/dynamic_may24/presolve.gms +++ b/modules/32_forestry/dynamic_may24/presolve.gms @@ -33,7 +33,7 @@ v32_land_reduction.fx(j,type32,ac_est) = 0; if(s32_aff_plantation = 0, p32_carbon_density_ac(t,j,"aff",ac,ag_pools) = pm_carbon_density_secdforest_ac(t,j,ac,ag_pools); elseif s32_aff_plantation = 1, - p32_carbon_density_ac(t,j,"aff",ac,ag_pools) = pm_carbon_density_plantation_ac(t,j,ac,"vegc"); + p32_carbon_density_ac(t,j,"aff",ac,ag_pools) = pm_carbon_density_plantation_ac(t,j,ac,ag_pools); ); *' Timber plantations carbon densities: @@ -120,6 +120,13 @@ v32_land.fx(j,"ndc",ac_sub) = pc32_land(j,"ndc",ac_sub); v32_land.lo(j,"ndc",ac_est) = 0; v32_land.up(j,"ndc",ac_est) = Inf; +* release all bounds in case of NPI / NDC reversal and set recurring costs to zero +if (m_year(t) >= s32_npi_ndc_reversal, + v32_land.lo(j,"ndc",ac) = 0; + v32_land.up(j,"ndc",ac) = Inf; + i32_recurring_cost("ndc") = 0; +); + ** fix c price induced afforestation based on s32_planing_horizon, fixed only until end of s32_planing_horizon, ac_est is free if(s32_aff_prot = 0, v32_land.fx(j,"aff",ac)$(ac.off <= s32_planing_horizon/5) = pc32_land(j,"aff",ac); @@ -183,4 +190,17 @@ pm_land_conservation(t,j,"secdforest","restore")$(pm_land_conservation(t,j,"secd = pm_land_conservation(t,j,"secdforest","restore") - (sum(ac, p32_land(t,j,"ndc",ac) + p32_land(t,j,"aff",ac) + v32_land.lo(j,"plant",ac)) + p32_aff_pol_timestep(t,j)); pm_land_conservation(t,j,"secdforest","restore")$(pm_land_conservation(t,j,"secdforest","restore") <= sum(ac, p32_land(t,j,"ndc",ac) + p32_land(t,j,"aff",ac) + v32_land.lo(j,"plant",ac)) + p32_aff_pol_timestep(t,j)) = 0; +* Update biodiversity value +vm_bv.l(j,"aff_co2p",potnatveg) = + sum(bii_class_secd, sum(ac_to_bii_class_secd(ac,bii_class_secd), pc32_land(j,"aff",ac)) * + p32_bii_coeff("aff",bii_class_secd,potnatveg)) * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j,"aff_ndc",potnatveg) = + sum(bii_class_secd, sum(ac_to_bii_class_secd(ac,bii_class_secd), pc32_land(j,"ndc",ac)) * + p32_bii_coeff("ndc",bii_class_secd,potnatveg)) * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j,"plant",potnatveg) = + sum(bii_class_secd, sum(ac_to_bii_class_secd(ac,bii_class_secd), pc32_land(j,"plant",ac)) * + p32_bii_coeff("plant",bii_class_secd,potnatveg)) * fm_luh2_side_layers(j,potnatveg); + *** EOF presolve.gms *** diff --git a/modules/32_forestry/dynamic_may24/scaling.gms b/modules/32_forestry/dynamic_may24/scaling.gms index 029d892a2e..d6b52732fc 100644 --- a/modules/32_forestry/dynamic_may24/scaling.gms +++ b/modules/32_forestry/dynamic_may24/scaling.gms @@ -9,4 +9,3 @@ v32_cost_establishment.scale(i) = 10e4; v32_cost_recur.scale(i) = 10e4; vm_cost_fore.scale(i) = 10e5; v32_cost_hvarea.scale(i)$(s32_hvarea = 1 OR s32_hvarea = 2) = 10e4; -vm_cdr_aff.scale(j,ac,aff_effect) = 10e-4; diff --git a/modules/34_urban/exo_nov21/input.gms b/modules/34_urban/exo_nov21/input.gms index abff7533dc..bb9a18190c 100644 --- a/modules/34_urban/exo_nov21/input.gms +++ b/modules/34_urban/exo_nov21/input.gms @@ -10,7 +10,7 @@ $setglobal c34_urban_scenario SSP2 scalars - s34_urban_deviation_cost Artificial cost for urban deviation variables (USD05MER per ha) / 1e+06 / + s34_urban_deviation_cost Artificial cost for urban deviation variables (USD17MER per ha) / 1e+06 / ; table f34_urbanland(t_all, j, urban_scen34) Urban land diff --git a/modules/34_urban/exo_nov21/preloop.gms b/modules/34_urban/exo_nov21/preloop.gms index a313f1a29b..af2f0c4700 100644 --- a/modules/34_urban/exo_nov21/preloop.gms +++ b/modules/34_urban/exo_nov21/preloop.gms @@ -15,3 +15,7 @@ i34_urban_area(t_all, j) = f34_urbanland(t_all, j,"%c34_urban_scenario%"); ); pcm_land(j,"urban") = i34_urban_area("y1995",j); + +* Initialize biodiversity value +vm_bv.l(j2,"urban", potnatveg) = + pcm_land(j2,"urban") * fm_bii_coeff("urban",potnatveg) * fm_luh2_side_layers(j2,potnatveg); diff --git a/modules/34_urban/exo_nov21/scaling.gms b/modules/34_urban/exo_nov21/scaling.gms index dec0009dd7..3b13d1a8d0 100644 --- a/modules/34_urban/exo_nov21/scaling.gms +++ b/modules/34_urban/exo_nov21/scaling.gms @@ -5,4 +5,6 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -vm_cost_urban.scale(j) = 10e4; +vm_cost_urban.scale(j) = 10e3; +*v34_cost1.scale(j) = 10e-4; +*v34_cost2.scale(j) = 10e-4; diff --git a/modules/34_urban/static/presolve.gms b/modules/34_urban/static/presolve.gms index 00ee7576bb..4a9eb9e4a5 100644 --- a/modules/34_urban/static/presolve.gms +++ b/modules/34_urban/static/presolve.gms @@ -8,7 +8,7 @@ vm_land.fx(j,"urban") = pcm_land(j,"urban"); vm_carbon_stock.fx(j,"urban",ag_pools,stockType) = 0; -*' Biodiveristy value (BV) +* Biodiveristy value (BV) vm_bv.fx(j,"urban", potnatveg) = pcm_land(j,"urban") * fm_bii_coeff("urban",potnatveg) * fm_luh2_side_layers(j,potnatveg); vm_cost_urban.fx(j) = 0; diff --git a/modules/35_natveg/pot_forest_may24/declarations.gms b/modules/35_natveg/pot_forest_may24/declarations.gms index a583d4da6c..a0228e1a36 100644 --- a/modules/35_natveg/pot_forest_may24/declarations.gms +++ b/modules/35_natveg/pot_forest_may24/declarations.gms @@ -27,8 +27,8 @@ parameters p35_carbon_density_other(t,j,othertype35,ac,ag_pools) Carbon density other land (tC per ha) p35_disturbance_loss_secdf(t,j,ac) Loss due to disturbances in secondary forest (mio. ha) p35_disturbance_loss_primf(t,j) Loss due to disturbances in primary forest (mio. ha) - i35_plantedclass_ac(j,ac) Area of age-classes in secondary forest (1) - p35_poulter_dist(j,ac) Share of age-classes in secondary forest (1) + p35_secdf_ageclass(j,ac) Secondadry forest area in 5-year age-classes (mio. ha) + p35_secdf_ageclass_dist(j,ac) Share of age-classes in secondary forest (1) p35_land_start_ac(j,ac,land_natveg) Initial Natural vegetation area (mio. ha) p35_protection_dist(j,ac) Distribution of secondary forest protection (1) p35_land_restoration(j,land_natveg) Actual secondary forest and other land restoration area (mio. ha) @@ -60,7 +60,7 @@ equations q35_prod_secdforest(j) Production of woody biomass from secondary forests (mio. tDM per yr) q35_prod_primforest(j) Production of woody biomass from primary forests (mio. tDM per yr) q35_prod_other(j) Production of woody biomass from other land (mio. tDM per yr) - q35_cost_hvarea(i) Cost of harvesting natural vegetation (mio. USD) + q35_cost_hvarea(i) Cost of harvesting natural vegetation (mio. USD17MER) q35_bv_primforest(j,potnatveg) Biodiversity value of primary forest (mio. ha) q35_bv_secdforest(j,potnatveg) Biodiversity value of secondary forest (mio. ha) q35_bv_other(j,potnatveg) Biodiversity value of other land (mio. ha) @@ -82,7 +82,7 @@ positive variables v35_hvarea_other(j,othertype35,ac) Harvested area from other land (mio. ha) v35_hvarea_primforest(j) Harvested area from primary forest (mio. ha) vm_prod_natveg(j,land_natveg,kforestry) Production of woody biomass from natural vegetation (mio. tDM per yr) - vm_cost_hvarea_natveg(i) Cost of harvesting natural vegetation (mio. USD) + vm_cost_hvarea_natveg(i) Cost of harvesting natural vegetation (mio. USD17MER) ; @@ -100,7 +100,7 @@ parameters ov35_hvarea_other(t,j,othertype35,ac,type) Harvested area from other land (mio. ha) ov35_hvarea_primforest(t,j,type) Harvested area from primary forest (mio. ha) ov_prod_natveg(t,j,land_natveg,kforestry,type) Production of woody biomass from natural vegetation (mio. tDM per yr) - ov_cost_hvarea_natveg(t,i,type) Cost of harvesting natural vegetation (mio. USD) + ov_cost_hvarea_natveg(t,i,type) Cost of harvesting natural vegetation (mio. USD17MER) oq35_land_secdforest(t,j,type) Secdforest land pool calculation (mio. ha) oq35_land_other(t,j,type) Other land pool calculation (mio. ha) oq35_carbon_primforest(t,j,ag_pools,stockType,type) Primforest carbon stock calculation (mio tC) @@ -125,7 +125,7 @@ parameters oq35_prod_secdforest(t,j,type) Production of woody biomass from secondary forests (mio. tDM per yr) oq35_prod_primforest(t,j,type) Production of woody biomass from primary forests (mio. tDM per yr) oq35_prod_other(t,j,type) Production of woody biomass from other land (mio. tDM per yr) - oq35_cost_hvarea(t,i,type) Cost of harvesting natural vegetation (mio. USD) + oq35_cost_hvarea(t,i,type) Cost of harvesting natural vegetation (mio. USD17MER) oq35_bv_primforest(t,j,potnatveg,type) Biodiversity value of primary forest (mio. ha) oq35_bv_secdforest(t,j,potnatveg,type) Biodiversity value of secondary forest (mio. ha) oq35_bv_other(t,j,potnatveg,type) Biodiversity value of other land (mio. ha) diff --git a/modules/35_natveg/pot_forest_may24/input.gms b/modules/35_natveg/pot_forest_may24/input.gms index d4922eae94..73ce195cb4 100644 --- a/modules/35_natveg/pot_forest_may24/input.gms +++ b/modules/35_natveg/pot_forest_may24/input.gms @@ -19,13 +19,14 @@ s35_hvarea Flag for harvested area (0=zero 1=exognous 2=endogneous) / 2 / s35_hvarea_secdforest annual secdforest harvest rate for s35_hvarea equals 1 (percent per year) / 0 / s35_hvarea_primforest annual primforest harvest rate for s35_hvarea equals 1 (percent per year) / 0 / s35_hvarea_other annual other land harvest rate for s35_hvarea equals 1 (percent per year) / 0 / -s35_timber_harvest_cost_secdforest Cost for harvesting from secondary forest (USD per ha) / 2000/ -s35_timber_harvest_cost_other Cost for harvesting from other land (USD per ha) / 1500 / -s35_timber_harvest_cost_primforest Cost for harvesting from primary forest (USD per ha) / 3000/ +s35_timber_harvest_cost_secdforest Cost for harvesting from secondary forest (USD17MER per ha) / 2460/ +s35_timber_harvest_cost_other Cost for harvesting from other land (USD17MER per ha) / 1845 / +s35_timber_harvest_cost_primforest Cost for harvesting from primary forest (USD17MER per ha) / 3690/ s35_natveg_harvest_shr Constrains the allowed wood harvest from natural vegetation (1=unconstrained) (1) /1/ s35_secdf_distribution Flag for secdf initialization (0=all secondary forest in highest age class 1=Equal distribution among all age classes 2=Poulter distribution from MODIS satellite data) (1) / 2 / s35_forest_damage Damage simulation in forests (0=none 1=shifting agriculture 2= Damage from shifting agriculture is faded out by c35_forest_damage_end 4= f35_forest_shock scenario) / 2 / s35_forest_damage_end Year of forest damage end (1) / 2050 / +s35_npi_ndc_reversal Year in which NPI NDC reversal should take place (1) / Inf / ; table f35_forest_lost_share(i,driver_source) Share of area damanged by forest fires (1) diff --git a/modules/35_natveg/pot_forest_may24/preloop.gms b/modules/35_natveg/pot_forest_may24/preloop.gms index 7d04a1928d..178ff03bbd 100644 --- a/modules/35_natveg/pot_forest_may24/preloop.gms +++ b/modules/35_natveg/pot_forest_may24/preloop.gms @@ -16,17 +16,22 @@ elseif s35_secdf_distribution = 1, * ac0 is excluded here. Therefore no initial shifting is needed. i35_secdforest(j,ac)$(not sameas(ac,"ac0")) = pcm_land(j,"secdforest")/(card(ac)-1); elseif s35_secdf_distribution = 2, -*classes 1, 2, 3 include plantation and are therefore excluded -*As disturbance history (fire) would affect the age structure -*We use the sahre from class 4 to be in class 1,2,3 -*class 15 is primary forest and is therefore excluded - i35_plantedclass_ac(j,ac) = im_plantedclass_ac(j,ac); - i35_plantedclass_ac(j,ac_planted)$(i35_plantedclass_ac(j,ac_planted) > im_plantedclass_ac(j,"ac35")) = im_plantedclass_ac(j,"ac35"); - -* Distribute this area correctly - p35_poulter_dist(j,ac) = 0; - p35_poulter_dist(j,ac) = (i35_plantedclass_ac(j,ac)/sum(ac2,i35_plantedclass_ac(j,ac2)))$(sum(ac2,i35_plantedclass_ac(j,ac2))>0); - i35_secdforest(j,ac)$(not sameas(ac,"ac0")) = pcm_land(j,"secdforest")*p35_poulter_dist(j,ac); +*For the initialization of age-classes in secondary forest, forest area in 5-year age-classes based on GFAD is used + p35_secdf_ageclass(j,ac) = im_forest_ageclass(j,ac); +* Young forest (`ac_young`) includes plantations and might be (strongly) affected by disturbances such as fire. +* Therefore, young forest (`ac_young`) is disregarded for the initialization of age-classes in secondary forest. +* Instead, age-class areas from `ac35` are used as a proxy for `ac_young`. + p35_secdf_ageclass(j,ac_young) = p35_secdf_ageclass(j,"ac35"); +* `acx` includes primary forest. Therefore, primary forest is subtracted from `acx`. + p35_secdf_ageclass(j,"acx") = p35_secdf_ageclass(j,"acx") - pcm_land(j,"primforest"); + p35_secdf_ageclass(j,"acx")$(p35_secdf_ageclass(j,"acx") < 0) = 0; + +* Distribution of age-classes in secondary forest. In case of missing area information, `acx` is assumed. + p35_secdf_ageclass_dist(j,ac) = 0; + p35_secdf_ageclass_dist(j,"acx") = 1; + p35_secdf_ageclass_dist(j,ac)$(sum(ac2,p35_secdf_ageclass(j,ac2))>0) = + p35_secdf_ageclass(j,ac)/sum(ac2,p35_secdf_ageclass(j,ac2)); + i35_secdforest(j,ac)$(not sameas(ac,"ac0")) = pcm_land(j,"secdforest")*p35_secdf_ageclass_dist(j,ac); ); *use residual approach to avoid rounding errors @@ -80,3 +85,15 @@ m_sigmoid_time_interpol(p35_damage_fader,sm_fix_SSP2,s35_forest_damage_end,0,1); pc35_secdforest(j,ac) = i35_secdforest(j,ac); pc35_land_other(j,othertype35,ac) = i35_land_other(j,othertype35,ac); + +* Initialize biodiversity value +vm_bv.l(j,"primforest",potnatveg) = + pcm_land(j,"primforest") * fm_bii_coeff("primary",potnatveg) * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j,"secdforest",potnatveg) = + sum(bii_class_secd, sum(ac_to_bii_class_secd(ac,bii_class_secd), i35_secdforest(j,ac)) * + fm_bii_coeff(bii_class_secd,potnatveg)) * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j,"other",potnatveg) = + sum(bii_class_secd, sum(ac_to_bii_class_secd(ac,bii_class_secd), sum(othertype35, i35_land_other(j,othertype35,ac))) * + fm_bii_coeff(bii_class_secd,potnatveg)) * fm_luh2_side_layers(j,potnatveg); diff --git a/modules/35_natveg/pot_forest_may24/presolve.gms b/modules/35_natveg/pot_forest_may24/presolve.gms index d6e63de4a6..4a357bf452 100644 --- a/modules/35_natveg/pot_forest_may24/presolve.gms +++ b/modules/35_natveg/pot_forest_may24/presolve.gms @@ -227,6 +227,12 @@ p35_min_forest(t,j)$(p35_min_forest(t,j) > pcm_land(j,"primforest") + pcm_land(j = pcm_land(j,"primforest") + pcm_land(j,"secdforest") + pcm_land(j,"forestry"); p35_min_other(t,j)$(p35_min_other(t,j) > pcm_land(j,"other")) = pcm_land(j,"other"); +* NPI / NDC reversal +if (m_year(t) >= s35_npi_ndc_reversal, + p35_min_forest(t,j) = 0; + p35_min_other(t,j) = 0; +); + ** Youngest age classes are not allowed to be harvested v35_hvarea_secdforest.fx(j,ac_est) = 0; v35_hvarea_other.fx(j,othertype35,ac_est) = 0; @@ -244,3 +250,15 @@ elseif s35_hvarea = 1, v35_hvarea_primforest.fx(j) = (vm_land.l(j,"primforest") - vm_land.lo(j,"primforest"))*s35_hvarea_primforest*m_timestep_length_forestry; v35_hvarea_other.fx(j,othertype35,ac_sub) = (vm_land_other.l(j,othertype35,ac_sub) - vm_land_other.lo(j,othertype35,ac_sub))*s35_hvarea_other*m_timestep_length_forestry; ); + +* Update biodiversity value +vm_bv.l(j,"primforest",potnatveg) = + pcm_land(j,"primforest") * fm_bii_coeff("primary",potnatveg) * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j,"secdforest",potnatveg) = + sum(bii_class_secd, sum(ac_to_bii_class_secd(ac,bii_class_secd), pc35_secdforest(j,ac)) * + fm_bii_coeff(bii_class_secd,potnatveg)) * fm_luh2_side_layers(j,potnatveg); + +vm_bv.l(j,"other",potnatveg) = + sum(bii_class_secd, sum(ac_to_bii_class_secd(ac,bii_class_secd), sum(othertype35, pc35_land_other(j,othertype35,ac))) * + fm_bii_coeff(bii_class_secd,potnatveg)) * fm_luh2_side_layers(j,potnatveg); diff --git a/modules/36_employment/exo_may22/declarations.gms b/modules/36_employment/exo_may22/declarations.gms index 78002b9d20..1e1c3b74ae 100644 --- a/modules/36_employment/exo_may22/declarations.gms +++ b/modules/36_employment/exo_may22/declarations.gms @@ -17,15 +17,13 @@ positive variables ; parameters - p36_hourly_costs_iso(t_all,iso, wage_scen) Hourly labor costs in agriculture on iso level before and after including wage scenario (USDMER05 per hour) - p36_hourly_costs_increase(iso) Difference between minimum hourly labor costs and actual hourly labor costs in 2050 (USDMER05 per hour) - pm_hourly_costs(t,i, wage_scen) Hourly labor costs in agriculture on regional level before and after including wage scenario (USDMER05 per hour) + p36_hourly_costs_iso(t_all,iso, wage_scen) Hourly labor costs in agriculture on iso level before and after including wage scenario (USD17MER per hour) + p36_hourly_costs_increase(iso) Difference between minimum hourly labor costs and actual hourly labor costs in 2050 (USD17MER per hour) + pm_hourly_costs(t,i, wage_scen) Hourly labor costs in agriculture on regional level before and after including wage scenario (USD17MER per hour) pm_productivity_gain_from_wages(t,i) Multiplicative factor describing productivity gain related to higher wages (1) p36_total_hours_worked(iso) Total hours worked by all employed people (mio. hours per year) - p36_calibration_hourly_costs(iso) Additive calibration term for hourly labor costs (USDMER05 per hour) - p36_cost_share(t,i) Capital share of factor costs (1) - p36_share_calibration(i) Additive calibration term for capital shares (1) - p36_nonmagpie_labor_costs(t,i) Labor costs from subsidies and Value of Production not covered by MAgPIE (mio. USDMER05) + p36_calibration_hourly_costs(iso) Additive calibration term for hourly labor costs (USD17MER per hour) + p36_nonmagpie_labor_costs(t,i) Labor costs from subsidies and Value of Production not covered by MAgPIE (mio. USD17MER) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### diff --git a/modules/36_employment/exo_may22/input.gms b/modules/36_employment/exo_may22/input.gms index 953dc62543..cc33cd77bc 100644 --- a/modules/36_employment/exo_may22/input.gms +++ b/modules/36_employment/exo_may22/input.gms @@ -7,7 +7,7 @@ scalars s36_weeks_in_year number of weeks in a year (weeks per yr) / 52.1429 / -s36_minimum_wage global minimum wage (USDMER05 per hour) / 0 / +s36_minimum_wage global minimum wage (USD17MER per hour) / 0 / s36_scale_productivity_with_wage how strong the wage increase should affect labor productivity (1) / 0 / ; @@ -23,7 +23,7 @@ $include "./modules/36_employment/exo_may22/input/f36_weekly_hours_iso.csv" $offdelim ; -table f36_hist_hourly_costs(t_all,iso) Historical values of hourly labor costs in agriculture (USD05MER per h) +table f36_hist_hourly_costs(t_all,iso) Historical values of hourly labor costs in agriculture (USD17MER per h) $ondelim $include "./modules/36_employment/exo_may22/input/f36_historic_hourly_labor_costs.csv" $offdelim @@ -43,30 +43,14 @@ $include "./modules/36_employment/exo_may22/input/f36_historic_ag_employment.csv $offdelim ; -table f36_unspecified_subsidies(t_all,i) Factor cost share of unspecified subsidies not included in MAgPIE labor costs (mio. USD05MER) +table f36_unspecified_subsidies(t_all,i) Factor cost share of unspecified subsidies not included in MAgPIE labor costs (mio. USD17MER) $ondelim $include "./modules/36_employment/exo_may22/input/f36_unspecified_subsidies.csv" $offdelim ; -table f36_nonmagpie_factor_costs(t_all,i) Factor cost share of VoP from ag commodities not mapped to MAgPIE (mio. USD05MER) +table f36_nonmagpie_factor_costs(t_all,i) Factor cost share of VoP from ag commodities not mapped to MAgPIE (mio. USD17MER) $ondelim $include "./modules/36_employment/exo_may22/input/f36_nonmagpie_factor_costs.csv" $offdelim ; - -parameter f36_regr_cap_share(reg36) Parameters for dynamic regression -/ -$ondelim -$include "./modules/36_employment/exo_may22/input/f36_regression_cap_share.csv" -$offdelim -/ -; - -table f36_hist_cap_share(t_all,i) Historical capital share -$ondelim -$include "./modules/36_employment/exo_may22/input/f36_historical_share.csv" -$offdelim -; - - diff --git a/modules/36_employment/exo_may22/input/files b/modules/36_employment/exo_may22/input/files index d7ddcb6ef8..adbd3d2b95 100644 --- a/modules/36_employment/exo_may22/input/files +++ b/modules/36_employment/exo_may22/input/files @@ -6,5 +6,3 @@ f36_regression_hourly_labor_costs.csv f36_historic_ag_employment.csv f36_unspecified_subsidies.csv f36_nonmagpie_factor_costs.csv -f36_regression_cap_share.csv -f36_historical_share.csv diff --git a/modules/36_employment/exo_may22/presolve.gms b/modules/36_employment/exo_may22/presolve.gms index 48683a10e1..f75f0f56ff 100644 --- a/modules/36_employment/exo_may22/presolve.gms +++ b/modules/36_employment/exo_may22/presolve.gms @@ -5,14 +5,6 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -* capital cost share to split non-magpie factor costs into labor and capital -p36_share_calibration(i) = f36_hist_cap_share("y2010",i)-(f36_regr_cap_share("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso("y2010",iso)))+f36_regr_cap_share("intercept")); - -if (m_year(t)<2010, - p36_cost_share(t,i) = f36_hist_cap_share(t,i); -elseif (m_year(t)>=2010), - p36_cost_share(t,i) = f36_regr_cap_share("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso(t,iso)))+f36_regr_cap_share("intercept")+p36_share_calibration(i); -); *' @code @@ -21,7 +13,7 @@ elseif (m_year(t)>=2010), *' are both kept constant for future years. p36_nonmagpie_labor_costs(t,i) = (f36_unspecified_subsidies(t,i) + f36_nonmagpie_factor_costs(t,i)) * - (1-p36_cost_share(t,i)) * (1/pm_productivity_gain_from_wages(t,i)) * + (pm_factor_cost_shares(t,i,"labor")) * (1/pm_productivity_gain_from_wages(t,i)) * (pm_hourly_costs(t,i,"scenario") / pm_hourly_costs(t,i,"baseline")); *' @stop diff --git a/modules/38_factor_costs/input/files b/modules/38_factor_costs/input/files index cc31093237..fda8548a95 100644 --- a/modules/38_factor_costs/input/files +++ b/modules/38_factor_costs/input/files @@ -1,5 +1,6 @@ * list of files that are required here -f38_historical_share.csv +f38_historical_share_iso.csv f38_regression_cap_share.csv f38_fac_req_fao.csv -f38_fac_req_fao_regional.cs4 \ No newline at end of file +f38_fac_req_fao_regional.cs4 +f38_hist_factor_costs_iso.csv diff --git a/modules/38_factor_costs/per_ton_fao_may22/declarations.gms b/modules/38_factor_costs/per_ton_fao_may22/declarations.gms index d79d5b957a..03b0d553a1 100644 --- a/modules/38_factor_costs/per_ton_fao_may22/declarations.gms +++ b/modules/38_factor_costs/per_ton_fao_may22/declarations.gms @@ -6,24 +6,25 @@ *** | Contact: magpie@pik-potsdam.de equations -q38_cost_prod_crop_labor(i) Regional labor costs for crop production (mio. USD05MER per yr) -q38_cost_prod_crop_capital(i) Regional capital costs for crop production (mio. USD05MER per yr) +q38_cost_prod_crop_labor(i) Regional labor costs for crop production (mio. USD17MER per yr) +q38_cost_prod_crop_capital(i) Regional capital costs for crop production (mio. USD17MER per yr) ; positive variables -vm_cost_prod_crop(i,factors) Regional factor costs of capital and labor for crop production (mio. USD05MER per yr) +vm_cost_prod_crop(i,factors) Regional factor costs of capital and labor for crop production (mio. USD17MER per yr) ; parameter -pm_cost_share_crops(t,i,factors) Capital and labor shares of the regional factor costs for crop production (1) -p38_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1) -i38_fac_req(t_all,i,kcr) Factor requirements (USD05MER per tDM) +p38_capital_cost_shares_iso(t,iso) Capital shares of factor costs on iso level (1) +p38_capital_share_calibration(iso) Summation factor used to calibrate calculated capital shares with historical values (1) +pm_factor_cost_shares(t,i,factors) Capital and labor shares of factor costs on regional level (1) +i38_fac_req(t_all,i,kcr) Factor requirements (USD17MER per tDM) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_prod_crop(t,i,factors,type) Regional factor costs of capital and labor for crop production (mio. USD05MER per yr) - oq38_cost_prod_crop_labor(t,i,type) Regional labor costs for crop production (mio. USD05MER per yr) - oq38_cost_prod_crop_capital(t,i,type) Regional capital costs for crop production (mio. USD05MER per yr) + ov_cost_prod_crop(t,i,factors,type) Regional factor costs of capital and labor for crop production (mio. USD17MER per yr) + oq38_cost_prod_crop_labor(t,i,type) Regional labor costs for crop production (mio. USD17MER per yr) + oq38_cost_prod_crop_capital(t,i,type) Regional capital costs for crop production (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/38_factor_costs/per_ton_fao_may22/equations.gms b/modules/38_factor_costs/per_ton_fao_may22/equations.gms index 94d8bacc07..a42e33dabd 100644 --- a/modules/38_factor_costs/per_ton_fao_may22/equations.gms +++ b/modules/38_factor_costs/per_ton_fao_may22/equations.gms @@ -9,12 +9,12 @@ q38_cost_prod_crop_labor(i2) .. vm_cost_prod_crop(i2,"labor") =e= sum(kcr, vm_prod_reg(i2,kcr) * sum(ct,i38_fac_req(ct,i2,kcr))) * - sum(ct,pm_cost_share_crops(ct,i2,"labor") * (1/pm_productivity_gain_from_wages(ct,i2)) * + sum(ct,pm_factor_cost_shares(ct,i2,"labor") * (1/pm_productivity_gain_from_wages(ct,i2)) * (pm_hourly_costs(ct,i2,"scenario") / pm_hourly_costs(ct,i2,"baseline"))); q38_cost_prod_crop_capital(i2) .. vm_cost_prod_crop(i2,"capital") =e= sum(kcr, vm_prod_reg(i2,kcr) * sum(ct,i38_fac_req(ct,i2,kcr))) * - sum(ct,pm_cost_share_crops(ct,i2,"capital")); + sum(ct,pm_factor_cost_shares(ct,i2,"capital")); *' The factor costs for crops `vm_cost_prod_crop` are calculated as product of *' production quantity `vm_prod_reg` and crop-specific factor requirements diff --git a/modules/38_factor_costs/per_ton_fao_may22/input.gms b/modules/38_factor_costs/per_ton_fao_may22/input.gms index bdb4cdd2a2..203a30213f 100644 --- a/modules/38_factor_costs/per_ton_fao_may22/input.gms +++ b/modules/38_factor_costs/per_ton_fao_may22/input.gms @@ -8,7 +8,7 @@ $setglobal c38_fac_req glo * spatial disaggregation of factor requirements (options: glo, reg) -parameter f38_fac_req(kcr) Factor requirement costs in 2005 (USD05MER per tDM) +parameter f38_fac_req(kcr) Factor requirement costs in 2005 (USD17MER per tDM) / $ondelim $include "./modules/38_factor_costs/input/f38_fac_req_fao.csv" @@ -16,7 +16,7 @@ $offdelim / ; -parameter f38_fac_req_fao_reg(t_all,i,kcr) Factor requirement costs (USD05MER per tDM) +parameter f38_fac_req_fao_reg(t_all,i,kcr) Factor requirement costs (USD17MER per tDM) / $ondelim $include "./modules/38_factor_costs/input/f38_fac_req_fao_regional.cs4" @@ -33,8 +33,14 @@ $offdelim / ; -table f38_historical_share(t_all,i) Historical capital share +table f38_historical_share(t_all,iso) Historical capital share $ondelim -$include "./modules/38_factor_costs/input/f38_historical_share.csv" +$include "./modules/38_factor_costs/input/f38_historical_share_iso.csv" +$offdelim +; + +table f38_hist_factor_costs(t_all,iso) Historical factor costs for crop and livestock (mio USD17MER) +$ondelim +$include "./modules/38_factor_costs/input/f38_hist_factor_costs_iso.csv" $offdelim ; diff --git a/modules/38_factor_costs/per_ton_fao_may22/preloop.gms b/modules/38_factor_costs/per_ton_fao_may22/preloop.gms new file mode 100644 index 0000000000..44b1a86f39 --- /dev/null +++ b/modules/38_factor_costs/per_ton_fao_may22/preloop.gms @@ -0,0 +1,19 @@ +*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) +*** | authors, and contributors see CITATION.cff file. This file is part +*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of +*** | AGPL-3.0, you are granted additional permissions described in the +*** | MAgPIE License Exception, version 1.0 (see LICENSE file). +*** | Contact: magpie@pik-potsdam.de + +* calculate capital cost shares from regression +p38_capital_share_calibration(iso) = sum(t_past$(ord(t_past) eq card(t_past)), f38_historical_share(t_past,iso) - (f38_reg_parameters("slope") * + log10(im_gdp_pc_ppp_iso(t_past,iso)) + f38_reg_parameters("intercept"))); + +p38_capital_cost_shares_iso(t,iso)$(m_year(t)<2010) = f38_historical_share(t,iso); +p38_capital_cost_shares_iso(t,iso)$(m_year(t)>=2010) = f38_reg_parameters("slope") * log10(im_gdp_pc_ppp_iso(t,iso)) + f38_reg_parameters("intercept") + p38_capital_share_calibration(iso); + +* aggregate factor cost shares +pm_factor_cost_shares(t,i,"capital") = sum(t_past$(ord(t_past) eq card(t_past)), + sum(i_to_iso(i,iso), f38_hist_factor_costs(t_past,iso) * p38_capital_cost_shares_iso(t,iso)) / + sum(i_to_iso(i,iso), f38_hist_factor_costs(t_past,iso))); +pm_factor_cost_shares(t,i,"labor") = 1 - pm_factor_cost_shares(t,i,"capital"); diff --git a/modules/38_factor_costs/per_ton_fao_may22/presolve.gms b/modules/38_factor_costs/per_ton_fao_may22/presolve.gms index 1bf4bad5c6..67923af624 100644 --- a/modules/38_factor_costs/per_ton_fao_may22/presolve.gms +++ b/modules/38_factor_costs/per_ton_fao_may22/presolve.gms @@ -20,14 +20,3 @@ elseif m_year(t)>=2010, else i38_fac_req(t,i,kcr) = i38_fac_req(t,i,kcr); ); - -p38_share_calibration(i) = f38_historical_share("y2010",i)-(f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso("y2010",iso)))+f38_reg_parameters("intercept")); - -if (m_year(t)<2010, - pm_cost_share_crops(t,i,"capital") = f38_historical_share(t,i); - pm_cost_share_crops(t,i,"labor") = 1 - f38_historical_share(t,i); - -elseif (m_year(t)>=2010), - pm_cost_share_crops(t,i,"capital") = f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso(t,iso)))+f38_reg_parameters("intercept")+p38_share_calibration(i); - pm_cost_share_crops(t,i,"labor") = 1 - pm_cost_share_crops(t,i,"capital"); -); diff --git a/modules/38_factor_costs/per_ton_fao_may22/realization.gms b/modules/38_factor_costs/per_ton_fao_may22/realization.gms index 44dfd75df6..81c5f87e5d 100644 --- a/modules/38_factor_costs/per_ton_fao_may22/realization.gms +++ b/modules/38_factor_costs/per_ton_fao_may22/realization.gms @@ -24,6 +24,7 @@ $Ifi "%phase%" == "declarations" $include "./modules/38_factor_costs/per_ton_fao $Ifi "%phase%" == "input" $include "./modules/38_factor_costs/per_ton_fao_may22/input.gms" $Ifi "%phase%" == "equations" $include "./modules/38_factor_costs/per_ton_fao_may22/equations.gms" $Ifi "%phase%" == "scaling" $include "./modules/38_factor_costs/per_ton_fao_may22/scaling.gms" +$Ifi "%phase%" == "preloop" $include "./modules/38_factor_costs/per_ton_fao_may22/preloop.gms" $Ifi "%phase%" == "presolve" $include "./modules/38_factor_costs/per_ton_fao_may22/presolve.gms" $Ifi "%phase%" == "postsolve" $include "./modules/38_factor_costs/per_ton_fao_may22/postsolve.gms" *######################## R SECTION END (PHASES) ############################### diff --git a/modules/38_factor_costs/sticky_feb18/declarations.gms b/modules/38_factor_costs/sticky_feb18/declarations.gms index 22a97df414..5b4d232df5 100644 --- a/modules/38_factor_costs/sticky_feb18/declarations.gms +++ b/modules/38_factor_costs/sticky_feb18/declarations.gms @@ -6,41 +6,42 @@ *** | Contact: magpie@pik-potsdam.de equations - q38_cost_prod_labor(i) Regional labor input costs for crop production (mio USD05MER) - q38_cost_prod_capital(i) Regional capital input costs for crop production (mio USD05MER) - q38_investment_immobile(j,kcr) Cellular immobile investments into farm capital (mio USD05MER) - q38_investment_mobile(j) Cellular mobile investments into farm capital (mio USD05MER) + q38_cost_prod_labor(i) Regional labor input costs for crop production (mio USD17MER) + q38_cost_prod_capital(i) Regional capital input costs for crop production (mio USD17MER) + q38_investment_immobile(j,kcr) Cellular immobile investments into farm capital (mio USD17MER) + q38_investment_mobile(j) Cellular mobile investments into farm capital (mio USD17MER) ; positive variables - vm_cost_prod_crop(i,factors) Regional factor costs of capital and labor for crop production (mio USD05MER per yr) - v38_investment_immobile(j,kcr) Investment costs in immobile farm capital (mio USD05MER per yr) - v38_investment_mobile(j) Investment costs in mobile farm capital (mio USD05MER per yr) + vm_cost_prod_crop(i,factors) Regional factor costs of capital and labor for crop production (mio USD17MER per yr) + v38_investment_immobile(j,kcr) Investment costs in immobile farm capital (mio USD17MER per yr) + v38_investment_mobile(j) Investment costs in mobile farm capital (mio USD17MER per yr) ; parameters - p38_labor_need(t,i,kcr) Labor input costs per unit of output (USD05MER per ton DM) - p38_capital_need(t,i,kcr,mobil38) Capital requirements per unit of output (USD05MER per ton DM) - p38_capital_immobile(t,j,kcr) Preexisting immobile capital stocks before investment (mio USD05MER) - p38_capital_mobile(t,j) Preexisting mobile capital stocks before investment (mio USD05MER) + p38_labor_need(t,i,kcr) Labor input costs per unit of output (USD17MER per ton DM) + p38_capital_need(t,i,kcr,mobil38) Capital requirements per unit of output (USD17MER per ton DM) + p38_capital_immobile(t,j,kcr) Preexisting immobile capital stocks before investment (mio USD17MER) + p38_capital_mobile(t,j) Preexisting mobile capital stocks before investment (mio USD17MER) - pm_cost_share_crops(t,i,factors) Capital and labor shares of the regional factor costs for crop production (1) - p38_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1) + p38_capital_cost_shares_iso(t,iso) Capital shares of factor costs on iso level (1) + p38_capital_share_calibration(iso) Summation factor used to calibrate calculated capital shares with historical values (1) + pm_factor_cost_shares(t,i,factors) Capital and labor shares of factor costs on regional level (1) p38_croparea_start(j,w,kcr) Agricultural land initialization area (mio. ha) - i38_fac_req(t_all,i,kcr) Factor requirements (USD05MER per tDM) + i38_fac_req(t_all,i,kcr) Factor requirements (USD17MER per tDM) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_prod_crop(t,i,factors,type) Regional factor costs of capital and labor for crop production (mio USD05MER per yr) - ov38_investment_immobile(t,j,kcr,type) Investment costs in immobile farm capital (mio USD05MER per yr) - ov38_investment_mobile(t,j,type) Investment costs in mobile farm capital (mio USD05MER per yr) - oq38_cost_prod_labor(t,i,type) Regional labor input costs for crop production (mio USD05MER) - oq38_cost_prod_capital(t,i,type) Regional capital input costs for crop production (mio USD05MER) - oq38_investment_immobile(t,j,kcr,type) Cellular immobile investments into farm capital (mio USD05MER) - oq38_investment_mobile(t,j,type) Cellular mobile investments into farm capital (mio USD05MER) + ov_cost_prod_crop(t,i,factors,type) Regional factor costs of capital and labor for crop production (mio USD17MER per yr) + ov38_investment_immobile(t,j,kcr,type) Investment costs in immobile farm capital (mio USD17MER per yr) + ov38_investment_mobile(t,j,type) Investment costs in mobile farm capital (mio USD17MER per yr) + oq38_cost_prod_labor(t,i,type) Regional labor input costs for crop production (mio USD17MER) + oq38_cost_prod_capital(t,i,type) Regional capital input costs for crop production (mio USD17MER) + oq38_investment_immobile(t,j,kcr,type) Cellular immobile investments into farm capital (mio USD17MER) + oq38_investment_mobile(t,j,type) Cellular mobile investments into farm capital (mio USD17MER) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/38_factor_costs/sticky_feb18/input.gms b/modules/38_factor_costs/sticky_feb18/input.gms index 7f2a513613..a186255029 100644 --- a/modules/38_factor_costs/sticky_feb18/input.gms +++ b/modules/38_factor_costs/sticky_feb18/input.gms @@ -15,7 +15,7 @@ s38_depreciation_rate depreciation rate (share of costs) / 0.05 / s38_immobile immobile capital (share) / 1 / ; -parameter f38_fac_req(kcr) Factor requirement costs in 2005 (USD05MER per tDM) +parameter f38_fac_req(kcr) Factor requirement costs in 2005 (USD17MER per tDM) / $ondelim $include "./modules/38_factor_costs/input/f38_fac_req_fao.csv" @@ -23,7 +23,7 @@ $offdelim / ; -parameter f38_fac_req_fao_reg(t_all,i,kcr) Factor requirement costs (USD05MER per tDM) +parameter f38_fac_req_fao_reg(t_all,i,kcr) Factor requirement costs (USD17MER per tDM) / $ondelim $include "./modules/38_factor_costs/input/f38_fac_req_fao_regional.cs4" @@ -39,8 +39,14 @@ $offdelim / ; -table f38_historical_share(t_all,i) Historical capital share +table f38_historical_share(t_all,iso) Historical capital share $ondelim -$include "./modules/38_factor_costs/input/f38_historical_share.csv" +$include "./modules/38_factor_costs/input/f38_historical_share_iso.csv" +$offdelim +; + +table f38_hist_factor_costs(t_all,iso) Historical factor costs for crop and livestock (mio USD17MER) +$ondelim +$include "./modules/38_factor_costs/input/f38_hist_factor_costs_iso.csv" $offdelim ; diff --git a/modules/38_factor_costs/sticky_feb18/input/files b/modules/38_factor_costs/sticky_feb18/input/files index f427961d4b..dbebab811f 100644 --- a/modules/38_factor_costs/sticky_feb18/input/files +++ b/modules/38_factor_costs/sticky_feb18/input/files @@ -1,5 +1,6 @@ * list of files that are required here f38_region_yield.csv -f38_historical_share.csv +f38_historical_share_iso.csv f38_regression_cap_share.csv f38_fac_req_fao.csv +f38_hist_factor_costs_iso.csv diff --git a/modules/38_factor_costs/sticky_feb18/preloop.gms b/modules/38_factor_costs/sticky_feb18/preloop.gms new file mode 100644 index 0000000000..44b1a86f39 --- /dev/null +++ b/modules/38_factor_costs/sticky_feb18/preloop.gms @@ -0,0 +1,19 @@ +*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) +*** | authors, and contributors see CITATION.cff file. This file is part +*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of +*** | AGPL-3.0, you are granted additional permissions described in the +*** | MAgPIE License Exception, version 1.0 (see LICENSE file). +*** | Contact: magpie@pik-potsdam.de + +* calculate capital cost shares from regression +p38_capital_share_calibration(iso) = sum(t_past$(ord(t_past) eq card(t_past)), f38_historical_share(t_past,iso) - (f38_reg_parameters("slope") * + log10(im_gdp_pc_ppp_iso(t_past,iso)) + f38_reg_parameters("intercept"))); + +p38_capital_cost_shares_iso(t,iso)$(m_year(t)<2010) = f38_historical_share(t,iso); +p38_capital_cost_shares_iso(t,iso)$(m_year(t)>=2010) = f38_reg_parameters("slope") * log10(im_gdp_pc_ppp_iso(t,iso)) + f38_reg_parameters("intercept") + p38_capital_share_calibration(iso); + +* aggregate factor cost shares +pm_factor_cost_shares(t,i,"capital") = sum(t_past$(ord(t_past) eq card(t_past)), + sum(i_to_iso(i,iso), f38_hist_factor_costs(t_past,iso) * p38_capital_cost_shares_iso(t,iso)) / + sum(i_to_iso(i,iso), f38_hist_factor_costs(t_past,iso))); +pm_factor_cost_shares(t,i,"labor") = 1 - pm_factor_cost_shares(t,i,"capital"); diff --git a/modules/38_factor_costs/sticky_feb18/presolve.gms b/modules/38_factor_costs/sticky_feb18/presolve.gms index 99eeaa61d3..0691f0e9ad 100644 --- a/modules/38_factor_costs/sticky_feb18/presolve.gms +++ b/modules/38_factor_costs/sticky_feb18/presolve.gms @@ -9,17 +9,6 @@ if (smax(j, pm_labor_prod(t,j)) <> 1 OR smin(j, pm_labor_prod(t,j)) <> 1, abort "This factor cost realization cannot handle labor productivities != 1" ); -p38_share_calibration(i) = f38_historical_share("y2010",i)-(f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso("y2010",iso)))+f38_reg_parameters("intercept")); - -if (m_year(t)<2010, - pm_cost_share_crops(t,i,"capital") = f38_historical_share(t,i); - pm_cost_share_crops(t,i,"labor") = 1 - f38_historical_share(t,i); - -elseif (m_year(t)>=2010), - pm_cost_share_crops(t,i,"capital") = f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso(t,iso)))+f38_reg_parameters("intercept")+p38_share_calibration(i); - pm_cost_share_crops(t,i,"labor") = 1 - pm_cost_share_crops(t,i,"capital"); -); - * choosing between regional (+time dependent) or global (from 2005) factor requirements $if "%c38_fac_req%" == "glo" i38_fac_req(t,i,kcr) = f38_fac_req(kcr); $if "%c38_fac_req%" == "reg" i38_fac_req(t,i,kcr) = f38_fac_req_fao_reg(t,i,kcr); @@ -32,9 +21,9 @@ else i38_fac_req(t,i,kcr) = i38_fac_req(t,i,kcr); ); -p38_labor_need(t,i,kcr) = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"labor"); -p38_capital_need(t,i,kcr,"mobile") = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * (1-s38_immobile); -p38_capital_need(t,i,kcr,"immobile") = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * s38_immobile; +p38_labor_need(t,i,kcr) = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"labor"); +p38_capital_need(t,i,kcr,"mobile") = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * (1-s38_immobile); +p38_capital_need(t,i,kcr,"immobile") = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * s38_immobile; if (ord(t) = 1, diff --git a/modules/38_factor_costs/sticky_feb18/realization.gms b/modules/38_factor_costs/sticky_feb18/realization.gms index 6317ee59a6..3070759e8e 100644 --- a/modules/38_factor_costs/sticky_feb18/realization.gms +++ b/modules/38_factor_costs/sticky_feb18/realization.gms @@ -24,6 +24,7 @@ $Ifi "%phase%" == "declarations" $include "./modules/38_factor_costs/sticky_feb1 $Ifi "%phase%" == "input" $include "./modules/38_factor_costs/sticky_feb18/input.gms" $Ifi "%phase%" == "equations" $include "./modules/38_factor_costs/sticky_feb18/equations.gms" $Ifi "%phase%" == "scaling" $include "./modules/38_factor_costs/sticky_feb18/scaling.gms" +$Ifi "%phase%" == "preloop" $include "./modules/38_factor_costs/sticky_feb18/preloop.gms" $Ifi "%phase%" == "presolve" $include "./modules/38_factor_costs/sticky_feb18/presolve.gms" $Ifi "%phase%" == "postsolve" $include "./modules/38_factor_costs/sticky_feb18/postsolve.gms" *######################## R SECTION END (PHASES) ############################### diff --git a/modules/38_factor_costs/sticky_labor/declarations.gms b/modules/38_factor_costs/sticky_labor/declarations.gms index 61a9dd1ebb..3a1c7a6401 100644 --- a/modules/38_factor_costs/sticky_labor/declarations.gms +++ b/modules/38_factor_costs/sticky_labor/declarations.gms @@ -6,31 +6,32 @@ *** | Contact: magpie@pik-potsdam.de equations - q38_cost_prod_labor(i) Regional labor input costs for crop production (mio USD05MER) - q38_cost_prod_capital(i) Regional capital input costs for crop production (mio USD05MER) - q38_investment_immobile(j,kcr) Cellular immobile investments into farm capital (mio USD05MER) - q38_investment_mobile(j) Cellular mobile investments into farm capital (mio USD05MER) + q38_cost_prod_labor(i) Regional labor input costs for crop production (mio USD17MER) + q38_cost_prod_capital(i) Regional capital input costs for crop production (mio USD17MER) + q38_investment_immobile(j,kcr) Cellular immobile investments into farm capital (mio USD17MER) + q38_investment_mobile(j) Cellular mobile investments into farm capital (mio USD17MER) q38_ces_prodfun(j,kcr) CES production function for one unit of output (1) q38_labor_share_target(j) Enforces minimum labor cost share out of factor costs (1) ; positive variables - vm_cost_prod_crop(i,factors) Regional factor costs of capital and labor for crop production (mio USD05MER per yr) - v38_investment_immobile(j,kcr) Investment costs in immobile farm capital (mio USD05MER per yr) - v38_investment_mobile(j) Investment costs in mobile farm capital (mio USD05MER per yr) + vm_cost_prod_crop(i,factors) Regional factor costs of capital and labor for crop production (mio USD17MER per yr) + v38_investment_immobile(j,kcr) Investment costs in immobile farm capital (mio USD17MER per yr) + v38_investment_mobile(j) Investment costs in mobile farm capital (mio USD17MER per yr) v38_laborhours_need(j,kcr) Labor required per unit of output (hours per ton DM) - v38_capital_need(j,kcr,mobil38) Captial required per unit of output (USD05MER per ton DM) + v38_capital_need(j,kcr,mobil38) Captial required per unit of output (USD17MER per ton DM) v38_relax_CES_lp(j,kcr) Variable to make CES function feasible in linearized model (1) ; parameters - p38_labor_need(t,i,kcr) Labor input costs per unit of output (USD05MER per ton DM) - p38_capital_need(t,i,kcr,mobil38) Capital requirements per unit of output (USD05MER per ton DM) - p38_capital_immobile(t,j,kcr) Preexisting immobile capital stocks before investment (mio USD05MER) - p38_capital_mobile(t,j) Preexisting mobile capital stocks before investment (mio USD05MER) + p38_labor_need(t,i,kcr) Labor input costs per unit of output (USD17MER per ton DM) + p38_capital_need(t,i,kcr,mobil38) Capital requirements per unit of output (USD17MER per ton DM) + p38_capital_immobile(t,j,kcr) Preexisting immobile capital stocks before investment (mio USD17MER) + p38_capital_mobile(t,j) Preexisting mobile capital stocks before investment (mio USD17MER) - pm_cost_share_crops(t,i,factors) Capital and labor shares of the regional factor costs for crop production (1) - p38_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1) + p38_capital_cost_shares_iso(t,iso) Capital shares of factor costs on iso level (1) + p38_capital_share_calibration(iso) Summation factor used to calibrate calculated capital shares with historical values (1) + pm_factor_cost_shares(t,i,factors) Capital and labor shares of factor costs on regional level (1) p38_min_labor_share(t,j) Minimum labor share out of labor plus capital needed (1) p38_croparea_start(j,w,kcr) Agricultural land initialization area (mio. ha) @@ -40,7 +41,7 @@ parameters p38_intr_depr(t,i) Factor from interest and depreciation rate (1) - i38_fac_req(t_all,i,kcr) Factor requirements (USD05MER per tDM) + i38_fac_req(t_all,i,kcr) Factor requirements (USD17MER per tDM) ; scalars @@ -49,16 +50,16 @@ scalars *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_prod_crop(t,i,factors,type) Regional factor costs of capital and labor for crop production (mio USD05MER per yr) - ov38_investment_immobile(t,j,kcr,type) Investment costs in immobile farm capital (mio USD05MER per yr) - ov38_investment_mobile(t,j,type) Investment costs in mobile farm capital (mio USD05MER per yr) + ov_cost_prod_crop(t,i,factors,type) Regional factor costs of capital and labor for crop production (mio USD17MER per yr) + ov38_investment_immobile(t,j,kcr,type) Investment costs in immobile farm capital (mio USD17MER per yr) + ov38_investment_mobile(t,j,type) Investment costs in mobile farm capital (mio USD17MER per yr) ov38_laborhours_need(t,j,kcr,type) Labor required per unit of output (hours per ton DM) - ov38_capital_need(t,j,kcr,mobil38,type) Captial required per unit of output (USD05MER per ton DM) - ov38_relax_CES_lp(t,j,kcr,type) Variable to make CES function feasible in linearized model (1) - oq38_cost_prod_labor(t,i,type) Regional labor input costs for crop production (mio USD05MER) - oq38_cost_prod_capital(t,i,type) Regional capital input costs for crop production (mio USD05MER) - oq38_investment_immobile(t,j,kcr,type) Cellular immobile investments into farm capital (mio USD05MER) - oq38_investment_mobile(t,j,type) Cellular mobile investments into farm capital (mio USD05MER) + ov38_capital_need(t,j,kcr,mobil38,type) Captial required per unit of output (USD17MER per ton DM) + ov38_relax_CES_lp(t,j,kcr,type) Variable to make CES function feasible in linearized model (1) + oq38_cost_prod_labor(t,i,type) Regional labor input costs for crop production (mio USD17MER) + oq38_cost_prod_capital(t,i,type) Regional capital input costs for crop production (mio USD17MER) + oq38_investment_immobile(t,j,kcr,type) Cellular immobile investments into farm capital (mio USD17MER) + oq38_investment_mobile(t,j,type) Cellular mobile investments into farm capital (mio USD17MER) oq38_ces_prodfun(t,j,kcr,type) CES production function for one unit of output (1) oq38_labor_share_target(t,j,type) Enforces minimum labor cost share out of factor costs (1) ; diff --git a/modules/38_factor_costs/sticky_labor/input.gms b/modules/38_factor_costs/sticky_labor/input.gms index f19986da00..1caf2e0472 100644 --- a/modules/38_factor_costs/sticky_labor/input.gms +++ b/modules/38_factor_costs/sticky_labor/input.gms @@ -20,7 +20,7 @@ s38_targetyear_labor_share Year for which the target labor share should be set ( s38_target_fulfillment Share by which a region moves from its baseline labor share towards the target value (1) / 0.5 / ; -parameter f38_fac_req(kcr) Factor requirement costs in 2005 (USD05MER per tDM) +parameter f38_fac_req(kcr) Factor requirement costs in 2005 (USD17MER per tDM) / $ondelim $include "./modules/38_factor_costs/input/f38_fac_req_fao.csv" @@ -28,7 +28,7 @@ $offdelim / ; -parameter f38_fac_req_fao_reg(t_all,i,kcr) Factor requirement costs (USD05MER per tDM) +parameter f38_fac_req_fao_reg(t_all,i,kcr) Factor requirement costs (USD17MER per tDM) / $ondelim $include "./modules/38_factor_costs/input/f38_fac_req_fao_regional.cs4" @@ -44,8 +44,14 @@ $offdelim / ; -table f38_historical_share(t_all,i) Historical capital share +table f38_historical_share(t_all,iso) Historical capital share $ondelim -$include "./modules/38_factor_costs/input/f38_historical_share.csv" +$include "./modules/38_factor_costs/input/f38_historical_share_iso.csv" +$offdelim +; + +table f38_hist_factor_costs(t_all,iso) Historical factor costs for crop and livestock (mio USD17MER) +$ondelim +$include "./modules/38_factor_costs/input/f38_hist_factor_costs_iso.csv" $offdelim ; diff --git a/modules/38_factor_costs/sticky_labor/input/files b/modules/38_factor_costs/sticky_labor/input/files index f427961d4b..dbebab811f 100644 --- a/modules/38_factor_costs/sticky_labor/input/files +++ b/modules/38_factor_costs/sticky_labor/input/files @@ -1,5 +1,6 @@ * list of files that are required here f38_region_yield.csv -f38_historical_share.csv +f38_historical_share_iso.csv f38_regression_cap_share.csv f38_fac_req_fao.csv +f38_hist_factor_costs_iso.csv diff --git a/modules/38_factor_costs/sticky_labor/preloop.gms b/modules/38_factor_costs/sticky_labor/preloop.gms index 8fb3829096..5b5c0d1649 100644 --- a/modules/38_factor_costs/sticky_labor/preloop.gms +++ b/modules/38_factor_costs/sticky_labor/preloop.gms @@ -10,10 +10,15 @@ s38_ces_elast_par = (1/s38_ces_elast_subst) - 1 ; p38_intr_depr(t,i) = (1-s38_depreciation_rate) * pm_interest(t,i)/(1+pm_interest(t,i)) + s38_depreciation_rate; -* calculate labor/capital cost shares from regression -p38_share_calibration(i) = f38_historical_share("y2010",i)-(f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso("y2010",iso)))+f38_reg_parameters("intercept")); +* calculate capital cost shares from regression +p38_capital_share_calibration(iso) = sum(t_past$(ord(t_past) eq card(t_past)), f38_historical_share(t_past,iso) - (f38_reg_parameters("slope") * + log10(im_gdp_pc_ppp_iso(t_past,iso)) + f38_reg_parameters("intercept"))); -pm_cost_share_crops(t,i,"capital")$(m_year(t)<2010) = f38_historical_share(t,i); -pm_cost_share_crops(t,i,"capital")$(m_year(t)>=2010) = f38_reg_parameters("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso(t,iso)))+f38_reg_parameters("intercept")+p38_share_calibration(i); +p38_capital_cost_shares_iso(t,iso)$(m_year(t)<2010) = f38_historical_share(t,iso); +p38_capital_cost_shares_iso(t,iso)$(m_year(t)>=2010) = f38_reg_parameters("slope") * log10(im_gdp_pc_ppp_iso(t,iso)) + f38_reg_parameters("intercept") + p38_capital_share_calibration(iso); -pm_cost_share_crops(t,i,"labor") = 1 - pm_cost_share_crops(t,i,"capital"); +* aggregate factor cost shares +pm_factor_cost_shares(t,i,"capital") = sum(t_past$(ord(t_past) eq card(t_past)), + sum(i_to_iso(i,iso), f38_hist_factor_costs(t_past,iso) * p38_capital_cost_shares_iso(t,iso)) / + sum(i_to_iso(i,iso), f38_hist_factor_costs(t_past,iso))); +pm_factor_cost_shares(t,i,"labor") = 1 - pm_factor_cost_shares(t,i,"capital"); diff --git a/modules/38_factor_costs/sticky_labor/presolve.gms b/modules/38_factor_costs/sticky_labor/presolve.gms index df95ef82ef..9db187bfa6 100644 --- a/modules/38_factor_costs/sticky_labor/presolve.gms +++ b/modules/38_factor_costs/sticky_labor/presolve.gms @@ -17,26 +17,26 @@ else i38_fac_req(t,i,kcr) = i38_fac_req(t,i,kcr); ); -p38_labor_need(t,i,kcr) = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"labor"); -p38_capital_need(t,i,kcr,"mobile") = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * (1-s38_immobile); -p38_capital_need(t,i,kcr,"immobile") = i38_fac_req(t,i,kcr) * pm_cost_share_crops(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * s38_immobile; +p38_labor_need(t,i,kcr) = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"labor"); +p38_capital_need(t,i,kcr,"mobile") = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * (1-s38_immobile); +p38_capital_need(t,i,kcr,"immobile") = i38_fac_req(t,i,kcr) * pm_factor_cost_shares(t,i,"capital") / (pm_interest(t,i)+s38_depreciation_rate) * s38_immobile; * minimum labor share based on target and adjustment factor if (m_year(t) <= s38_startyear_labor_substitution, p38_min_labor_share(t,j) = 0; elseif m_year(t) <= s38_targetyear_labor_share, p38_min_labor_share(t,j) = sum(cell(i,j), - max(pm_cost_share_crops(t,i,"labor"), pm_cost_share_crops(t,i,"labor") + + max(pm_factor_cost_shares(t,i,"labor"), pm_factor_cost_shares(t,i,"labor") + ((m_year(t)-s38_startyear_labor_substitution)/(s38_targetyear_labor_share-s38_startyear_labor_substitution) * (s38_target_fulfillment * (s38_target_labor_share - sum(t2$(m_year(t2) = s38_targetyear_labor_share), - pm_cost_share_crops(t2,i,"labor"))))))); + pm_factor_cost_shares(t2,i,"labor"))))))); else p38_min_labor_share(t,j)$(sum(t2$(m_year(t2) = s38_targetyear_labor_share), - sum(cell(i,j), pm_cost_share_crops(t2,i,"labor"))) <= s38_target_labor_share) + sum(cell(i,j), pm_factor_cost_shares(t2,i,"labor"))) <= s38_target_labor_share) = sum(t2$(m_year(t2) = s38_targetyear_labor_share), p38_min_labor_share(t2,j)); p38_min_labor_share(t,j)$(sum(t2$(m_year(t2) = s38_targetyear_labor_share), - sum(cell(i,j), pm_cost_share_crops(t2,i,"labor"))) > s38_target_labor_share) - = max(sum(cell(i,j), pm_cost_share_crops(t,i,"labor")), s38_target_labor_share); + sum(cell(i,j), pm_factor_cost_shares(t2,i,"labor"))) > s38_target_labor_share) + = max(sum(cell(i,j), pm_factor_cost_shares(t,i,"labor")), s38_target_labor_share); ); * overwrite with 0 in case target labor share is 0 (i.e. off) diff --git a/modules/38_factor_costs/sticky_labor/scaling.gms b/modules/38_factor_costs/sticky_labor/scaling.gms index d4602db9fe..27fd45cc58 100644 --- a/modules/38_factor_costs/sticky_labor/scaling.gms +++ b/modules/38_factor_costs/sticky_labor/scaling.gms @@ -5,4 +5,6 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -vm_cost_prod_crop.scale(i,factors) = 10e4; +vm_cost_prod_crop.scale(i,factors) = 10e5; +v38_investment_immobile.scale(j,kcr) = 10e3; +v38_capital_need.scale(j,kcr,mobil38) = 10e3; diff --git a/modules/39_landconversion/calib/declarations.gms b/modules/39_landconversion/calib/declarations.gms index 0e083ba71b..aab3f9d382 100644 --- a/modules/39_landconversion/calib/declarations.gms +++ b/modules/39_landconversion/calib/declarations.gms @@ -6,22 +6,22 @@ *** | Contact: magpie@pik-potsdam.de equations - q39_cost_landcon(j,land) Calculation of cellular landconversion costs (mio. USD05MER per yr) + q39_cost_landcon(j,land) Calculation of cellular landconversion costs (mio. USD17MER per yr) ; variables - vm_cost_landcon(j,land) Costs for land expansion and reduction (mio. USD05MER per yr) + vm_cost_landcon(j,land) Costs for land expansion and reduction (mio. USD17MER per yr) ; parameters - i39_cost_establish(t,i,land) Land expansion costs (USD05MER per hectare) - i39_reward_reduction(t,i,land) Reward for land reduction (USD05MER per hectare) + i39_cost_establish(t,i,land) Land expansion costs (USD17MER per hectare) + i39_reward_reduction(t,i,land) Reward for land reduction (USD17MER per hectare) i39_calib(t,i,type39) Calibration factor for costs of cropland expansion and rewards for cropland reduction (1) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_landcon(t,j,land,type) Costs for land expansion and reduction (mio. USD05MER per yr) - oq39_cost_landcon(t,j,land,type) Calculation of cellular landconversion costs (mio. USD05MER per yr) + ov_cost_landcon(t,j,land,type) Costs for land expansion and reduction (mio. USD17MER per yr) + oq39_cost_landcon(t,j,land,type) Calculation of cellular landconversion costs (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/39_landconversion/calib/input.gms b/modules/39_landconversion/calib/input.gms index 2c1e0e0493..3846fa87ae 100644 --- a/modules/39_landconversion/calib/input.gms +++ b/modules/39_landconversion/calib/input.gms @@ -6,11 +6,11 @@ *** | Contact: magpie@pik-potsdam.de scalars - s39_cost_establish_crop Cost for cropland expansion before calibration (USD05MER per hectare) / 10000 / - s39_reward_crop_reduction Reward for cropland reduction before calibration (USD05MER per hectare) / 6000 / - s39_cost_establish_past Cost for pasture land expansion (USD05MER per hectare) / 8000 / - s39_cost_establish_forestry Cost for foresty land expansion (USD05MER per hectare) / 1000 / - s39_cost_establish_urban Cost for urban land expansion (USD05MER per hectare) / 10000 / + s39_cost_establish_crop Cost for cropland expansion before calibration (USD17MER per hectare) / 12300 / + s39_reward_crop_reduction Reward for cropland reduction before calibration (USD17MER per hectare) / 7380 / + s39_cost_establish_past Cost for pasture land expansion (USD17MER per hectare) / 9840 / + s39_cost_establish_forestry Cost for foresty land expansion (USD17MER per hectare) / 1230 / + s39_cost_establish_urban Cost for urban land expansion (USD17MER per hectare) / 12300 / s39_ignore_calib Switch for ignoring calibration factors (1) / 0 / ; diff --git a/modules/40_transport/gtap_nov12/declarations.gms b/modules/40_transport/gtap_nov12/declarations.gms index e6fd78ef46..b701c8730d 100644 --- a/modules/40_transport/gtap_nov12/declarations.gms +++ b/modules/40_transport/gtap_nov12/declarations.gms @@ -6,16 +6,16 @@ *** | Contact: magpie@pik-potsdam.de equation -q40_cost_transport(j,k) Cellular transport costs for k (mio. USD05MER per yr) +q40_cost_transport(j,k) Cellular transport costs for k (mio. USD17MER per yr) ; variables - vm_cost_transp(j,k) Transportation costs (mio. USD05MER per yr) + vm_cost_transp(j,k) Transportation costs (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_transp(t,j,k,type) Transportation costs (mio. USD05MER per yr) - oq40_cost_transport(t,j,k,type) Cellular transport costs for k (mio. USD05MER per yr) + ov_cost_transp(t,j,k,type) Transportation costs (mio. USD17MER per yr) + oq40_cost_transport(t,j,k,type) Cellular transport costs for k (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/40_transport/gtap_nov12/input.gms b/modules/40_transport/gtap_nov12/input.gms index 1839f20fc1..e52e0eec26 100644 --- a/modules/40_transport/gtap_nov12/input.gms +++ b/modules/40_transport/gtap_nov12/input.gms @@ -7,7 +7,7 @@ scalars - s40_pasture_transport_costs Transport costs for pasture (USD05MER per tDM per min) / 0 / + s40_pasture_transport_costs Transport costs for pasture (USD17MER per tDM per min) / 0 / ; @@ -20,7 +20,7 @@ $offdelim / ; -parameter f40_transport_costs(kall) Relative transport costs (USD05MER per tDM per min) +parameter f40_transport_costs(kall) Relative transport costs (USD17MER per tDM per min) / $ondelim $include "./modules/40_transport/gtap_nov12/input/f40_transport_costs.csv" diff --git a/modules/40_transport/off/declarations.gms b/modules/40_transport/off/declarations.gms index 16668b9512..8a2e5b87f8 100644 --- a/modules/40_transport/off/declarations.gms +++ b/modules/40_transport/off/declarations.gms @@ -7,11 +7,11 @@ variables - vm_cost_transp(j,k) Transportation costs (mio. USD05MER) + vm_cost_transp(j,k) Transportation costs (mio. USD17MER) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_transp(t,j,k,type) Transportation costs (mio. USD05MER) + ov_cost_transp(t,j,k,type) Transportation costs (mio. USD17MER) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/41_area_equipped_for_irrigation/endo_apr13/declarations.gms b/modules/41_area_equipped_for_irrigation/endo_apr13/declarations.gms index 54e955eca7..16584f9f33 100644 --- a/modules/41_area_equipped_for_irrigation/endo_apr13/declarations.gms +++ b/modules/41_area_equipped_for_irrigation/endo_apr13/declarations.gms @@ -8,11 +8,11 @@ parameters p41_AEI_start(t,j) Area equipped for irrigation at the beginning of each time step (mio. ha) pc41_AEI_start(j) Area equipped for irrigation at the beginning of current time step (mio. ha) - pc41_unitcost_AEI(i) Unit cost of AEI expansion (USD04MER per ha) + pc41_unitcost_AEI(i) Unit cost of AEI expansion (USD17MER per ha) ; variables - vm_cost_AEI(i) Annuitized irrigation expansion costs (mio. USD04MER per yr) + vm_cost_AEI(i) Annuitized irrigation expansion costs (mio. USD17MER per yr) ; positive variables @@ -21,14 +21,14 @@ positive variables equations q41_area_irrig(j) Irrigation area constraint (mio. ha) - q41_cost_AEI(i) Calculation of costs of irrigation area expansion (mio. USD04MER) + q41_cost_AEI(i) Calculation of costs of irrigation area expansion (mio. USD17MER) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_AEI(t,i,type) Annuitized irrigation expansion costs (mio. USD04MER per yr) + ov_cost_AEI(t,i,type) Annuitized irrigation expansion costs (mio. USD17MER per yr) ov_AEI(t,j,type) Area equipped for irrigation in each grid cell (mio. ha) oq41_area_irrig(t,j,type) Irrigation area constraint (mio. ha) - oq41_cost_AEI(t,i,type) Calculation of costs of irrigation area expansion (mio. USD04MER) + oq41_cost_AEI(t,i,type) Calculation of costs of irrigation area expansion (mio. USD17MER) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/41_area_equipped_for_irrigation/endo_apr13/input.gms b/modules/41_area_equipped_for_irrigation/endo_apr13/input.gms index de669f4257..33c1d8281a 100644 --- a/modules/41_area_equipped_for_irrigation/endo_apr13/input.gms +++ b/modules/41_area_equipped_for_irrigation/endo_apr13/input.gms @@ -8,10 +8,10 @@ $setglobal c41_initial_irrigation_area LUH2v2 scalars -s41_AEI_depreciation Depreciation rate in capital value of irrigation infrastructure (USD05PPP per USD05PPP) / 0 / +s41_AEI_depreciation Depreciation rate in capital value of irrigation infrastructure (USD17PPP per USD17PPP) / 0 / ; -table f41_c_irrig(t_all,i) Irrigation investment costs (USD04MER per ha) +table f41_c_irrig(t_all,i) Irrigation investment costs (USD17MER per ha) $ondelim $include "./modules/41_area_equipped_for_irrigation/endo_apr13/input/f41_c_irrig.csv" $offdelim diff --git a/modules/41_area_equipped_for_irrigation/static/declarations.gms b/modules/41_area_equipped_for_irrigation/static/declarations.gms index 02bab0eb4d..221448d797 100644 --- a/modules/41_area_equipped_for_irrigation/static/declarations.gms +++ b/modules/41_area_equipped_for_irrigation/static/declarations.gms @@ -6,7 +6,7 @@ *** | Contact: magpie@pik-potsdam.de variables - vm_cost_AEI(i) Irrigation expansion costs (mio. USD04MER) + vm_cost_AEI(i) Irrigation expansion costs (mio. USD17MER) ; positive variables @@ -19,7 +19,7 @@ equations *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_AEI(t,i,type) Irrigation expansion costs (mio. USD04MER) + ov_cost_AEI(t,i,type) Irrigation expansion costs (mio. USD17MER) ov_AEI(t,j,type) Area equipped for irrigation in each grid cell (mio. ha) oq41_area_irrig(t,j,type) Irrigation area constraint (mio. ha) ; diff --git a/modules/42_water_demand/agr_sector_aug13/declarations.gms b/modules/42_water_demand/agr_sector_aug13/declarations.gms index c4a2326d97..b2de51776b 100644 --- a/modules/42_water_demand/agr_sector_aug13/declarations.gms +++ b/modules/42_water_demand/agr_sector_aug13/declarations.gms @@ -14,29 +14,29 @@ parameters i42_env_flow_policy(t,i) Determines whether environmental flow protection is enforced (1) p42_efp(t_all,scen42) Determines whether environmental flow protection is enforced and its fading in of environmental flow policy (1) p42_efp_fader(t_all) Determines the fading in of environmental flow policy (1) - p42_country_dummy(iso) Dummy parameter indicating whether country is affected by EFP (1) + p42_country_switch(iso) Switch indicating whether country is affected by EFP (1) p42_EFP_region_shr(t_all,i) Weighted share of region with regards to EFP (1) - ic42_pumping_cost(i) Parameter to capture values for pumping costs in a particular time step (USD05MER per m^3) + ic42_pumping_cost(i) Parameter to capture values for pumping costs in a particular time step (USD17MER per m^3) i42_watdem_total(t,j,watdem_ineldo,wtype) Non-agricultural water demand for entire year used in post-processing (mio. m^3 per yr) ; equations q42_water_demand(wat_dem,j) Water withdrawals of different sectors (mio. m^3 per yr) - q42_water_cost(i) Total cost of pumping irrigation water (USD05MER per yr) + q42_water_cost(i) Total cost of pumping irrigation water (USD17MER per yr) ; positive variables vm_watdem(wat_dem,j) Water demand from different sectors (mio. m^3 per yr) v42_irrig_eff(j) Irrigation efficiency (1) - vm_water_cost(i) Cost of irrigation water (USD05MER per m^3) + vm_water_cost(i) Cost of irrigation water (USD17MER per m^3) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov_watdem(t,wat_dem,j,type) Water demand from different sectors (mio. m^3 per yr) ov42_irrig_eff(t,j,type) Irrigation efficiency (1) - ov_water_cost(t,i,type) Cost of irrigation water (USD05MER per m^3) + ov_water_cost(t,i,type) Cost of irrigation water (USD17MER per m^3) oq42_water_demand(t,wat_dem,j,type) Water withdrawals of different sectors (mio. m^3 per yr) - oq42_water_cost(t,i,type) Total cost of pumping irrigation water (USD05MER per yr) + oq42_water_cost(t,i,type) Total cost of pumping irrigation water (USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/42_water_demand/agr_sector_aug13/input.gms b/modules/42_water_demand/agr_sector_aug13/input.gms index 30d9b37dfc..61ff52999b 100644 --- a/modules/42_water_demand/agr_sector_aug13/input.gms +++ b/modules/42_water_demand/agr_sector_aug13/input.gms @@ -109,7 +109,7 @@ sets * Costs of pumping are calculated for India as per methodology in forthcoming paper by Singh et.al. parameter -f42_pumping_cost(t_all,i) Cost of pumping irrigation water (USD05MER per m^3) +f42_pumping_cost(t_all,i) Cost of pumping irrigation water (USD17MER per m^3) / $ondelim $include "./modules/42_water_demand/input/f42_pumping_cost.cs4" diff --git a/modules/42_water_demand/agr_sector_aug13/presolve.gms b/modules/42_water_demand/agr_sector_aug13/presolve.gms index 42b824cdad..b99925d4a7 100644 --- a/modules/42_water_demand/agr_sector_aug13/presolve.gms +++ b/modules/42_water_demand/agr_sector_aug13/presolve.gms @@ -45,12 +45,12 @@ i42_watdem_total(t,j,"manufacturing","withdrawal") = sum(wat_src, im_wat_avail(t * Country switch to determine countries for which EFP holds. * In the default case, the EFP affects all countries when activated. -p42_country_dummy(iso) = 0; -p42_country_dummy(EFP_countries) = 1; +p42_country_switch(iso) = 0; +p42_country_switch(EFP_countries) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by their population size. -p42_EFP_region_shr(t_all,i) = sum(i_to_iso(i,iso), p42_country_dummy(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); +p42_EFP_region_shr(t_all,i) = sum(i_to_iso(i,iso), p42_country_switch(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); * Environmental policy switch: $ifthen "%c42_env_flow_policy%" == "mixed" diff --git a/modules/42_water_demand/all_sectors_aug13/declarations.gms b/modules/42_water_demand/all_sectors_aug13/declarations.gms index e94a089e6a..9dddf95d94 100644 --- a/modules/42_water_demand/all_sectors_aug13/declarations.gms +++ b/modules/42_water_demand/all_sectors_aug13/declarations.gms @@ -14,29 +14,29 @@ parameters i42_env_flow_policy(t,i) Determines whether environmental flow protection is enforced (1) p42_efp(t_all,scen42) Determines whether environmental flow protection is enforced and its fading in of environmental flow policy (1) p42_efp_fader(t_all) Determines the fading in of environmental flow policy (1) - p42_country_dummy(iso) Dummy parameter indicating whether country is affected by EFP (1) + p42_country_switch(iso) Switch indicating whether country is affected by EFP (1) p42_EFP_region_shr(t_all,i) Weighted share of region with regards to EFP (1) - ic42_pumping_cost(i) Parameter to capture values for pumping costs in a particular time step (USD05MER per m^3) + ic42_pumping_cost(i) Parameter to capture values for pumping costs in a particular time step (USD17MER per m^3) i42_watdem_total(t,j,watdem_ineldo,wtype) Non-agricultural water demand for entire year used in post-processing (mio. m^3 per yr) ; equations q42_water_demand(wat_dem,j) Water withdrawals of different sectors (mio. m^3 per yr) - q42_water_cost(i) Total cost of pumping irrigation water (USD05MER per yr) + q42_water_cost(i) Total cost of pumping irrigation water (USD17MER per yr) ; positive variables vm_watdem(wat_dem,j) Amount of water needed in different sectors (mio. m^3 per yr) v42_irrig_eff(j) Irrigation efficiency (1) - vm_water_cost(i) Cost of irrigation water (USD05MER per m^3) + vm_water_cost(i) Cost of irrigation water (USD17MER per m^3) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov_watdem(t,wat_dem,j,type) Amount of water needed in different sectors (mio. m^3 per yr) ov42_irrig_eff(t,j,type) Irrigation efficiency (1) - ov_water_cost(t,i,type) Cost of irrigation water (USD05MER per m^3) + ov_water_cost(t,i,type) Cost of irrigation water (USD17MER per m^3) oq42_water_demand(t,wat_dem,j,type) Water withdrawals of different sectors (mio. m^3 per yr) - oq42_water_cost(t,i,type) Total cost of pumping irrigation water (USD05MER per yr) + oq42_water_cost(t,i,type) Total cost of pumping irrigation water (USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/42_water_demand/all_sectors_aug13/input.gms b/modules/42_water_demand/all_sectors_aug13/input.gms index ba297acdfd..6f370d255d 100644 --- a/modules/42_water_demand/all_sectors_aug13/input.gms +++ b/modules/42_water_demand/all_sectors_aug13/input.gms @@ -123,7 +123,7 @@ $setglobal c42_env_flow_policy off * Costs of pumping are calculated for India as per methodology in forthcoming paper by Singh et.al. parameter -f42_pumping_cost(t_all,i) Cost of pumping irrigation water (USD05MER per m^3) +f42_pumping_cost(t_all,i) Cost of pumping irrigation water (USD17MER per m^3) / $ondelim $include "./modules/42_water_demand/input/f42_pumping_cost.cs4" diff --git a/modules/42_water_demand/all_sectors_aug13/presolve.gms b/modules/42_water_demand/all_sectors_aug13/presolve.gms index db3266e241..ea02be6521 100644 --- a/modules/42_water_demand/all_sectors_aug13/presolve.gms +++ b/modules/42_water_demand/all_sectors_aug13/presolve.gms @@ -66,12 +66,12 @@ Elseif (s42_env_flow_scenario = 1), * Country switch to determine countries for which EFP holds. * In the default case, the EFP affects all countries when activated. -p42_country_dummy(iso) = 0; -p42_country_dummy(EFP_countries) = 1; +p42_country_switch(iso) = 0; +p42_country_switch(EFP_countries) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by their population size. -p42_EFP_region_shr(t_all,i) = sum(i_to_iso(i,iso), p42_country_dummy(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); +p42_EFP_region_shr(t_all,i) = sum(i_to_iso(i,iso), p42_country_switch(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); * Environmental policy switch: $ifthen "%c42_env_flow_policy%" == "mixed" diff --git a/modules/44_biodiversity/bii_target/declarations.gms b/modules/44_biodiversity/bii_target/declarations.gms index feea2001ee..7f4552e059 100644 --- a/modules/44_biodiversity/bii_target/declarations.gms +++ b/modules/44_biodiversity/bii_target/declarations.gms @@ -7,34 +7,36 @@ positive variables - vm_cost_bv_loss(j) Biodiversity cost (mio USD) - vm_bv(j,landcover44,potnatveg) Biodiversity stock for all land cover classes (Mha) - v44_bii(i,biome44) Biodiversity Intactness Index BII (1) - v44_bii_missing(i,biome44) Missing BII increase for compliance with BII target (1) + vm_cost_bv_loss(j) Biodiversity cost (mio USD17MER) + vm_bv(j,landcover44,potnatveg) Biodiversity stock for all land cover classes (Mha) + v44_bii(i,biome44) Biodiversity Intactness Index BII (1) + v44_bii_missing(i,biome44) Missing BII increase for compliance with BII target (1) ; parameters - p44_bii_lower_bound(t,i,biome44) Interpolated lower bound for BII over time (1) + p44_bii_lower_bound(t,i,biome44) Interpolated lower bound for BII over time (1) p44_start_value(i,biome44) Start value for BII lower bound (1) p44_target_value(i,biome44) Target value for BII lower bound (1) + i44_biome_share(j,biome44) Share of biome type in each spatial unit (1) + i44_biome_area_reg(i,biome44) Area of range-rarity weighted biome type in each region (mio. ha) ; equations - q44_bii(i,biome44) Biodiversity Intactness Index BII (1) - q44_bii_target(i,biome44) Missing BII increase for compliance with BII target (1) - q44_cost(i) Biodiversity cost (mio USD) + q44_bii(i,biome44) Biodiversity Intactness Index BII (1) + q44_bii_target(i,biome44) Missing BII increase for compliance with BII target (1) + q44_cost(i) Biodiversity cost (mio USD17MER) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_bv_loss(t,j,type) Biodiversity cost (mio USD) + ov_cost_bv_loss(t,j,type) Biodiversity cost (mio USD17MER) ov_bv(t,j,landcover44,potnatveg,type) Biodiversity stock for all land cover classes (Mha) ov44_bii(t,i,biome44,type) Biodiversity Intactness Index BII (1) ov44_bii_missing(t,i,biome44,type) Missing BII increase for compliance with BII target (1) oq44_bii(t,i,biome44,type) Biodiversity Intactness Index BII (1) oq44_bii_target(t,i,biome44,type) Missing BII increase for compliance with BII target (1) - oq44_cost(t,i,type) Biodiversity cost (mio USD) + oq44_cost(t,i,type) Biodiversity cost (mio USD17MER) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/44_biodiversity/bii_target/equations.gms b/modules/44_biodiversity/bii_target/equations.gms index cc753571e8..d372e2a7c3 100644 --- a/modules/44_biodiversity/bii_target/equations.gms +++ b/modules/44_biodiversity/bii_target/equations.gms @@ -10,14 +10,16 @@ *' 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)) > 1e-10) .. v44_bii(i2,biome44) * sum((cell(i2,j2),land), pcm_land(j2,land) * f44_biome(j2,biome44)) + q44_bii(i2,biome44)$(i44_biome_area_reg(i2,biome44) > 0) .. + v44_bii(i2,biome44) =e= - sum((cell(i2,j2),potnatveg,landcover44), vm_bv(j2,landcover44,potnatveg) * f44_biome(j2,biome44)); + sum((cell(i2,j2),potnatveg,landcover44), vm_bv(j2,landcover44,potnatveg) * i44_biome_share(j2,biome44)) + / i44_biome_area_reg(i2,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)) > 1e-10) .. + q44_bii_target(i2,biome44)$(i44_biome_area_reg(i2,biome44) > 0) .. 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. diff --git a/modules/44_biodiversity/bii_target/input.gms b/modules/44_biodiversity/bii_target/input.gms index 26deafacfd..65f4f864ee 100644 --- a/modules/44_biodiversity/bii_target/input.gms +++ b/modules/44_biodiversity/bii_target/input.gms @@ -6,11 +6,11 @@ *** | Contact: magpie@pik-potsdam.de scalars - s44_bii_lower_bound Lower bound for BII (1) / 0 / + s44_bii_lower_bound Lower bound for BII (1) / 0 / c44_bii_decrease Implementation of lower bound for BII (binary) / 1 / s44_target_year Year in which the BII lower bound is reached (1) / 2100 / s44_start_year Start year for interpolation towards BII lower bound (1) / 2025 / - s44_cost_bii_missing Technical costs for missing BII increase (USD per unit of BII) / 1e+06 / + s44_cost_bii_missing Technical costs for missing BII increase (USD17MER per unit of BII) / 1e+06 / ; @@ -20,7 +20,7 @@ $include "./modules/44_biodiversity/bii_target/input/f44_bii_coeff.cs3" $offdelim ; -table f44_biome(j,biome44) Share of biome type in each spatial unit (1) +table f44_biome_area(j,biome44) Area of biome type in each spatial unit (mio. ha) $ondelim $include "./modules/44_biodiversity/bii_target/input/biorealm_biome.cs3" $offdelim diff --git a/modules/44_biodiversity/bii_target/preloop.gms b/modules/44_biodiversity/bii_target/preloop.gms index e14172dca5..962ffcaea1 100644 --- a/modules/44_biodiversity/bii_target/preloop.gms +++ b/modules/44_biodiversity/bii_target/preloop.gms @@ -5,10 +5,12 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -v44_bii.l(i,biome44) = 0.75; +* Calculate biome share +i44_biome_share(j,biome44) = + (f44_biome_area(j,biome44) + 1e-10) / sum(biome44_2, f44_biome_area(j,biome44_2) + 1e-10); -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; +* Set i44_biome_area_reg +i44_biome_area_reg(i,biome44) = + sum((cell(i,j),land), pcm_land(j,land) * i44_biome_share(j,biome44)); -vm_bv.l(j,landcover44,potnatveg) = 0; +p44_bii_lower_bound(t,i,biome44) = 0; diff --git a/modules/44_biodiversity/bii_target/presolve.gms b/modules/44_biodiversity/bii_target/presolve.gms index de414061ef..edca9fc629 100644 --- a/modules/44_biodiversity/bii_target/presolve.gms +++ b/modules/44_biodiversity/bii_target/presolve.gms @@ -5,6 +5,20 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de +* Update v44_bii.l based on vm_bv.l +loop(i, + loop(biome44, + if(i44_biome_area_reg(i,biome44) <= 0, + v44_bii.fx(i,biome44) = 0; + v44_bii_missing.fx(i,biome44) = 0; + else + v44_bii.l(i,biome44) = + sum((cell(i,j),potnatveg,landcover44), vm_bv.l(j,landcover44,potnatveg) * i44_biome_share(j,biome44)) + / i44_biome_area_reg(i,biome44); + ); + ); +); + * The start value for the linear interpolation is the BII at biome level in the start year. p44_start_value(i,biome44)$(m_year(t) = s44_start_year) = v44_bii.l(i,biome44); * The target value for the linear interpolation is the lower bound defined in `s44_bii_lower_bound`. @@ -17,13 +31,13 @@ else p44_bii_lower_bound(t2,i,biome44) = p44_start_value(i,biome44) + ((m_year(t2) - s44_start_year) / (s44_target_year - s44_start_year)) * (p44_target_value(i,biome44) - p44_start_value(i,biome44)); p44_bii_lower_bound(t2,i,biome44)$(m_year(t2) > s44_target_year) = p44_target_value(i,biome44); if(c44_bii_decrease = 0, - p44_bii_lower_bound(t2,i,biome44)$(v44_bii.l(i,biome44) >= p44_target_value(i,biome44)) = v44_bii.l(i,biome44); + p44_bii_lower_bound(t,i,biome44)$(v44_bii.l(i,biome44) >= p44_target_value(i,biome44)) = v44_bii.l(i,biome44); elseif c44_bii_decrease = 1, - p44_bii_lower_bound(t2,i,biome44)$(v44_bii.l(i,biome44) >= p44_target_value(i,biome44)) = p44_target_value(i,biome44); + p44_bii_lower_bound(t,i,biome44)$(v44_bii.l(i,biome44) >= p44_target_value(i,biome44)) = p44_target_value(i,biome44); ); - p44_bii_lower_bound(t2,i,biome44)$(p44_bii_lower_bound(t2,i,biome44) >= 1) = 1; - p44_bii_lower_bound(t2,i,biome44)$(m_year(t2) < s44_start_year) = 0; - p44_bii_lower_bound(t2,i,biome44)$(sum(cell(i,j), f44_biome(j,biome44)) = 0) = 0; + p44_bii_lower_bound(t,i,biome44)$(p44_bii_lower_bound(t,i,biome44) >= 1) = 1; + p44_bii_lower_bound(t,i,biome44)$(m_year(t) < s44_start_year) = 0; + p44_bii_lower_bound(t,i,biome44)$(i44_biome_area_reg(i,biome44) <= 0) = 0; * The lower bound of `v44_bii` is set to `p44_bii_lower_bound` to avoid a reduction of BII in combination with `v44_bii_missing`. v44_bii.lo(i,biome44) = p44_bii_lower_bound(t,i,biome44); display p44_bii_lower_bound; diff --git a/modules/44_biodiversity/bii_target/sets.gms b/modules/44_biodiversity/bii_target/sets.gms index fb93906e40..69751ecef9 100644 --- a/modules/44_biodiversity/bii_target/sets.gms +++ b/modules/44_biodiversity/bii_target/sets.gms @@ -30,3 +30,5 @@ sets OC1,OC2,OC7,NT3,NT4,NT7,NT8,NT10,NT12,NT13,NT14,PA11,PA12,PA13,NA5,PA1,PA4,PA5,PA6, PA8,PA9,PA10,AN99,AT98,NA2,NA6,NA7,NA12,NA99,PA98,PA99,AA12,AA13 / ; + +alias(biome44,biome44_2); diff --git a/modules/44_biodiversity/bii_target_apr24/declarations.gms b/modules/44_biodiversity/bii_target_apr24/declarations.gms index 419d24471c..12eb55056c 100644 --- a/modules/44_biodiversity/bii_target_apr24/declarations.gms +++ b/modules/44_biodiversity/bii_target_apr24/declarations.gms @@ -7,34 +7,36 @@ positive variables - vm_cost_bv_loss(j) Biodiversity cost (mio USD) - vm_bv(j,landcover44,potnatveg) Biodiversity stock for all land cover classes (Mha) - v44_bii(i,biome44) Biodiversity Intactness Index BII (1) + vm_cost_bv_loss(j) Biodiversity cost (mio USD17MER) + vm_bv(j,landcover44,potnatveg) Biodiversity stock for all land cover classes (Mha) + v44_bii(i,biome44) Biodiversity Intactness Index BII (1) v44_bii_missing(i,biome44) Missing BII increase for compliance with BII target (1) ; parameters - p44_bii_lower_bound(t,i,biome44) Interpolated lower bound for BII over time (1) + p44_bii_lower_bound(t,i,biome44) Interpolated lower bound for BII over time (1) p44_start_value(i,biome44) Start value for BII lower bound (1) p44_target_value(i,biome44) Target value for BII lower bound (1) + i44_biome_share(j,biome44) Share of biome type in each spatial unit (1) + i44_biome_area_reg(i,biome44) Area of range-rarity weighted biome type in each region (mio. ha) ; equations - q44_bii(i,biome44) Biodiversity Intactness Index BII (1) - q44_bii_target(i,biome44) Missing BII increase for compliance with BII target (1) - q44_cost(i) Biodiversity cost (mio USD) + q44_bii(i,biome44) Biodiversity Intactness Index BII (1) + q44_bii_target(i,biome44) Missing BII increase for compliance with BII target (1) + q44_cost(i) Biodiversity cost (mio USD17MER) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_bv_loss(t,j,type) Biodiversity cost (mio USD) + ov_cost_bv_loss(t,j,type) Biodiversity cost (mio USD17MER) ov_bv(t,j,landcover44,potnatveg,type) Biodiversity stock for all land cover classes (Mha) ov44_bii(t,i,biome44,type) Biodiversity Intactness Index BII (1) ov44_bii_missing(t,i,biome44,type) Missing BII increase for compliance with BII target (1) oq44_bii(t,i,biome44,type) Biodiversity Intactness Index BII (1) oq44_bii_target(t,i,biome44,type) Missing BII increase for compliance with BII target (1) - oq44_cost(t,i,type) Biodiversity cost (mio USD) + oq44_cost(t,i,type) Biodiversity cost (mio USD17MER) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/44_biodiversity/bii_target_apr24/equations.gms b/modules/44_biodiversity/bii_target_apr24/equations.gms index b7fdc1ea1d..19c78350ce 100644 --- a/modules/44_biodiversity/bii_target_apr24/equations.gms +++ b/modules/44_biodiversity/bii_target_apr24/equations.gms @@ -11,14 +11,16 @@ *' Biodiversity stock weighted by range-rarity restoration prioritization layer (`f44_rr_layer`) *' 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)$(i44_biome_area_reg(i2,biome44) > 0) .. + v44_bii(i2,biome44) =e= - (sum((cell(i2,j2),potnatveg,landcover44), vm_bv(j2,landcover44,potnatveg) * f44_rr_layer(j2) * f44_biome(j2,biome44)) / sum((cell(i2,j2),land), pcm_land(j2,land) * f44_rr_layer(j2) * f44_biome(j2,biome44))); + sum((cell(i2,j2),potnatveg,landcover44), vm_bv(j2,landcover44,potnatveg) * f44_rr_layer(j2) * i44_biome_share(j2,biome44)) + / i44_biome_area_reg(i2,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)$(i44_biome_area_reg(i2,biome44) > 0) .. 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. diff --git a/modules/44_biodiversity/bii_target_apr24/input.gms b/modules/44_biodiversity/bii_target_apr24/input.gms index f5d19800c5..042c3e03fb 100644 --- a/modules/44_biodiversity/bii_target_apr24/input.gms +++ b/modules/44_biodiversity/bii_target_apr24/input.gms @@ -6,11 +6,11 @@ *** | Contact: magpie@pik-potsdam.de scalars - s44_bii_lower_bound Lower bound for BII (1) / 0 / + s44_bii_lower_bound Lower bound for BII (1) / 0 / c44_bii_decrease Implementation of lower bound for BII (binary) / 1 / s44_target_year Year in which the BII lower bound is reached (1) / 2100 / s44_start_year Start year for interpolation towards BII lower bound (1) / 2025 / - s44_cost_bii_missing Technical costs for missing BII increase (USD per unit of BII) / 1e+06 / + s44_cost_bii_missing Technical costs for missing BII increase (USD17MER per unit of BII) / 1e+06 / ; @@ -20,7 +20,7 @@ $include "./modules/44_biodiversity/bii_target_apr24/input/f44_bii_coeff.cs3" $offdelim ; -table f44_biome(j,biome44) Share of biome type in each spatial unit (1) +table f44_biome_area(j,biome44) Area of biome type in each spatial unit (mio. ha) $ondelim $include "./modules/44_biodiversity/bii_target_apr24/input/biorealm_biome.cs3" $offdelim diff --git a/modules/44_biodiversity/bii_target_apr24/preloop.gms b/modules/44_biodiversity/bii_target_apr24/preloop.gms index 2c6494fe74..f296466db2 100644 --- a/modules/44_biodiversity/bii_target_apr24/preloop.gms +++ b/modules/44_biodiversity/bii_target_apr24/preloop.gms @@ -5,10 +5,12 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -v44_bii.l(i,biome44) = 0.75; +* Calculate biome share +i44_biome_share(j,biome44) = + (f44_biome_area(j,biome44) + 1e-10) / sum(biome44_2, f44_biome_area(j,biome44_2) + 1e-10); -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; -p44_bii_lower_bound(t,i,biome44) = 0; +* Set i44_biome_area_reg +i44_biome_area_reg(i,biome44) = + sum((cell(i,j),land), pcm_land(j,land) * f44_rr_layer(j) * i44_biome_share(j,biome44)); -vm_bv.l(j,landcover44,potnatveg) = 0; +p44_bii_lower_bound(t,i,biome44) = 0; diff --git a/modules/44_biodiversity/bii_target_apr24/presolve.gms b/modules/44_biodiversity/bii_target_apr24/presolve.gms index 0a45321b2a..f9cd49db45 100644 --- a/modules/44_biodiversity/bii_target_apr24/presolve.gms +++ b/modules/44_biodiversity/bii_target_apr24/presolve.gms @@ -5,6 +5,20 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de +* Update v44_bii.l based on vm_bv.l +loop(i, + loop(biome44, + if(i44_biome_area_reg(i,biome44) <= 0, + v44_bii.fx(i,biome44) = 0; + v44_bii_missing.fx(i,biome44) = 0; + else + v44_bii.l(i,biome44) = + sum((cell(i,j),potnatveg,landcover44), vm_bv.l(j,landcover44,potnatveg) * f44_rr_layer(j) * i44_biome_share(j,biome44)) + / i44_biome_area_reg(i,biome44); + ); + ); +); + * The start value for the linear interpolation is the BII at biome level in the start year. p44_start_value(i,biome44)$(m_year(t) = s44_start_year) = v44_bii.l(i,biome44); * The target value for the linear interpolation is the lower bound defined in `s44_bii_lower_bound`. @@ -17,14 +31,15 @@ else p44_bii_lower_bound(t2,i,biome44) = p44_start_value(i,biome44) + ((m_year(t2) - s44_start_year) / (s44_target_year - s44_start_year)) * (p44_target_value(i,biome44) - p44_start_value(i,biome44)); p44_bii_lower_bound(t2,i,biome44)$(m_year(t2) > s44_target_year) = p44_target_value(i,biome44); if(c44_bii_decrease = 0, - p44_bii_lower_bound(t2,i,biome44)$(v44_bii.l(i,biome44) >= p44_target_value(i,biome44)) = v44_bii.l(i,biome44); + p44_bii_lower_bound(t,i,biome44)$(v44_bii.l(i,biome44) >= p44_target_value(i,biome44)) = v44_bii.l(i,biome44); elseif c44_bii_decrease = 1, - p44_bii_lower_bound(t2,i,biome44)$(v44_bii.l(i,biome44) >= p44_target_value(i,biome44)) = p44_target_value(i,biome44); + p44_bii_lower_bound(t,i,biome44)$(v44_bii.l(i,biome44) >= p44_target_value(i,biome44)) = p44_target_value(i,biome44); ); - p44_bii_lower_bound(t2,i,biome44)$(p44_bii_lower_bound(t2,i,biome44) >= 1) = 1; - p44_bii_lower_bound(t2,i,biome44)$(m_year(t2) < s44_start_year) = 0; - p44_bii_lower_bound(t2,i,biome44)$(sum(cell(i,j), f44_biome(j,biome44)) = 0) = 0; + p44_bii_lower_bound(t,i,biome44)$(p44_bii_lower_bound(t,i,biome44) >= 1) = 1; + p44_bii_lower_bound(t,i,biome44)$(m_year(t) < s44_start_year) = 0; + p44_bii_lower_bound(t,i,biome44)$(i44_biome_area_reg(i,biome44) <= 0) = 0; * The lower bound of `v44_bii` is set to `p44_bii_lower_bound` to avoid a reduction of BII in combination with `v44_bii_missing`. v44_bii.lo(i,biome44) = p44_bii_lower_bound(t,i,biome44); display p44_bii_lower_bound; ); + diff --git a/modules/44_biodiversity/bii_target_apr24/sets.gms b/modules/44_biodiversity/bii_target_apr24/sets.gms index c4e1566ef6..4e19d2313d 100644 --- a/modules/44_biodiversity/bii_target_apr24/sets.gms +++ b/modules/44_biodiversity/bii_target_apr24/sets.gms @@ -30,3 +30,5 @@ sets OC1,OC2,OC7,NT3,NT4,NT7,NT8,NT10,NT12,NT13,NT14,PA11,PA12,PA13,NA5,PA1,PA4,PA5,PA6, PA8,PA9,PA10,AN99,AT98,NA2,NA6,NA7,NA12,NA99,PA98,PA99,AA12,AA13 / ; + +alias(biome44,biome44_2); diff --git a/modules/44_biodiversity/bv_btc_mar21/declarations.gms b/modules/44_biodiversity/bv_btc_mar21/declarations.gms index 5f6df38c0d..8863193b89 100644 --- a/modules/44_biodiversity/bv_btc_mar21/declarations.gms +++ b/modules/44_biodiversity/bv_btc_mar21/declarations.gms @@ -6,12 +6,13 @@ *** | Contact: magpie@pik-potsdam.de parameters - p44_price_bv_loss(t_all) Price (subsidy) for biodiversity stock loss (gain) (USD per ha) + p44_price_bv_loss(t_all) Price (subsidy) for biodiversity stock loss (gain) (USD17MER per ha) + pc44_bv_weighted(j) Range-rarity weighted biodiversity stock (Mha) ; variables v44_bv_loss(j) Change in biodiversity stock (Mha per year) - vm_cost_bv_loss(j) Biodiversity cost (mio USD) + vm_cost_bv_loss(j) Biodiversity cost (mio USD17MER) ; positive variables @@ -22,19 +23,19 @@ positive variables equations q44_bv_loss(j) Change in biodiversity stock (Mha per year) q44_bv_weighted(j) Range-rarity weighted biodiversity stock (Mha) - q44_cost_bv_loss(j) Cost of biodiversity loss (mio USD) + q44_cost_bv_loss(j) Cost of biodiversity loss (mio USD17MER) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov44_bv_loss(t,j,type) Change in biodiversity stock (Mha per year) - ov_cost_bv_loss(t,j,type) Biodiversity cost (mio USD) + ov_cost_bv_loss(t,j,type) Biodiversity cost (mio USD17MER) ov_bv(t,j,landcover44,potnatveg,type) Biodiversity stock for all land cover classes (Mha) ov44_bv_weighted(t,j,type) Range-rarity weighted biodiversity stock (Mha) oq44_bv_loss(t,j,type) Change in biodiversity stock (Mha per year) oq44_bv_weighted(t,j,type) Range-rarity weighted biodiversity stock (Mha) - oq44_cost_bv_loss(t,j,type) Cost of biodiversity loss (mio USD) + oq44_cost_bv_loss(t,j,type) Cost of biodiversity loss (mio USD17MER) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/44_biodiversity/bv_btc_mar21/equations.gms b/modules/44_biodiversity/bv_btc_mar21/equations.gms index 9e63f8b295..c035c49c5c 100644 --- a/modules/44_biodiversity/bv_btc_mar21/equations.gms +++ b/modules/44_biodiversity/bv_btc_mar21/equations.gms @@ -15,7 +15,7 @@ *' Change in biodiversity stock compared to previous time step, divided by time step length. q44_bv_loss(j2) .. v44_bv_loss(j2) =e= - (v44_bv_weighted.l(j2) - v44_bv_weighted(j2))/m_timestep_length; + (pc44_bv_weighted(j2) - v44_bv_weighted(j2))/m_timestep_length; *' Biodiversity stock weighted by range-rarity restoration prioritization layer (`f44_rr_layer`) q44_bv_weighted(j2) .. v44_bv_weighted(j2) diff --git a/modules/44_biodiversity/bv_btc_mar21/input.gms b/modules/44_biodiversity/bv_btc_mar21/input.gms index 66046b9a37..5336cf271b 100644 --- a/modules/44_biodiversity/bv_btc_mar21/input.gms +++ b/modules/44_biodiversity/bv_btc_mar21/input.gms @@ -8,8 +8,8 @@ scalars s44_start_year Start year of biodiversity price (1) / 2025 / s44_target_year Target year of biodiversity price (1) / 2100 / - s44_start_price Price for biodiversity stock loss in start year (USD per ha) / 0 / - s44_target_price Price for biodiversity stock loss in target year (USD per ha) / 0 / + s44_start_price Price for biodiversity stock loss in start year (USD17MER per ha) / 0 / + s44_target_price Price for biodiversity stock loss in target year (USD17MER per ha) / 0 / ; table fm_bii_coeff(bii_class44,potnatveg) Biodiversity Intactness Index coefficients (unitless) diff --git a/modules/44_biodiversity/bv_btc_mar21/postsolve.gms b/modules/44_biodiversity/bv_btc_mar21/postsolve.gms index 33256efc86..b800f0ff71 100644 --- a/modules/44_biodiversity/bv_btc_mar21/postsolve.gms +++ b/modules/44_biodiversity/bv_btc_mar21/postsolve.gms @@ -5,6 +5,8 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de +pc44_bv_weighted(j) = v44_bv_weighted.l(j) + *#################### R SECTION START (OUTPUT DEFINITIONS) ##################### ov44_bv_loss(t,j,"marginal") = v44_bv_loss.m(j); ov_cost_bv_loss(t,j,"marginal") = vm_cost_bv_loss.m(j); diff --git a/modules/44_biodiversity/bv_btc_mar21/preloop.gms b/modules/44_biodiversity/bv_btc_mar21/preloop.gms index fdf1d31b12..7606b7d46d 100644 --- a/modules/44_biodiversity/bv_btc_mar21/preloop.gms +++ b/modules/44_biodiversity/bv_btc_mar21/preloop.gms @@ -5,7 +5,7 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -v44_bv_weighted.l(j) = 0.3; +pc44_bv_weighted(j) = 0.3; m_linear_time_interpol(p44_price_bv_loss,s44_start_year,s44_target_year,s44_start_price,s44_target_price); p44_price_bv_loss(t_all)$(m_year(t_all) < s44_start_year) = 0; display p44_price_bv_loss; diff --git a/modules/50_nr_soil_budget/macceff_aug22/declarations.gms b/modules/50_nr_soil_budget/macceff_aug22/declarations.gms index a4b41a4606..80f59176aa 100644 --- a/modules/50_nr_soil_budget/macceff_aug22/declarations.gms +++ b/modules/50_nr_soil_budget/macceff_aug22/declarations.gms @@ -8,7 +8,7 @@ positive variables vm_nr_inorg_fert_reg(i,land_ag) Inorganic fertilizer application (Tg N per yr) - vm_nr_inorg_fert_costs(i) Cost of inorganic fertilizers (mio. USD05MER per yr) + vm_nr_inorg_fert_costs(i) Cost of inorganic fertilizers (mio. USD17MER per yr) vm_nr_eff(i) Cropland nutrient uptake efficiency (Tg N per yr) vm_nr_eff_pasture(i) Pasture nutrient uptake efficiency (Tg N per yr) v50_nr_inputs(i) Total inputs to croplands (Tg N per yr) @@ -21,7 +21,7 @@ positive variables ; equations - q50_nr_cost_fert(i) Fertilizer costs (mio. USD05MER per yr) + q50_nr_cost_fert(i) Fertilizer costs (mio. USD17MER per yr) q50_nr_bal_crp(i) Cropland nutrient inputs have to equal withdrawals and losses (Tg N per yr) q50_nr_withdrawals(i,kcr) Calculating nr withdrawals (Tg N per yr) q50_nr_inputs(i) Calculating nr withdrawals (Tg N per yr) @@ -36,8 +36,8 @@ equations parameters i50_atmospheric_deposition_rates(t,j,land) Atmospheric deposition rate (t N per ha) * country-specific scenario switch - p50_country_dummy_cropneff(iso) Dummy parameter indicating whether country is affected by crop neff scenario (1) - p50_country_dummy_pastneff(iso) Dummy parameter indicating whether country is affected by pasture neff scenario (1) + p50_country_switch_cropneff(iso) Switch indicating whether country is affected by crop neff scenario (1) + p50_country_switch_pastneff(iso) Switch indicating whether country is affected by pasture neff scenario (1) p50_cropneff_region_shr(t,i) Weighted share of region with regards to crop neff scenario of countries (1) p50_pastneff_region_shr(t,i) Weighted share of region with regards to pasture neff scenario of countries (1) i50_nr_eff_bau(t_all,i) Business as usual soil nitrogen uptake efficiency before MACCs mitigation (1) @@ -49,7 +49,7 @@ parameters *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov_nr_inorg_fert_reg(t,i,land_ag,type) Inorganic fertilizer application (Tg N per yr) - ov_nr_inorg_fert_costs(t,i,type) Cost of inorganic fertilizers (mio. USD05MER per yr) + ov_nr_inorg_fert_costs(t,i,type) Cost of inorganic fertilizers (mio. USD17MER per yr) ov_nr_eff(t,i,type) Cropland nutrient uptake efficiency (Tg N per yr) ov_nr_eff_pasture(t,i,type) Pasture nutrient uptake efficiency (Tg N per yr) ov50_nr_inputs(t,i,type) Total inputs to croplands (Tg N per yr) @@ -59,7 +59,7 @@ parameters ov50_nr_withdrawals_pasture(t,i,type) Withdrawals of Nr from pasture soils (Tg N per yr) ov50_nr_surplus_pasture(t,i,type) Total Nr surplus on pasture soils (Tg N per yr) ov50_nr_deposition(t,i,land,type) Atmospheric deposition (Tg N per yr) - oq50_nr_cost_fert(t,i,type) Fertilizer costs (mio. USD05MER per yr) + oq50_nr_cost_fert(t,i,type) Fertilizer costs (mio. USD17MER per yr) oq50_nr_bal_crp(t,i,type) Cropland nutrient inputs have to equal withdrawals and losses (Tg N per yr) oq50_nr_withdrawals(t,i,kcr,type) Calculating nr withdrawals (Tg N per yr) oq50_nr_inputs(t,i,type) Calculating nr withdrawals (Tg N per yr) diff --git a/modules/50_nr_soil_budget/macceff_aug22/input.gms b/modules/50_nr_soil_budget/macceff_aug22/input.gms index 6f36b439c9..68bc8f50eb 100644 --- a/modules/50_nr_soil_budget/macceff_aug22/input.gms +++ b/modules/50_nr_soil_budget/macceff_aug22/input.gms @@ -26,7 +26,7 @@ $setglobal c50_dep_scen history * options: history scalar - s50_fertilizer_costs Costs of fertilizer (USD05MER per tN) / 600 / + s50_fertilizer_costs Costs of fertilizer (USD17MER per tN) / 738 / s50_maccs_global_ef Do maccs assume global emission factor (binary) /1/ s50_maccs_implicit_nue_glo Global nitrogen use efficiency implicit to MACCs /0.5/ ; diff --git a/modules/50_nr_soil_budget/macceff_aug22/preloop.gms b/modules/50_nr_soil_budget/macceff_aug22/preloop.gms index bd7819097a..6b6249fd23 100644 --- a/modules/50_nr_soil_budget/macceff_aug22/preloop.gms +++ b/modules/50_nr_soil_budget/macceff_aug22/preloop.gms @@ -10,15 +10,15 @@ * Country switches to determine countries for which chosen Neff scenario * shall be applied. * In the default case, the scenarios affects all countries when activated. -p50_country_dummy_cropneff(iso) = 0; -p50_country_dummy_cropneff(cropneff_countries) = 1; -p50_country_dummy_pastneff(iso) = 0; -p50_country_dummy_pastneff(pastneff_countries) = 1; +p50_country_switch_cropneff(iso) = 0; +p50_country_switch_cropneff(cropneff_countries) = 1; +p50_country_switch_pastneff(iso) = 0; +p50_country_switch_pastneff(pastneff_countries) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by their population size. -p50_cropneff_region_shr(t,i) = sum(i_to_iso(i,iso), p50_country_dummy_cropneff(iso) * im_pop_iso(t,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t,iso)); -p50_pastneff_region_shr(t,i) = sum(i_to_iso(i,iso), p50_country_dummy_pastneff(iso) * im_pop_iso(t,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t,iso)); +p50_cropneff_region_shr(t,i) = sum(i_to_iso(i,iso), p50_country_switch_cropneff(iso) * im_pop_iso(t,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t,iso)); +p50_pastneff_region_shr(t,i) = sum(i_to_iso(i,iso), p50_country_switch_pastneff(iso) * im_pop_iso(t,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t,iso)); * Nitrogen use efficiency loop(t, diff --git a/modules/52_carbon/normal_dec17/equations.gms b/modules/52_carbon/normal_dec17/equations.gms index af3515e047..056d6bfbd4 100644 --- a/modules/52_carbon/normal_dec17/equations.gms +++ b/modules/52_carbon/normal_dec17/equations.gms @@ -16,4 +16,4 @@ q52_emis_co2_actual(i2,emis_oneoff) .. vm_emissions_reg(i2,emis_oneoff,"co2_c") =e= sum((cell(i2,j2),emis_land(emis_oneoff,land,c_pools)), - (vm_carbon_stock.l(j2,land,c_pools,"actual") - vm_carbon_stock(j2,land,c_pools,"actual"))/m_timestep_length); + (pcm_carbon_stock(j2,land,c_pools,"actual") - vm_carbon_stock(j2,land,c_pools,"actual"))/m_timestep_length); diff --git a/modules/54_phosphorus/off/declarations.gms b/modules/54_phosphorus/off/declarations.gms index 92e20738f7..95fdfadbd0 100644 --- a/modules/54_phosphorus/off/declarations.gms +++ b/modules/54_phosphorus/off/declarations.gms @@ -7,11 +7,11 @@ variables - vm_p_fert_costs(i) costs for mineral fertilizers (mio. USD05MER per yr) + vm_p_fert_costs(i) costs for mineral fertilizers (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_p_fert_costs(t,i,type) costs for mineral fertilizers (mio. USD05MER per yr) + ov_p_fert_costs(t,i,type) costs for mineral fertilizers (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/55_awms/ipcc2006_aug16/declarations.gms b/modules/55_awms/ipcc2006_aug16/declarations.gms index cc9ac5258e..26c8af2ced 100644 --- a/modules/55_awms/ipcc2006_aug16/declarations.gms +++ b/modules/55_awms/ipcc2006_aug16/declarations.gms @@ -11,7 +11,7 @@ parameters ic55_manure_fuel_shr(i,kli) Share of manure excreted on pastures used for fuel (tNr per tNr) ic55_awms_shr(i,kli,awms_conf) Share of manure Nr managed in each animal waste management systems (tNr per tNr) p55_region_shr(t_all,i) AWM scenario share of the region (1) - p55_country_dummy(iso) Dummy parameter indicating whether country is affected by selected awm scenario (1) + p55_country_switch(iso) Switch indicating whether country is affected by selected awm scenario (1) ; diff --git a/modules/55_awms/ipcc2006_aug16/presolve.gms b/modules/55_awms/ipcc2006_aug16/presolve.gms index ef9510280e..5b041fb51a 100644 --- a/modules/55_awms/ipcc2006_aug16/presolve.gms +++ b/modules/55_awms/ipcc2006_aug16/presolve.gms @@ -8,12 +8,12 @@ ****** Region price share for awm scenario of selective countries: * Country switch to determine countries for which awm scenario shall be applied. * In the default case, the awm scenario affects all countries when activated. -p55_country_dummy(iso) = 0; -p55_country_dummy(scen_countries55) = 1; +p55_country_switch(iso) = 0; +p55_country_switch(scen_countries55) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by their population size. -p55_region_shr(t_all,i) = sum(i_to_iso(i,iso), p55_country_dummy(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); +p55_region_shr(t_all,i) = sum(i_to_iso(i,iso), p55_country_switch(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); if(m_year(t) <= sm_fix_SSP2, diff --git a/modules/56_ghg_policy/price_aug22/declarations.gms b/modules/56_ghg_policy/price_aug22/declarations.gms index 70e98e4264..b5963fd3c8 100644 --- a/modules/56_ghg_policy/price_aug22/declarations.gms +++ b/modules/56_ghg_policy/price_aug22/declarations.gms @@ -6,24 +6,25 @@ *** | Contact: magpie@pik-potsdam.de parameters - im_pollutant_prices(t_all,i,pollutants,emis_source) Certificate prices for N2O-N CH4 CO2-C used in the model (USD05MER per Mg) - p56_pollutant_prices_input(t_all,i,pollutants,emis_source) Certificate prices for N2O-N CH4 CO2-C from input files (USD05MER per Mg) - p56_c_price_aff(t_all,i,ac) C price used for afforestation decision-making (USD05MER per tC) + im_pollutant_prices(t_all,i,pollutants,emis_source) Certificate prices for N2O-N CH4 CO2-C used in the model (USD17MER per Mg) + p56_pollutant_prices_input(t_all,i,pollutants,emis_source) Certificate prices for N2O-N CH4 CO2-C from input files (USD17MER per Mg) + p56_c_price_aff(t_all,i,ac) C price used for afforestation decision-making (USD17MER per tC) pc56_c_price_induced_aff Helper for fixing C price driven afforestation to zero for historic time steps (binary) p56_region_price_shr(t_all,i) GHG price share of the region (1) - p56_country_dummy(iso) Dummy parameter indicating whether country is affected by selected GHG policy (1) + p56_country_switch(iso) Switch indicating whether country is affected by selected GHG policy (1) p56_region_fader_shr(t_all,i) GHG policy fader share of the region (1) - p56_country_dummy2(iso) Dummy parameter indicating whether country is affected by selected GHG policy fader (1) + p56_country_switch2(iso) Switch indicating whether country is affected by selected GHG policy fader (1) p56_fader(t_all) GHG policy fader (1) p56_fader_reg(t_all,i) Regional GHG policy fader (1) + pcm_carbon_stock(j,land,c_pools,stockType) Carbon stock in vegetation soil and litter for different land types (mio. tC) ; equations - q56_emission_costs(i) Calculation of total emission costs (mio. USD05MER per yr) - q56_emission_cost_annual(i,emis_annual) Calculation of regional costs for annual emissions (mio. USD05MER per yr) - q56_emission_cost_oneoff(i,emis_oneoff) Calculation of regional costs for emissions occuring only once in time (mio. USD05MER per yr) - q56_reward_cdr_aff_reg(i) Regional revenues for carbon captured by afforestation (mio. USD05MER per yr) - q56_reward_cdr_aff(j) Cellular revenues for carbon captured by afforestation (mio. USD05MER per yr) + q56_emission_costs(i) Calculation of total emission costs (mio. USD17MER per yr) + q56_emission_cost_annual(i,emis_annual) Calculation of regional costs for annual emissions (mio. USD17MER per yr) + q56_emission_cost_oneoff(i,emis_oneoff) Calculation of regional costs for emissions occuring only once in time (mio. USD17MER per yr) + q56_reward_cdr_aff_reg(i) Regional revenues for carbon captured by afforestation (mio. USD17MER per yr) + q56_reward_cdr_aff(j) Cellular revenues for carbon captured by afforestation (mio. USD17MER per yr) q56_emis_pricing(i,pollutants,emis_source) Calculation of annual CO2 emissions for pricing (Tg per yr) q56_emis_pricing_co2(i,emis_oneoff) Calculation of annual CO2 emissions for pricing (Tg per yr) ; @@ -34,28 +35,28 @@ positive variables variables - vm_emission_costs(i) Costs for emission rights for pollutants and greenhouse gases (mio. USD05MER per yr) + vm_emission_costs(i) Costs for emission rights for pollutants and greenhouse gases (mio. USD17MER per yr) vm_emissions_reg(i,emis_source,pollutants) Regional emissions by source and gas after technical mitigation N CH4 C (Tg per yr) v56_emis_pricing(i,emis_source,pollutants) Regional emissions by source and gas after technical mitigation N CH4 C (Tg per yr) - v56_emission_cost(i,emis_source) GHG emissions cost (mio. USD05MER per yr) - vm_reward_cdr_aff(i) Regional average annual expected revenue from afforestation (mio. USD05MER per yr) - v56_reward_cdr_aff(j) Cellular average annual expected revenue from afforestation (mio. USD05MER per yr) + v56_emission_cost(i,emis_source) GHG emissions cost (mio. USD17MER per yr) + vm_reward_cdr_aff(i) Regional average annual expected revenue from afforestation (mio. USD17MER per yr) + v56_reward_cdr_aff(j) Cellular average annual expected revenue from afforestation (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov_carbon_stock(t,j,land,c_pools,stockType,type) Carbon stock in vegetation soil and litter for different land types (mio. tC) - ov_emission_costs(t,i,type) Costs for emission rights for pollutants and greenhouse gases (mio. USD05MER per yr) + ov_emission_costs(t,i,type) Costs for emission rights for pollutants and greenhouse gases (mio. USD17MER per yr) ov_emissions_reg(t,i,emis_source,pollutants,type) Regional emissions by source and gas after technical mitigation N CH4 C (Tg per yr) ov56_emis_pricing(t,i,emis_source,pollutants,type) Regional emissions by source and gas after technical mitigation N CH4 C (Tg per yr) - ov56_emission_cost(t,i,emis_source,type) GHG emissions cost (mio. USD05MER per yr) - ov_reward_cdr_aff(t,i,type) Regional average annual expected revenue from afforestation (mio. USD05MER per yr) - ov56_reward_cdr_aff(t,j,type) Cellular average annual expected revenue from afforestation (mio. USD05MER per yr) - oq56_emission_costs(t,i,type) Calculation of total emission costs (mio. USD05MER per yr) - oq56_emission_cost_annual(t,i,emis_annual,type) Calculation of regional costs for annual emissions (mio. USD05MER per yr) - oq56_emission_cost_oneoff(t,i,emis_oneoff,type) Calculation of regional costs for emissions occuring only once in time (mio. USD05MER per yr) - oq56_reward_cdr_aff_reg(t,i,type) Regional revenues for carbon captured by afforestation (mio. USD05MER per yr) - oq56_reward_cdr_aff(t,j,type) Cellular revenues for carbon captured by afforestation (mio. USD05MER per yr) + ov56_emission_cost(t,i,emis_source,type) GHG emissions cost (mio. USD17MER per yr) + ov_reward_cdr_aff(t,i,type) Regional average annual expected revenue from afforestation (mio. USD17MER per yr) + ov56_reward_cdr_aff(t,j,type) Cellular average annual expected revenue from afforestation (mio. USD17MER per yr) + oq56_emission_costs(t,i,type) Calculation of total emission costs (mio. USD17MER per yr) + oq56_emission_cost_annual(t,i,emis_annual,type) Calculation of regional costs for annual emissions (mio. USD17MER per yr) + oq56_emission_cost_oneoff(t,i,emis_oneoff,type) Calculation of regional costs for emissions occuring only once in time (mio. USD17MER per yr) + oq56_reward_cdr_aff_reg(t,i,type) Regional revenues for carbon captured by afforestation (mio. USD17MER per yr) + oq56_reward_cdr_aff(t,j,type) Cellular revenues for carbon captured by afforestation (mio. USD17MER per yr) oq56_emis_pricing(t,i,pollutants,emis_source,type) Calculation of annual CO2 emissions for pricing (Tg per yr) oq56_emis_pricing_co2(t,i,emis_oneoff,type) Calculation of annual CO2 emissions for pricing (Tg per yr) ; diff --git a/modules/56_ghg_policy/price_aug22/equations.gms b/modules/56_ghg_policy/price_aug22/equations.gms index 00555e1d33..97bf20ea22 100644 --- a/modules/56_ghg_policy/price_aug22/equations.gms +++ b/modules/56_ghg_policy/price_aug22/equations.gms @@ -19,7 +19,7 @@ q56_emis_pricing_co2(i2,emis_oneoff) .. v56_emis_pricing(i2,emis_oneoff,"co2_c") =e= sum((cell(i2,j2),emis_land(emis_oneoff,land,c_pools)), - (vm_carbon_stock.l(j2,land,c_pools,"actual") - vm_carbon_stock(j2,land,c_pools,"%c56_carbon_stock_pricing%"))/m_timestep_length); + (pcm_carbon_stock(j2,land,c_pools,"actual") - vm_carbon_stock(j2,land,c_pools,"%c56_carbon_stock_pricing%"))/m_timestep_length); *** Emission costs diff --git a/modules/56_ghg_policy/price_aug22/input.gms b/modules/56_ghg_policy/price_aug22/input.gms index 004c68d53a..b2a8398df1 100644 --- a/modules/56_ghg_policy/price_aug22/input.gms +++ b/modules/56_ghg_policy/price_aug22/input.gms @@ -67,9 +67,9 @@ pollutants_fader(pollutants) pollutants affected by GHG policy fader / co2_c, ch ; scalars - s56_limit_ch4_n2o_price Upper limit for CH4 and N2O GHG prices (USD05MER per tC) / 4000 / + s56_limit_ch4_n2o_price Upper limit for CH4 and N2O GHG prices (USD17MER per tC) / 4920 / s56_cprice_red_factor Reduction factor for CO2 price (-) / 1 / - s56_minimum_cprice Minium C price for future time steps (USD per tC) / 0 / + s56_minimum_cprice Minium C price for future time steps (USD17MER per tC) / 0 / s56_ghgprice_devstate_scaling Switch for scaling GHG price with development state (1=on 0=off) / 0 / s56_c_price_induced_aff Switch for C price driven re-afforestation (1=on 0=off) / 1 / s56_c_price_exp_aff Time horizon of CO2 price expectation for re-afforestation (years) / 50 / @@ -78,7 +78,7 @@ scalars s56_timesteps Number of time steps for C price interpolation (1) / 0 / s56_offset Helper for C price interpolation (1) / 0 / s56_ghgprice_fader Switch for GHG policy fader (1=on 0=off) / 0 / - s56_fader_start Start year of GHG policy fade-in (1) / 2030 / + s56_fader_start Start year of GHG policy fade-in (1) / 2025 / s56_fader_end End year of GHG policy fade-in (1) / 2050 / s56_fader_target Target value of GHG policy fade-in in end year / 1 / s56_fader_functional_form Switch for functional form of GHG policy fader (1=linear 2=sigmoid) / 1 / @@ -93,19 +93,19 @@ $setglobal c56_mute_ghgprices_until y2030 $setglobal c56_carbon_stock_pricing actualNoAcEst * options: actual, actualNoAcEst -table f56_pollutant_prices(t_all,i,pollutants,ghgscen56) GHG certificate prices for N2O-N CH4 CO2-C (USD05MER per t) +table f56_pollutant_prices(t_all,i,pollutants,ghgscen56) GHG certificate prices for N2O-N CH4 CO2-C (USD17MER per t) $ondelim $include "./modules/56_ghg_policy/input/f56_pollutant_prices.cs3" $offdelim ; -$if "%c56_pollutant_prices%" == "coupling" table f56_pollutant_prices_coupling(t_all,i,pollutants) Regional ghg certificate prices for N2O-N CH4 CO2-C (USD05MER per t) +$if "%c56_pollutant_prices%" == "coupling" table f56_pollutant_prices_coupling(t_all,i,pollutants) Regional ghg certificate prices for N2O-N CH4 CO2-C (USD17MER per t) $if "%c56_pollutant_prices%" == "coupling" $ondelim $if "%c56_pollutant_prices%" == "coupling" $include "./modules/56_ghg_policy/input/f56_pollutant_prices_coupling.cs3" $if "%c56_pollutant_prices%" == "coupling" $offdelim $if "%c56_pollutant_prices%" == "coupling" ; -$if "%c56_pollutant_prices%" == "emulator" table f56_pollutant_prices_emulator(t_all,i,pollutants) Global ghg certificate prices for N2O-N CH4 CO2-C (USD05MER per t) +$if "%c56_pollutant_prices%" == "emulator" table f56_pollutant_prices_emulator(t_all,i,pollutants) Global ghg certificate prices for N2O-N CH4 CO2-C (USD17MER per t) $if "%c56_pollutant_prices%" == "emulator" $ondelim $if "%c56_pollutant_prices%" == "emulator" $include "./modules/56_ghg_policy/input/f56_pollutant_prices_emulator.cs3" $if "%c56_pollutant_prices%" == "emulator" $offdelim diff --git a/modules/56_ghg_policy/price_aug22/postsolve.gms b/modules/56_ghg_policy/price_aug22/postsolve.gms index f17662cdce..a1a4a4a9ce 100644 --- a/modules/56_ghg_policy/price_aug22/postsolve.gms +++ b/modules/56_ghg_policy/price_aug22/postsolve.gms @@ -5,6 +5,8 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de +pcm_carbon_stock(j,land,ag_pools,stockType) = vm_carbon_stock.l(j,land,ag_pools,stockType); + *#################### R SECTION START (OUTPUT DEFINITIONS) ##################### ov_carbon_stock(t,j,land,c_pools,stockType,"marginal") = vm_carbon_stock.m(j,land,c_pools,stockType); ov_emission_costs(t,i,"marginal") = vm_emission_costs.m(i); diff --git a/modules/56_ghg_policy/price_aug22/preloop.gms b/modules/56_ghg_policy/price_aug22/preloop.gms index 9d0f6d8887..3922e0cca3 100644 --- a/modules/56_ghg_policy/price_aug22/preloop.gms +++ b/modules/56_ghg_policy/price_aug22/preloop.gms @@ -7,29 +7,30 @@ * starting value of above ground carbon stocks 1995 is only an estimate. * ATTENTION: emissions in 1995 are not meaningful -vm_carbon_stock.l(j,land,ag_pools,stockType) = fm_carbon_density("y1995",j,land,ag_pools)*pcm_land(j,land); +pcm_carbon_stock(j,land,ag_pools,stockType) = fm_carbon_density("y1995",j,land,ag_pools)*pcm_land(j,land); +vm_carbon_stock.l(j,land,ag_pools,stockType) = pcm_carbon_stock(j,land,ag_pools,stockType); v56_emis_pricing.fx(i,emis_oneoff,pollutants)$(not sameas(pollutants,"co2_c")) = 0; ****** Region price share for ghg policy of selective countries: * Country switch to determine countries for which ghg policy shall be applied. * In the default case, the ghg policy affects all countries when activated. -p56_country_dummy(iso) = 0; -p56_country_dummy(policy_countries56) = 1; +p56_country_switch(iso) = 0; +p56_country_switch(policy_countries56) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by their population size. -p56_region_price_shr(t_all,i) = sum(i_to_iso(i,iso), p56_country_dummy(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); +p56_region_price_shr(t_all,i) = sum(i_to_iso(i,iso), p56_country_switch(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); ****** Regional fader share for ghg policy fader of selective countries: * Country switch to determine countries for which ghg policy fader shall be applied. * In the default case, the ghg policy fader affects all countries when activated. -p56_country_dummy2(iso) = 0; -p56_country_dummy2(fader_countries56) = 1; +p56_country_switch2(iso) = 0; +p56_country_switch2(fader_countries56) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by their population size. -p56_region_fader_shr(t_all,i) = sum(i_to_iso(i,iso), p56_country_dummy2(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); +p56_region_fader_shr(t_all,i) = sum(i_to_iso(i,iso), p56_country_switch2(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); ****select ghg prices $ifthen "%c56_pollutant_prices%" == "coupling" @@ -54,9 +55,9 @@ im_pollutant_prices(t_all,i,pollutants,emis_source)$(m_year(t_all) > sm_fix_SSP2 im_pollutant_prices(t_all,i,"co2_c",emis_source)$(m_year(t_all) > sm_fix_SSP2 AND m_year(t_all) <= m_year("%c56_mute_ghgprices_until%")) = s56_minimum_cprice; ***limit CH4 and N2O GHG prices based on s56_limit_ch4_n2o_price -*12/44 conversion from USD per tC to USD per tCO2 -*28 and 265 Global Warming Potentials from AR5 WG1 CH08 Table 8.7, conversion from USD per tCO2 to USD per tCH4 and USD per tN2O -*44/28 conversion from USD per tN2O to USD per tN +*12/44 conversion from USD17MER per tC to USD17MER per tCO2 +*28 and 265 Global Warming Potentials from AR5 WG1 CH08 Table 8.7, conversion from USD17MER per tCO2 to USD17MER per tCH4 and USD17MER per tN2O +*44/28 conversion from USD17MER per tN2O to USD17MER per tN im_pollutant_prices(t_all,i,"ch4",emis_source)$(im_pollutant_prices(t_all,i,"ch4",emis_source) > s56_limit_ch4_n2o_price*12/44*28) = s56_limit_ch4_n2o_price*12/44*28; im_pollutant_prices(t_all,i,"n2o_n_direct",emis_source)$(im_pollutant_prices(t_all,i,"n2o_n_direct",emis_source) > s56_limit_ch4_n2o_price*12/44*265*44/28) = s56_limit_ch4_n2o_price*12/44*265*44/28; im_pollutant_prices(t_all,i,"n2o_n_indirect",emis_source)$(im_pollutant_prices(t_all,i,"n2o_n_indirect",emis_source) > s56_limit_ch4_n2o_price*12/44*265*44/28) = s56_limit_ch4_n2o_price*12/44*265*44/28; @@ -69,9 +70,9 @@ im_pollutant_prices(t_all,i,"co2_c",emis_source) = im_pollutant_prices(t_all,i," im_pollutant_prices(t_all,i,pollutants,emis_source)$(s56_ghgprice_devstate_scaling = 1) = im_pollutant_prices(t_all,i,pollutants,emis_source)*im_development_state(t_all,i); if (s56_fader_functional_form = 1, - m_linear_time_interpol(p56_fader,s56_fader_start,s56_fader_target,0,s56_fader_target); + m_linear_time_interpol(p56_fader,s56_fader_start,s56_fader_end,0,s56_fader_target); elseif s56_fader_functional_form = 2, - m_sigmoid_time_interpol(p56_fader,s56_fader_start,s56_fader_target,0,s56_fader_target); + m_sigmoid_time_interpol(p56_fader,s56_fader_start,s56_fader_end,0,s56_fader_target); ); ***build and apply temporal fader for GHG policy diff --git a/modules/57_maccs/on_aug22/declarations.gms b/modules/57_maccs/on_aug22/declarations.gms index b9db4d40c4..d36d57dc60 100644 --- a/modules/57_maccs/on_aug22/declarations.gms +++ b/modules/57_maccs/on_aug22/declarations.gms @@ -6,29 +6,29 @@ *** | Contact: magpie@pik-potsdam.de scalars - s57_step_length Step length in MACC data (yr) + s57_step_length Step length in MACC data (USD17MER) ; parameters im_maccs_mitigation(t,i,emis_source,pollutants) Technical mitigation of GHG emissions (percent) i57_mac_step_n2o(t,i,emis_source) Helper to map N2O prices and maccs_steps (1) i57_mac_step_ch4(t,i,emis_source) Helper to map CH4 prices and maccs_steps (1) - p57_maccs_costs_integral(t,i,emis_source,pollutants) Costs of technical mitigation (USD95MER per Tg N CH4 C) + p57_maccs_costs_integral(t,i,emis_source,pollutants) Costs of technical mitigation (USD17MER per Tg N CH4 C) ; equations - q57_labor_costs(i) Calculation of labor costs of technical mitigation (mio. USD95MER per yr) - q57_capital_costs(i) Calculation of capital costs of technical mitigation (mio. USD95MER per yr) + q57_labor_costs(i) Calculation of labor costs of technical mitigation (mio. USD17MER per yr) + q57_capital_costs(i) Calculation of capital costs of technical mitigation (mio. USD17MER per yr) ; positive variables - vm_maccs_costs(i,factors) Costs of technical mitigation of GHG emissions (mio. USD95MER per yr) + vm_maccs_costs(i,factors) Costs of technical mitigation of GHG emissions (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_maccs_costs(t,i,factors,type) Costs of technical mitigation of GHG emissions (mio. USD95MER per yr) - oq57_labor_costs(t,i,type) Calculation of labor costs of technical mitigation (mio. USD95MER per yr) - oq57_capital_costs(t,i,type) Calculation of capital costs of technical mitigation (mio. USD95MER per yr) + ov_maccs_costs(t,i,factors,type) Costs of technical mitigation of GHG emissions (mio. USD17MER per yr) + oq57_labor_costs(t,i,type) Calculation of labor costs of technical mitigation (mio. USD17MER per yr) + oq57_capital_costs(t,i,type) Calculation of capital costs of technical mitigation (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/57_maccs/on_aug22/equations.gms b/modules/57_maccs/on_aug22/equations.gms index fcd0dc6d7b..2af85f3ec6 100644 --- a/modules/57_maccs/on_aug22/equations.gms +++ b/modules/57_maccs/on_aug22/equations.gms @@ -39,7 +39,7 @@ q57_labor_costs(i2) .. + sum(emis_source_inorg_fert_n2o, (vm_emissions_reg(i2,emis_source_inorg_fert_n2o,"n2o_n_direct") / s57_implicit_emis_factor) * sum(ct,im_maccs_mitigation(ct,i2,emis_source_inorg_fert_n2o,"n2o_n_direct")) * s57_implicit_fert_cost)) - * sum(ct, pm_cost_share_crops(ct ,i2,"labor") * (1/pm_productivity_gain_from_wages(ct,i2)) * + * sum(ct, pm_factor_cost_shares(ct ,i2,"labor") * (1/pm_productivity_gain_from_wages(ct,i2)) * (pm_hourly_costs(ct,i2,"scenario") / pm_hourly_costs(ct,i2,"baseline"))); q57_capital_costs(i2) .. @@ -49,4 +49,4 @@ q57_capital_costs(i2) .. + sum(emis_source_inorg_fert_n2o, (vm_emissions_reg(i2,emis_source_inorg_fert_n2o,"n2o_n_direct") / s57_implicit_emis_factor) * sum(ct,im_maccs_mitigation(ct,i2,emis_source_inorg_fert_n2o,"n2o_n_direct")) * s57_implicit_fert_cost)) - * sum(ct, pm_cost_share_crops(ct ,i2,"capital")); + * sum(ct, pm_factor_cost_shares(ct ,i2,"capital")); diff --git a/modules/57_maccs/on_aug22/input.gms b/modules/57_maccs/on_aug22/input.gms index aa6ed24d82..6c5987804e 100644 --- a/modules/57_maccs/on_aug22/input.gms +++ b/modules/57_maccs/on_aug22/input.gms @@ -17,7 +17,7 @@ scalars s57_maxmac_ch4_entferm activate enteric fermentation CH4 mitigation independent of pollutant price (step of MACC and -1 is inactive) / -1 / s57_maxmac_ch4_awms activate awms CH4 mitigation independent of pollutant price (step of MACC and -1 is inactive) / -1 / s57_implicit_emis_factor emission factor for direct soil emissions implicit to MACC curves (tN2ON per tN) / 0.01 / - s57_implicit_fert_cost fertilizer costs implicit to MACC curves (USD05MER per ton N) / 600 / + s57_implicit_fert_cost fertilizer costs implicit to MACC curves (USD17MER per ton N) / 738 / ; $onEmpty diff --git a/modules/57_maccs/on_aug22/preloop.gms b/modules/57_maccs/on_aug22/preloop.gms index 9dec38e391..0c89a1fc93 100644 --- a/modules/57_maccs/on_aug22/preloop.gms +++ b/modules/57_maccs/on_aug22/preloop.gms @@ -5,14 +5,17 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de -$if "%c57_macc_version%" == "PBL_2007" s57_step_length = 5; -$if "%c57_macc_version%" == "PBL_2019" s57_step_length = 20; -$if "%c57_macc_version%" == "PBL_2022" s57_step_length = 20; +* inflated using USD05 --> USD17 MER rate: 5 * 1.23 +$if "%c57_macc_version%" == "PBL_2007" s57_step_length = 6.15; +* inflated using USD10 --> USD17 MER rate: 20 * 1.12 +$if "%c57_macc_version%" == "PBL_2019" s57_step_length = 22.4; +* inflated using USD10 --> USD17 MER rate: 20 * 1.12 +$if "%c57_macc_version%" == "PBL_2022" s57_step_length = 22.4; $ontext Determine level of GHG emission abatement depending on GHG prices. -There are 201 abatement steps. Each step is 5 USD per tC eq in case of PBL_2007 and -20 USD per tC eq in case of PBL_2019. +There are 201 abatement steps. Each step is 6.15 USD17MER per tC eq in case of PBL_2007 and +22.4 USD17MER per tC eq in case of PBL_2019. Since the GHG prices are in USD per ton N and USD per ton CH4, conversion to USD per ton C eq is needed. In this realization, the IPCC AR4 global warming potential factor for N2O (298) and CH4 (25) are used because PBL used these parameters to convert USD per ton N2O and USD per ton CH4 into USD per ton C eq. diff --git a/modules/58_peatland/input/files b/modules/58_peatland/input/files index 09985440b4..9af5876c07 100644 --- a/modules/58_peatland/input/files +++ b/modules/58_peatland/input/files @@ -1,3 +1,4 @@ * list of files that are required here f58_ipcc_wetland_ef2.cs3 f58_peatland_area.cs3 +f58_peatland_area_iso.cs3 diff --git a/modules/58_peatland/off/declarations.gms b/modules/58_peatland/off/declarations.gms index c39a5314fa..2983b10a78 100644 --- a/modules/58_peatland/off/declarations.gms +++ b/modules/58_peatland/off/declarations.gms @@ -6,13 +6,13 @@ *** | Contact: magpie@pik-potsdam.de positive variables - vm_peatland_cost(j) One-time and recurring cost of managed peatland (mio. USD05MER per yr) + vm_peatland_cost(j) One-time and recurring cost of managed peatland (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_peatland_cost(t,j,type) One-time and recurring cost of managed peatland (mio. USD05MER per yr) + ov_peatland_cost(t,j,type) One-time and recurring cost of managed peatland (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/58_peatland/v2/declarations.gms b/modules/58_peatland/v2/declarations.gms index a8b438f8b8..ced2ebeda0 100644 --- a/modules/58_peatland/v2/declarations.gms +++ b/modules/58_peatland/v2/declarations.gms @@ -11,13 +11,17 @@ parameters p58_scalingFactorExp(t,j) Scaling factor for peatland expansion (1) p58_scalingFactorRed(t,j,manPeat58) Scaling factor for peatland reduction (1) p58_mapping_cell_climate(j,clcl58) Mapping between cells and climate regions (binary) - i58_cost_rewet_recur(t) Recurring costs for rewetted peatland (USD05MER per ha) - i58_cost_rewet_onetime(t) One-time costs for peatland rewetting (USD05MER per ha) - i58_cost_drain_recur(t) Recurring costs for drained and managed peatlands (USD05MER per ha) - i58_cost_drain_intact_onetime(t) One-time costs for drainage of intact peatland (USD05MER per ha) - i58_cost_drain_rewet_onetime(t) One-time costs for drainage of rewetted peatland (USD05MER per ha) + i58_cost_rewet_recur(t) Recurring costs for rewetted peatland (USD17MER per ha) + i58_cost_drain_recur(t) Recurring costs for drained and managed peatlands (USD17MER per ha) + i58_cost_onetime(t,cost58) One-time costs for peatland rewetting and drainage (USD17MER per ha) p58_availPeatlandExp(t,j) Available area for expansion of drained peatland (mio. ha) p58_availLandExp(t,j) Available area for expansion of managed land (mio. ha) + i58_peatland_rewetting_fader(t_all) Temporal fader for exogenous peatland rewetting (1) + p58_peatland_ref(j,land58) Peatland area in reference period (mio. ha) + p58_country_switch(iso) Switch indicating whether country is affected by exogenous peatland rewetting (1) + p58_country_weight(i) Policy country weight per region (1) + i58_rewetting_exo(t,j) Cellular share of drained peatland in reference period to be rewetted (1) + i58_intact_protection_exo(j) Cellular share of intact peatland that should be protected (1) ; equations @@ -27,16 +31,17 @@ equations q58_manLandExp(j,manPeat58) Managed land area expansion (mio. ha) q58_manLandRed(j,manPeat58) Managed land area reduction (mio. ha) q58_peatlandMan(j,manPeat58) Change of managed peatland area (mio. ha) - q58_peatlandMan2(j,manPeat58) Contraint for managed peatland area (mio. ha) - q58_peatland_cost(j) One-time and recurring cost of peatland conversion and management (mio. USD05MER per yr) - q58_peatland_cost_annuity(j,cost58) Annuity costs for peatland conversion in the current timestep (mio. USD05MER per yr) + q58_peatlandMan2(j,manPeat58) Contraint for managed peatland area (mio. ha) + q58_rewetting_exo(j,manPeat58) Constraint for exogenous peatland rewetting (mio. ha) + q58_peatland_cost(j) One-time and recurring cost of peatland conversion and management (mio. USD17MER per yr) + q58_peatland_cost_annuity(j,cost58) Annuity costs for peatland conversion in the current timestep (mio. USD17MER per yr) q58_peatland_emis_detail(j,land58,emis58) Detailed GHG emissions from peatlands (Tg per yr) - q58_peatland_emis(i,poll58) GHG emissions from managed peatland (Tg per yr) + q58_peatland_emis(i,poll58) GHG emissions from managed peatland (Tg per yr) ; variables v58_peatlandChange(j,land58) Peatland area change (mio. ha) - vm_peatland_cost(j) One-time and recurring cost of peatland conversion and management (mio. USD05MER per yr) + vm_peatland_cost(j) One-time and recurring cost of peatland conversion and management (mio. USD17MER per yr) v58_peatland_emis(j,land58,emis58) Detailed GHG peatland GHG emissions (Tg per yr) ; @@ -47,13 +52,13 @@ positive variables v58_manLandRed(j,manPeat58) Managed land area reduction (mio. ha) v58_balance(j,manPeat58) Technical balance term for peatland scaling factor (1) v58_balance2(j,manPeat58) Technical balance term for peatland scaling factor (1) - v58_peatland_cost_annuity(j,cost58) Annuity costs for peatland conversion in the current timestep (mio. USD05MER per yr) + v58_peatland_cost_annuity(j,cost58) Annuity costs for peatland conversion in the current timestep (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov58_peatlandChange(t,j,land58,type) Peatland area change (mio. ha) - ov_peatland_cost(t,j,type) One-time and recurring cost of peatland conversion and management (mio. USD05MER per yr) + ov_peatland_cost(t,j,type) One-time and recurring cost of peatland conversion and management (mio. USD17MER per yr) ov58_peatland_emis(t,j,land58,emis58,type) Detailed GHG peatland GHG emissions (Tg per yr) ov58_peatland(t,j,land58,type) Peatland area (mio. ha) ov58_manLand(t,j,manPeat58,type) Managed land area (mio. ha) @@ -61,7 +66,7 @@ parameters ov58_manLandRed(t,j,manPeat58,type) Managed land area reduction (mio. ha) ov58_balance(t,j,manPeat58,type) Technical balance term for peatland scaling factor (1) ov58_balance2(t,j,manPeat58,type) Technical balance term for peatland scaling factor (1) - ov58_peatland_cost_annuity(t,j,cost58,type) Annuity costs for peatland conversion in the current timestep (mio. USD05MER per yr) + ov58_peatland_cost_annuity(t,j,cost58,type) Annuity costs for peatland conversion in the current timestep (mio. USD17MER per yr) oq58_peatland(t,j,type) Constraint for total peatland area (mio. ha) oq58_peatlandChange(t,j,land58,type) Peatland area change (mio. ha) oq58_manLand(t,j,manPeat58,type) Managed land area (mio. ha) @@ -69,8 +74,9 @@ parameters oq58_manLandRed(t,j,manPeat58,type) Managed land area reduction (mio. ha) oq58_peatlandMan(t,j,manPeat58,type) Change of managed peatland area (mio. ha) oq58_peatlandMan2(t,j,manPeat58,type) Contraint for managed peatland area (mio. ha) - oq58_peatland_cost(t,j,type) One-time and recurring cost of peatland conversion and management (mio. USD05MER per yr) - oq58_peatland_cost_annuity(t,j,cost58,type) Annuity costs for peatland conversion in the current timestep (mio. USD05MER per yr) + oq58_rewetting_exo(t,j,manPeat58,type) Constraint for exogenous peatland rewetting (mio. ha) + oq58_peatland_cost(t,j,type) One-time and recurring cost of peatland conversion and management (mio. USD17MER per yr) + oq58_peatland_cost_annuity(t,j,cost58,type) Annuity costs for peatland conversion in the current timestep (mio. USD17MER per yr) oq58_peatland_emis_detail(t,j,land58,emis58,type) Detailed GHG emissions from peatlands (Tg per yr) oq58_peatland_emis(t,i,poll58,type) GHG emissions from managed peatland (Tg per yr) ; diff --git a/modules/58_peatland/v2/equations.gms b/modules/58_peatland/v2/equations.gms index 569fc87361..1b3117ae8e 100644 --- a/modules/58_peatland/v2/equations.gms +++ b/modules/58_peatland/v2/equations.gms @@ -54,6 +54,12 @@ q58_peatlandMan2(j2,manPeat58)$(sum(ct, m_year(ct)) > s58_fix_peatland) .. v58_peatland(j2,manPeat58) =l= v58_manLand(j2,manPeat58); +*' Constraint for optional exogenous peatland rewetting + + q58_rewetting_exo(j2,manPeat58)$(sum(ct, m_year(ct)) > s58_fix_peatland) .. + v58_peatland(j2,"rewetted") =g= + sum(drained58, p58_peatland_ref(j2,drained58)) * sum(ct, i58_rewetting_exo(ct,j2)); + *' Costs for peatland degradation and rewetting q58_peatland_cost(j2) .. @@ -64,9 +70,7 @@ q58_peatland_cost_annuity(j2,cost58) .. v58_peatland_cost_annuity(j2,cost58) =g= - (- v58_peatlandChange(j2,"intact") * sum(ct, i58_cost_drain_intact_onetime(ct)))$sameas(cost58,"drain_intact") - + (- v58_peatlandChange(j2,"rewetted") * sum(ct, i58_cost_drain_rewet_onetime(ct)))$sameas(cost58,"drain_rewetted") - + (v58_peatlandChange(j2,"rewetted") * sum(ct, i58_cost_rewet_onetime(ct)))$sameas(cost58,"rewet") + sum(map_cost58(intact58,cost58), v58_peatlandChange(j2,intact58)) * sum(ct, i58_cost_onetime(ct,cost58)) * sum((cell(i2,j2),ct),pm_interest(ct,i2)/(1+pm_interest(ct,i2))); *' Detailed peatland GHG emissions diff --git a/modules/58_peatland/v2/input.gms b/modules/58_peatland/v2/input.gms index afa2b3face..2f1c3ea4d9 100644 --- a/modules/58_peatland/v2/input.gms +++ b/modules/58_peatland/v2/input.gms @@ -6,14 +6,53 @@ *** | Contact: magpie@pik-potsdam.de scalars - s58_cost_rewet_recur Recurring costs for rewetted peatland (USD05MER per ha) / 30 / - s58_cost_rewet_onetime One-time costs for peatland rewetting (USD05MER per ha) / 1000 / - s58_cost_drain_recur Recurring costs for drained and managed peatlands (USD05MER per ha) / 0 / - s58_cost_drain_intact_onetime One-time costs for drainage of intact peatland (USD05MER per ha) / 0 / - s58_cost_drain_rewet_onetime One-time costs for drainage of rewetted peatland (USD05MER per ha) / 1000 / - s58_rewetting_switch Peatland rewetting on (Inf) or off (0) / Inf / - s58_fix_peatland Year indicating until when peatland area should be fixed (year) / 2020 / - s58_balance_penalty Penalty for technical peatland balance term (USD05MER) / 1e+06 / + s58_cost_rewet_recur Recurring costs for rewetted peatland (USD17MER per ha) / 37 / + s58_cost_rewet_onetime One-time costs for peatland rewetting (USD17MER per ha) / 1230 / + s58_cost_drain_recur Recurring costs for drained and managed peatlands (USD17MER per ha) / 0 / + s58_cost_drain_intact_onetime One-time costs for drainage of intact peatland (USD17MER per ha) / 1230 / + s58_cost_drain_rewet_onetime One-time costs for drainage of rewetted peatland (USD17MER per ha) / 0 / + s58_rewetting_switch Peatland rewetting on (Inf) or off (0) / Inf / + s58_fix_peatland Year indicating until when peatland area should be fixed (year) / 2020 / + s58_balance_penalty Penalty for technical peatland balance term (USD17MER) / 1e+06 / + s58_rewetting_exo Switch for exogenous peatland rewetting for selected countries (1) / 0 / + s58_rewetting_exo_noselect Switch for exogenous peatland rewetting for all other countries (1) / 0 / + s58_rewet_exo_start_year Start year for exogenous peatland rewetting (1) / 2030 / + s58_rewet_exo_target_year Target year for exogenous peatland rewetting (1) / 2050 / + s58_rewet_exo_start_value Start value for exogenous peatland rewetting as share of drained peatland in reference period (1) / 0.3 / + s58_rewet_exo_target_value Target value for exogenous peatland rewetting as share of drained peatland in reference period (1) / 0.5 / + s58_intact_prot_exo Switch for exogenous protection of intact peatland for selected countries (1) / 0 / + s58_intact_prot_exo_noselect Switch for exogenous protection of intact peatland for all other countries (1) / 0 / +; + +* Set-switch for countries affected by certain policies +* Default: all iso countries selected +sets + policy_countries58(iso) countries to be affected by exogenous peatland rewetting + / ABW,AFG,AGO,AIA,ALA,ALB,AND,ARE,ARG,ARM, + ASM,ATA,ATF,ATG,AUS,AUT,AZE,BDI,BEL,BEN, + BES,BFA,BGD,BGR,BHR,BHS,BIH,BLM,BLR,BLZ, + BMU,BOL,BRA,BRB,BRN,BTN,BVT,BWA,CAF,CAN, + CCK,CHN,CHE,CHL,CIV,CMR,COD,COG,COK,COL, + COM,CPV,CRI,CUB,CUW,CXR,CYM,CYP,CZE,DEU, + DJI,DMA,DNK,DOM,DZA,ECU,EGY,ERI,ESH,ESP, + EST,ETH,FIN,FJI,FLK,FRA,FRO,FSM,GAB,GBR, + GEO,GGY,GHA,GIB,GIN,GLP,GMB,GNB,GNQ,GRC, + GRD,GRL,GTM,GUF,GUM,GUY,HKG,HMD,HND,HRV, + HTI,HUN,IDN,IMN,IND,IOT,IRL,IRN,IRQ,ISL, + ISR,ITA,JAM,JEY,JOR,JPN,KAZ,KEN,KGZ,KHM, + KIR,KNA,KOR,KWT,LAO,LBN,LBR,LBY,LCA,LIE, + LKA,LSO,LTU,LUX,LVA,MAC,MAF,MAR,MCO,MDA, + MDG,MDV,MEX,MHL,MKD,MLI,MLT,MMR,MNE,MNG, + MNP,MOZ,MRT,MSR,MTQ,MUS,MWI,MYS,MYT,NAM, + NCL,NER,NFK,NGA,NIC,NIU,NLD,NOR,NPL,NRU, + NZL,OMN,PAK,PAN,PCN,PER,PHL,PLW,PNG,POL, + PRI,PRK,PRT,PRY,PSE,PYF,QAT,REU,ROU,RUS, + RWA,SAU,SDN,SEN,SGP,SGS,SHN,SJM,SLB,SLE, + SLV,SMR,SOM,SPM,SRB,SSD,STP,SUR,SVK,SVN, + SWE,SWZ,SXM,SYC,SYR,TCA,TCD,TGO,THA,TJK, + TKL,TKM,TLS,TON,TTO,TUN,TUR,TUV,TWN,TZA, + UGA,UKR,UMI,URY,USA,UZB,VAT,VCT,VEN,VGB, + VIR,VNM,VUT,WLF,WSM,YEM,ZAF,ZMB,ZWE / ; *Peatland area based on Global Peatland Map 2.0 and Global Peatland Database @@ -23,6 +62,13 @@ $include "./modules/58_peatland/input/f58_peatland_area.cs3" $offdelim ; +*Peatland area based on Global Peatland Map 2.0 and Global Peatland Database +table f58_peatland_area_iso(iso,land58) Peatland area (mio. ha) +$ondelim +$include "./modules/58_peatland/input/f58_peatland_area_iso.cs3" +$offdelim +; + *Wetland GHG emission factors based on IPCC Wetlands 2014 and Tiemeyer et al. 2020 table f58_ipcc_wetland_ef(clcl58,land58,emis58) Wetland emission factors (Tg per yr) $ondelim diff --git a/modules/58_peatland/v2/postsolve.gms b/modules/58_peatland/v2/postsolve.gms index b8274c3db3..563eb66e46 100644 --- a/modules/58_peatland/v2/postsolve.gms +++ b/modules/58_peatland/v2/postsolve.gms @@ -26,6 +26,7 @@ pc58_manLand(j,manPeat58) = v58_manLand.l(j,manPeat58); oq58_manLandRed(t,j,manPeat58,"marginal") = q58_manLandRed.m(j,manPeat58); oq58_peatlandMan(t,j,manPeat58,"marginal") = q58_peatlandMan.m(j,manPeat58); oq58_peatlandMan2(t,j,manPeat58,"marginal") = q58_peatlandMan2.m(j,manPeat58); + oq58_rewetting_exo(t,j,manPeat58,"marginal") = q58_rewetting_exo.m(j,manPeat58); oq58_peatland_cost(t,j,"marginal") = q58_peatland_cost.m(j); oq58_peatland_cost_annuity(t,j,cost58,"marginal") = q58_peatland_cost_annuity.m(j,cost58); oq58_peatland_emis_detail(t,j,land58,emis58,"marginal") = q58_peatland_emis_detail.m(j,land58,emis58); @@ -47,6 +48,7 @@ pc58_manLand(j,manPeat58) = v58_manLand.l(j,manPeat58); oq58_manLandRed(t,j,manPeat58,"level") = q58_manLandRed.l(j,manPeat58); oq58_peatlandMan(t,j,manPeat58,"level") = q58_peatlandMan.l(j,manPeat58); oq58_peatlandMan2(t,j,manPeat58,"level") = q58_peatlandMan2.l(j,manPeat58); + oq58_rewetting_exo(t,j,manPeat58,"level") = q58_rewetting_exo.l(j,manPeat58); oq58_peatland_cost(t,j,"level") = q58_peatland_cost.l(j); oq58_peatland_cost_annuity(t,j,cost58,"level") = q58_peatland_cost_annuity.l(j,cost58); oq58_peatland_emis_detail(t,j,land58,emis58,"level") = q58_peatland_emis_detail.l(j,land58,emis58); @@ -68,6 +70,7 @@ pc58_manLand(j,manPeat58) = v58_manLand.l(j,manPeat58); oq58_manLandRed(t,j,manPeat58,"upper") = q58_manLandRed.up(j,manPeat58); oq58_peatlandMan(t,j,manPeat58,"upper") = q58_peatlandMan.up(j,manPeat58); oq58_peatlandMan2(t,j,manPeat58,"upper") = q58_peatlandMan2.up(j,manPeat58); + oq58_rewetting_exo(t,j,manPeat58,"upper") = q58_rewetting_exo.up(j,manPeat58); oq58_peatland_cost(t,j,"upper") = q58_peatland_cost.up(j); oq58_peatland_cost_annuity(t,j,cost58,"upper") = q58_peatland_cost_annuity.up(j,cost58); oq58_peatland_emis_detail(t,j,land58,emis58,"upper") = q58_peatland_emis_detail.up(j,land58,emis58); @@ -89,6 +92,7 @@ pc58_manLand(j,manPeat58) = v58_manLand.l(j,manPeat58); oq58_manLandRed(t,j,manPeat58,"lower") = q58_manLandRed.lo(j,manPeat58); oq58_peatlandMan(t,j,manPeat58,"lower") = q58_peatlandMan.lo(j,manPeat58); oq58_peatlandMan2(t,j,manPeat58,"lower") = q58_peatlandMan2.lo(j,manPeat58); + oq58_rewetting_exo(t,j,manPeat58,"lower") = q58_rewetting_exo.lo(j,manPeat58); oq58_peatland_cost(t,j,"lower") = q58_peatland_cost.lo(j); oq58_peatland_cost_annuity(t,j,cost58,"lower") = q58_peatland_cost_annuity.lo(j,cost58); oq58_peatland_emis_detail(t,j,land58,emis58,"lower") = q58_peatland_emis_detail.lo(j,land58,emis58); diff --git a/modules/58_peatland/v2/preloop.gms b/modules/58_peatland/v2/preloop.gms index 9525ea2860..beda385ea5 100644 --- a/modules/58_peatland/v2/preloop.gms +++ b/modules/58_peatland/v2/preloop.gms @@ -5,10 +5,33 @@ *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de +* linear fader for exogenous peatland rewetting +m_linear_time_interpol(i58_peatland_rewetting_fader,s58_rewet_exo_start_year,s58_rewet_exo_target_year,s58_rewet_exo_start_value,s58_rewet_exo_target_value); + +* Country switch to determine countries for which certain policies shall be applied. +* In the default case, the policy affects all countries when activated. +p58_country_switch(iso) = 0; +p58_country_switch(policy_countries58) = 1; +* Because MAgPIE is not run at country-level, but at region level, a region +* share is calculated that translates the countries' influence to regional level. +* Countries are weighted by total peatland area. +p58_country_weight(i) = sum(i_to_iso(i,iso), p58_country_switch(iso) * sum(land58, f58_peatland_area_iso(iso,land58))) + / sum(i_to_iso(i,iso), sum(land58, f58_peatland_area_iso(iso,land58))); + +* construct exogenous peatland rewetting scenario +i58_rewetting_exo(t,j) = i58_peatland_rewetting_fader(t) * + (s58_rewetting_exo * sum(cell(i,j), p58_country_weight(i)) + + s58_rewetting_exo_noselect * sum(cell(i,j), 1-p58_country_weight(i))); + +i58_intact_protection_exo(j) = s58_intact_prot_exo * sum(cell(i,j), p58_country_weight(i)) + + s58_intact_prot_exo_noselect * sum(cell(i,j), 1-p58_country_weight(i)); + +* fix uncontrolled pollutants to zero vm_emissions_reg.fx(i,"peatland",pollutants) = 0; vm_emissions_reg.lo(i,"peatland",poll58) = -Inf; vm_emissions_reg.up(i,"peatland",poll58) = Inf; +* Mapping between detailed and simple climate classes p58_mapping_cell_climate(j,clcl58) = sum(clcl_mapping(clcl,clcl58),pm_climate_class(j,clcl)); * Initialization of peatland area diff --git a/modules/58_peatland/v2/presolve.gms b/modules/58_peatland/v2/presolve.gms index 02d99220b5..0231728617 100644 --- a/modules/58_peatland/v2/presolve.gms +++ b/modules/58_peatland/v2/presolve.gms @@ -26,15 +26,17 @@ if (m_year(t) <= s58_fix_peatland, i58_cost_rewet_recur(t) = 0; i58_cost_drain_recur(t) = 0; - i58_cost_drain_intact_onetime(t) = 0; - i58_cost_drain_rewet_onetime(t) = 0; - i58_cost_rewet_onetime(t) = 0; + i58_cost_onetime(t,cost58) = 0; + +* save area in reference period + p58_peatland_ref(j,land58)$(m_year(t) = s58_fix_peatland) = pc58_peatland(j,land58); else * Define bounds and costs for peatland area after the year given by s58_fix_peatland v58_peatland.lo(j,land58) = 0; v58_peatland.l(j,land58) = pc58_peatland(j,land58); - v58_peatland.up(j,drained58) = Inf; + v58_peatland.up(j,drained58) = sum(land58, pc58_peatland(j,land58)); v58_peatland.up(j,"rewetted") = s58_rewetting_switch; + v58_peatland.lo(j,"intact") = pc58_peatland(j,"intact") * i58_intact_protection_exo(j); v58_peatland.up(j,"intact") = pc58_peatland(j,"intact"); v58_peatland.fx(j,"peatExtract") = pc58_peatland(j,"peatExtract"); v58_balance.lo(j,manPeat58) = 0; @@ -44,9 +46,9 @@ else i58_cost_rewet_recur(t) = s58_cost_rewet_recur; i58_cost_drain_recur(t) = s58_cost_drain_recur; - i58_cost_drain_intact_onetime(t) = s58_cost_drain_intact_onetime; - i58_cost_drain_rewet_onetime(t) = s58_cost_drain_rewet_onetime; - i58_cost_rewet_onetime(t) = s58_cost_rewet_onetime; + i58_cost_onetime(t,"drain_intact") = -s58_cost_drain_intact_onetime; + i58_cost_onetime(t,"drain_rewetted") = -s58_cost_drain_rewet_onetime; + i58_cost_onetime(t,"rewetted") = s58_cost_rewet_onetime; ); *' @code diff --git a/modules/58_peatland/v2/realization.gms b/modules/58_peatland/v2/realization.gms index 8fef618fcf..f00746f3f5 100644 --- a/modules/58_peatland/v2/realization.gms +++ b/modules/58_peatland/v2/realization.gms @@ -36,7 +36,6 @@ $Ifi "%phase%" == "sets" $include "./modules/58_peatland/v2/sets.gms" $Ifi "%phase%" == "declarations" $include "./modules/58_peatland/v2/declarations.gms" $Ifi "%phase%" == "input" $include "./modules/58_peatland/v2/input.gms" $Ifi "%phase%" == "equations" $include "./modules/58_peatland/v2/equations.gms" -$Ifi "%phase%" == "scaling" $include "./modules/58_peatland/v2/scaling.gms" $Ifi "%phase%" == "preloop" $include "./modules/58_peatland/v2/preloop.gms" $Ifi "%phase%" == "presolve" $include "./modules/58_peatland/v2/presolve.gms" $Ifi "%phase%" == "postsolve" $include "./modules/58_peatland/v2/postsolve.gms" diff --git a/modules/58_peatland/v2/sets.gms b/modules/58_peatland/v2/sets.gms index 561c9bdb28..74c3372d96 100644 --- a/modules/58_peatland/v2/sets.gms +++ b/modules/58_peatland/v2/sets.gms @@ -16,20 +16,29 @@ sets manPeat58(land58) Drained and managed peatland categories / crop, past, forestry / + intact58(land58) intact and rewetted peatland categories + / intact, rewetted / + cost58 annunity cost categories - / drain_intact, drain_rewetted, rewet / + / drain_intact, drain_rewetted, rewetted / + + map_cost58(intact58,cost58) Mapping between intact58 and cost58 + / intact .(drain_intact) + rewetted .(drain_rewetted) + rewetted .(rewetted) / emis58 Wetland emission types / co2, doc, ch4, n2o / emisSub58(emis58) Wetland emission types - / co2, ch4, n2o / + / co2, doc, ch4, n2o / poll58(pollutants) Wetland emissions that can be taxed / co2_c, ch4, n2o_n_direct / emisSub58_to_poll58(emisSub58,poll58) Mapping / co2 .(co2_c) + doc .(co2_c) ch4 .(ch4) n2o .(n2o_n_direct) / diff --git a/modules/59_som/cellpool_aug16/preloop.gms b/modules/59_som/cellpool_aug16/preloop.gms index a2625bdf21..a006b92294 100644 --- a/modules/59_som/cellpool_aug16/preloop.gms +++ b/modules/59_som/cellpool_aug16/preloop.gms @@ -27,10 +27,12 @@ pc59_som_pool(j,noncropland59) = * starting value of carbon stocks 1995 is only an estimate. * ATTENTION: emissions in 1995 are not meaningful -vm_carbon_stock.l(j,"crop","soilc",stockType) = +pcm_carbon_stock(j,"crop","soilc",stockType) = pc59_som_pool(j,"crop") + i59_subsoilc_density("y1995",j) * pm_land_start(j,"crop"); -vm_carbon_stock.l(j,noncropland59,"soilc",stockType) = +vm_carbon_stock.l(j,"crop","soilc",stockType) = pcm_carbon_stock(j,"crop","soilc",stockType); +pcm_carbon_stock(j,noncropland59,"soilc",stockType) = fm_carbon_density("y1995",j,noncropland59,"soilc") * pm_land_start(j,noncropland59); +vm_carbon_stock.l(j,noncropland59,"soilc",stockType) = pcm_carbon_stock(j,noncropland59,"soilc",stockType); ***************************** *** cshare calculation *** diff --git a/modules/59_som/cellpool_jan23/preloop.gms b/modules/59_som/cellpool_jan23/preloop.gms index 8393b1f201..d919df335b 100644 --- a/modules/59_som/cellpool_jan23/preloop.gms +++ b/modules/59_som/cellpool_jan23/preloop.gms @@ -27,10 +27,12 @@ pc59_som_pool(j,noncropland59) = * starting value of carbon stocks 1995 is only an estimate. * ATTENTION: emissions in 1995 are not meaningful -vm_carbon_stock.l(j,"crop","soilc",stockType) = +pcm_carbon_stock(j,"crop","soilc",stockType) = pc59_som_pool(j,"crop") + i59_subsoilc_density("y1995",j) * pm_land_start(j,"crop"); -vm_carbon_stock.l(j,noncropland59,"soilc",stockType) = +vm_carbon_stock.l(j,"crop","soilc",stockType) = pcm_carbon_stock(j,"crop","soilc",stockType); +pcm_carbon_stock(j,noncropland59,"soilc",stockType) = fm_carbon_density("y1995",j,noncropland59,"soilc") * pm_land_start(j,noncropland59); +vm_carbon_stock.l(j,noncropland59,"soilc",stockType) = pcm_carbon_stock(j,noncropland59,"soilc",stockType); ***************************** *** cshare calculation *** diff --git a/modules/59_som/static_jan19/preloop.gms b/modules/59_som/static_jan19/preloop.gms index a0c6694ddd..d79a616ac2 100644 --- a/modules/59_som/static_jan19/preloop.gms +++ b/modules/59_som/static_jan19/preloop.gms @@ -8,8 +8,8 @@ * starting value of carbon stocks 1995 is only an estimate. * ATTENTION: emissions in 1995 are not meaningful -vm_carbon_stock.l(j,land,"soilc","actual") = fm_carbon_density("y1995",j,land,"soilc") * pcm_land(j,land); -*pcm_carbon_stock(j,land,"soilc") = vm_carbon_stock.l(j,land,"soilc"); +pcm_carbon_stock(j,land,"soilc","actual") = fm_carbon_density("y1995",j,land,"soilc") * pcm_land(j,land); +vm_carbon_stock.l(j,land,"soilc","actual") = pcm_carbon_stock(j,land,"soilc","actual"); * Soilc is not different for all non cropland vegetated land types * No age-class soil carbon density distribution is nessessary diff --git a/modules/60_bioenergy/1st2ndgen_priced_feb24/declarations.gms b/modules/60_bioenergy/1st2ndgen_priced_feb24/declarations.gms index d0bfaffac5..41aef0e838 100644 --- a/modules/60_bioenergy/1st2ndgen_priced_feb24/declarations.gms +++ b/modules/60_bioenergy/1st2ndgen_priced_feb24/declarations.gms @@ -10,11 +10,11 @@ parameters i60_bioenergy_dem(t,i) Regional bioenergy demand per year (mio. GJ per yr) i60_res_2ndgenBE_dem(t,i) Regional residue demand for 2nd generation bioenergy per year (mio. GJ per yr) i60_1stgen_bioenergy_dem(t,i,kall) Regional 1st generation bioenergy demand (mio. GJ per yr) - i60_1stgen_bioenergy_subsidy_tdm(t) Global 1st generation bioenergy subsidy per tDM (USD05MER per tDM) - i60_1stgen_bioenergy_subsidy_gj(t) Global 1st generation bioenergy subsidy per GJ (USD05MER per GJ) - i60_2ndgen_bioenergy_subsidy(t) Global 2nd generation bioenergy subsidy (USD05MER per GHJ) + i60_1stgen_bioenergy_subsidy_tdm(t) Global 1st generation bioenergy subsidy per tDM (USD17MER per tDM) + i60_1stgen_bioenergy_subsidy_gj(t) Global 1st generation bioenergy subsidy per GJ (USD17MER per GJ) + i60_2ndgen_bioenergy_subsidy(t) Global 2nd generation bioenergy subsidy (USD17MER per GHJ) p60_region_BE_shr(t_all,i) Bioenergy demand share of the region (1) - p60_country_dummy(iso) Dummy parameter indicating whether country is selected for selected bioenergy demand scenario (1) + p60_country_switch(iso) Switch indicating whether country is selected for selected bioenergy demand scenario (1) ; positive variables @@ -24,7 +24,7 @@ positive variables ; variables - vm_bioenergy_utility(i) Utility as negative costs for producing bioenergy (USD05MER per yr) + vm_bioenergy_utility(i) Utility as negative costs for producing bioenergy (USD17MER per yr) ; equations @@ -32,7 +32,7 @@ equations q60_bioenergy_glo Global 2nd generation dedicated bioenergy demand (mio. GJ per yr) q60_bioenergy_reg(i) Regional 2nd generation dedicated bioenergy demand (mio. GJ per yr) q60_res_2ndgenBE(i) Regional residue demand for 2nd generation bioenergy (mio. GJ per yr) - q60_bioenergy_incentive(i) Incentive to produce bioenergy (mio. USD05MER per yr) + q60_bioenergy_incentive(i) Incentive to produce bioenergy (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### @@ -40,11 +40,11 @@ parameters ov_dem_bioen(t,i,kall,type) Regional bioenergy demand (mio. tDM per yr) ov60_2ndgen_bioenergy_dem_dedicated(t,i,kall,type) Bioenergy demand which can come from different regions (mio. GJ per yr) ov60_2ndgen_bioenergy_dem_residues(t,i,kall,type) Bioenergy demand which can come from different product types (mio. GJ per yr) - ov_bioenergy_utility(t,i,type) Utility as negative costs for producing bioenergy (USD05MER per yr) + ov_bioenergy_utility(t,i,type) Utility as negative costs for producing bioenergy (USD17MER per yr) oq60_bioenergy(t,i,kall,type) Global total bioenergy demand (mio. GJ per yr) oq60_bioenergy_glo(t,type) Global 2nd generation dedicated bioenergy demand (mio. GJ per yr) oq60_bioenergy_reg(t,i,type) Regional 2nd generation dedicated bioenergy demand (mio. GJ per yr) oq60_res_2ndgenBE(t,i,type) Regional residue demand for 2nd generation bioenergy (mio. GJ per yr) - oq60_bioenergy_incentive(t,i,type) Incentive to produce bioenergy (mio. USD05MER per yr) + oq60_bioenergy_incentive(t,i,type) Incentive to produce bioenergy (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/60_bioenergy/1st2ndgen_priced_feb24/input.gms b/modules/60_bioenergy/1st2ndgen_priced_feb24/input.gms index da938046e9..1031a3082a 100644 --- a/modules/60_bioenergy/1st2ndgen_priced_feb24/input.gms +++ b/modules/60_bioenergy/1st2ndgen_priced_feb24/input.gms @@ -35,10 +35,10 @@ sets scalars c60_biodem_level bioenergy demand level indicator 1 for regional and 0 for global demand (1) / 1 / - c60_bioenergy_subsidy_fix_SSP2 first generation bioenergy subsidy during fix_SSP period (USD05MER per ton) / 300 / - c60_bioenergy_subsidy first generation bioenergy subsidy (USD05MER per ton) / 300 / - s60_bioenergy_gj_price_1st first generation bioenergy per-GJ price (USD05MER per GJ) / 0 / - s60_bioenergy_price_2nd second generation bioenergy price (USD05MER per GJ) / 0 / + c60_bioenergy_subsidy_fix_SSP2 first generation bioenergy subsidy during fix_SSP period (USD17MER per ton) / 200 / + c60_bioenergy_subsidy first generation bioenergy subsidy (USD17MER per ton) / 200 / + s60_bioenergy_gj_price_1st first generation bioenergy per-GJ price (USD17MER per GJ) / 0 / + s60_bioenergy_price_2nd second generation bioenergy price (USD17MER per GJ) / 0 / s60_2ndgen_bioenergy_dem_min Minimum dedicated 2nd generation bioenergy demand assumed in each region during SSP2-fix (mio. GJ per yr) / 1 / s60_2ndgen_bioenergy_dem_min_post_fix Minimum dedicated 2nd generation bioenergy demand assumed in each region after SSP2-fix (mio. GJ per yr) / 1 / ; diff --git a/modules/60_bioenergy/1st2ndgen_priced_feb24/preloop.gms b/modules/60_bioenergy/1st2ndgen_priced_feb24/preloop.gms index edd93ec225..ea45f9af15 100644 --- a/modules/60_bioenergy/1st2ndgen_priced_feb24/preloop.gms +++ b/modules/60_bioenergy/1st2ndgen_priced_feb24/preloop.gms @@ -9,12 +9,12 @@ * Country switch to determine countries for which scenario shall be applied. * In the default case, the selected scneario (c60_2ndgen_biodem) affects * all countries. -p60_country_dummy(iso) = 0; -p60_country_dummy(scen_countries60) = 1; +p60_country_switch(iso) = 0; +p60_country_switch(scen_countries60) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by their population size. -p60_region_BE_shr(t_all,i) = sum(i_to_iso(i,iso), p60_country_dummy(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); +p60_region_BE_shr(t_all,i) = sum(i_to_iso(i,iso), p60_country_switch(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); $ifthen "%c60_2ndgen_biodem%" == "coupling" i60_bioenergy_dem(t,i) = f60_bioenergy_dem_coupling(t,i); diff --git a/modules/60_bioenergy/1stgen_priced_dec18/declarations.gms b/modules/60_bioenergy/1stgen_priced_dec18/declarations.gms index 9eb2009b59..573b3a974c 100644 --- a/modules/60_bioenergy/1stgen_priced_dec18/declarations.gms +++ b/modules/60_bioenergy/1stgen_priced_dec18/declarations.gms @@ -11,7 +11,7 @@ parameters i60_res_2ndgenBE_dem(t,i) Regional residue demand for 2nd generation bioenergy per year (mio. GJ per yr) i60_1stgen_bioenergy_dem(t,i,kall) Regional 1st generation bioenergy demand (mio. GJ per yr) p60_region_BE_shr(t_all,i) Bioenergy demand share of the region (1) - p60_country_dummy(iso) Dummy parameter indicating whether country is selected for selected bioenergy demand scenario (1) + p60_country_switch(iso) Switch indicating whether country is selected for selected bioenergy demand scenario (1) ; positive variables @@ -21,7 +21,7 @@ positive variables ; variables - vm_bioenergy_utility(i) Utility as negative costs for producing bioenergy (USD05MER per yr) + vm_bioenergy_utility(i) Utility as negative costs for producing bioenergy (USD17MER per yr) ; equations @@ -29,7 +29,7 @@ equations q60_bioenergy_glo Global 2nd generation dedicated bioenergy demand (mio. GJ per yr) q60_bioenergy_reg(i) Regional 2nd generation dedicated bioenergy demand (mio. GJ per yr) q60_res_2ndgenBE(i) Regional residue demand for 2nd generation bioenergy (mio. GJ per yr) - q60_bioenergy_incentive(i) Incentive to produce bioenergy (mio. USD05MER per yr) + q60_bioenergy_incentive(i) Incentive to produce bioenergy (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### @@ -37,11 +37,11 @@ parameters ov_dem_bioen(t,i,kall,type) Regional bioenergy demand (mio. tDM per yr) ov60_2ndgen_bioenergy_dem_dedicated(t,i,kall,type) Bioenergy demand which can come from different regions (mio. GJ per yr) ov60_2ndgen_bioenergy_dem_residues(t,i,kall,type) Bioenergy demand which can come from different product types (mio. GJ per yr) - ov_bioenergy_utility(t,i,type) Utility as negative costs for producing bioenergy (USD05MER per yr) + ov_bioenergy_utility(t,i,type) Utility as negative costs for producing bioenergy (USD17MER per yr) oq60_bioenergy(t,i,kall,type) Global total bioenergy demand (mio. GJ per yr) oq60_bioenergy_glo(t,type) Global 2nd generation dedicated bioenergy demand (mio. GJ per yr) oq60_bioenergy_reg(t,i,type) Regional 2nd generation dedicated bioenergy demand (mio. GJ per yr) oq60_res_2ndgenBE(t,i,type) Regional residue demand for 2nd generation bioenergy (mio. GJ per yr) - oq60_bioenergy_incentive(t,i,type) Incentive to produce bioenergy (mio. USD05MER per yr) + oq60_bioenergy_incentive(t,i,type) Incentive to produce bioenergy (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/60_bioenergy/1stgen_priced_dec18/input.gms b/modules/60_bioenergy/1stgen_priced_dec18/input.gms index 5e43819c25..1183f3d38b 100644 --- a/modules/60_bioenergy/1stgen_priced_dec18/input.gms +++ b/modules/60_bioenergy/1stgen_priced_dec18/input.gms @@ -35,7 +35,7 @@ sets scalars c60_biodem_level bioenergy demand level indicator 1 for regional and 0 for global demand (1) / 1 / - c60_bioenergy_subsidy first generation bioenergy subsidy (USD05MER per ton) / 300 / + c60_bioenergy_subsidy first generation bioenergy subsidy (USD17MER per ton) / 200 / s60_2ndgen_bioenergy_dem_min Minimum dedicated 2nd generation bioenergy demand assumed in each region (mio. GJ per yr) / 1 / ; diff --git a/modules/60_bioenergy/1stgen_priced_dec18/preloop.gms b/modules/60_bioenergy/1stgen_priced_dec18/preloop.gms index f92a9a2590..5ad503452c 100644 --- a/modules/60_bioenergy/1stgen_priced_dec18/preloop.gms +++ b/modules/60_bioenergy/1stgen_priced_dec18/preloop.gms @@ -9,12 +9,12 @@ * Country switch to determine countries for which scenario shall be applied. * In the default case, the selected scneario (c60_2ndgen_biodem) affects * all countries. -p60_country_dummy(iso) = 0; -p60_country_dummy(scen_countries60) = 1; +p60_country_switch(iso) = 0; +p60_country_switch(scen_countries60) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by their population size. -p60_region_BE_shr(t_all,i) = sum(i_to_iso(i,iso), p60_country_dummy(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); +p60_region_BE_shr(t_all,i) = sum(i_to_iso(i,iso), p60_country_switch(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); $ifthen "%c60_2ndgen_biodem%" == "coupling" i60_bioenergy_dem(t,i) = f60_bioenergy_dem_coupling(t,i); diff --git a/modules/62_material/exo_flexreg_apr16/input.gms b/modules/62_material/exo_flexreg_apr16/input.gms index 829405d7da..bd503db126 100644 --- a/modules/62_material/exo_flexreg_apr16/input.gms +++ b/modules/62_material/exo_flexreg_apr16/input.gms @@ -27,5 +27,6 @@ $offdelim / ; +scalar s62_include_bioplastic switch whether future bioplastic demand should be included (0 or 1) / 1 /; scalar s62_max_dem_bioplastic maximum demand for bioplastics (mio. tDM per yr) / 0 /; scalar s62_midpoint_dem_bioplastic midpoint of logistic function for bioplastic demand (yr) / 2050 /; diff --git a/modules/62_material/exo_flexreg_apr16/preloop.gms b/modules/62_material/exo_flexreg_apr16/preloop.gms index 3253981ce5..ed766ebe54 100644 --- a/modules/62_material/exo_flexreg_apr16/preloop.gms +++ b/modules/62_material/exo_flexreg_apr16/preloop.gms @@ -9,9 +9,9 @@ p62_dem_food_lastcalibyear(i) = 1; p62_dem_bioplastic(t,i) = 0; -* Bioplastic demand is based on historic values up to 2020, and either kept constant for -* future years, or following a logistic function with given midpoint and maximum if a -* bioplastic production target is exogenously set. +* Bioplastic demand is based on historic values up to 2020, and either set to zero for +* future years, kept constant at the value of 2020, or following a logistic function with +* given midpoint and maximum if a bioplastic production target is exogenously set. * Global bioplastic demand is distributed to regions proportional to population due to lack of better data. p62_dem_bioplastic(t,i) = f62_hist_dem_bioplastic(t) * (im_pop(t,i) / sum(i2, im_pop(t,i2))); @@ -22,5 +22,9 @@ if (s62_max_dem_bioplastic <> 0, p62_dem_bioplastic(t,i)$(m_year(t)>2020) = s62_max_dem_bioplastic / (1 + exp(-s62_growth_rate_bioplastic*(m_year(t)-s62_midpoint_dem_bioplastic))) * (im_pop(t,i) / sum(i2, im_pop(t,i2))); ); +if (s62_include_bioplastic = 0, + p62_dem_bioplastic(t,i)$(m_year(t)>2020) = 0; +); + * translate bioplastic demand to biomass demand using conversion factors between bioplastic and the different biomass sources p62_bioplastic_substrate(t,i,kall) = p62_dem_bioplastic(t,i) * f62_biomass2bioplastic_conversion_ratio(kall); diff --git a/modules/62_material/exo_flexreg_apr16/presolve.gms b/modules/62_material/exo_flexreg_apr16/presolve.gms index c86fbd6bd3..6931ccf800 100644 --- a/modules/62_material/exo_flexreg_apr16/presolve.gms +++ b/modules/62_material/exo_flexreg_apr16/presolve.gms @@ -30,5 +30,9 @@ if (sum(sameas(t_past,t),1) = 1, p62_bioplastic_substrate_double_counted(t,i,kall) = p62_bioplastic_substrate(t,i,kall); p62_bioplastic_substrate_lastcalibyear(i,kall) = p62_bioplastic_substrate(t,i,kall); else - p62_bioplastic_substrate_double_counted(t,i,kall) = p62_bioplastic_substrate_lastcalibyear(i,kall) * p62_scaling_factor(i); + if (s62_include_bioplastic = 0, + p62_bioplastic_substrate_double_counted(t,i,kall) = 0; + else + p62_bioplastic_substrate_double_counted(t,i,kall) = p62_bioplastic_substrate_lastcalibyear(i,kall) * p62_scaling_factor(i); + ); ); diff --git a/modules/70_livestock/fbask_jan16/declarations.gms b/modules/70_livestock/fbask_jan16/declarations.gms index c824516eb4..eb9caad503 100644 --- a/modules/70_livestock/fbask_jan16/declarations.gms +++ b/modules/70_livestock/fbask_jan16/declarations.gms @@ -8,8 +8,8 @@ positive variables vm_dem_feed(i,kap,kall) Regional feed demand including byproducts (mio. tDM per yr) - vm_cost_prod_livst(i,factors) Livestock factor costs (mio. USD05MER per yr) - vm_cost_prod_fish(i) Fish factor costs (mio. USD05MER per yr) + vm_cost_prod_livst(i,factors) Livestock factor costs (mio. USD17MER per yr) + vm_cost_prod_fish(i) Fish factor costs (mio. USD17MER per yr) ; equations @@ -30,12 +30,10 @@ parameters pm_past_mngmnt_factor(t,i) Regional pasture management intensification factor (1) i70_cereal_scp_fadeout(t_all,i) Cereal feed fadeout (share 0-1) to be replaced by SCP (1) i70_foddr_scp_fadeout(t_all,i) Fodder fadeout (share 0-1) to be replaced by SCP (1) - p70_country_dummy(iso) Dummy parameter indicating whether country is affected by feed scenarios (1) + p70_country_switch(iso) Switch indicating whether country is affected by feed scenarios (1) p70_feedscen_region_shr(t_all,i) Weighted share of region with regards to feed scenario of countries (1) - p70_cost_share_livst(t,i,factors) Capital and labor shares of the regional factor costs for plant production for livestock (1) - p70_cost_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1) i70_cost_regr(i,kap,cost_regr) Regression coefficients for livestock factor requirements (1) - i70_fac_req_livst(t_all,i,kli) Factor requirements (USD05MER per tDM) + i70_fac_req_livst(t_all,i,kli) Factor requirements (USD17MER per tDM) p70_cereal_subst_fader(t_all) Cereal feed substitution with SCP fader (1) p70_foddr_subst_fader(t_all) Foddr substitution with SCP fader (1) ; @@ -44,8 +42,8 @@ parameters *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov_dem_feed(t,i,kap,kall,type) Regional feed demand including byproducts (mio. tDM per yr) - ov_cost_prod_livst(t,i,factors,type) Livestock factor costs (mio. USD05MER per yr) - ov_cost_prod_fish(t,i,type) Fish factor costs (mio. USD05MER per yr) + ov_cost_prod_livst(t,i,factors,type) Livestock factor costs (mio. USD17MER per yr) + ov_cost_prod_fish(t,i,type) Fish factor costs (mio. USD17MER per yr) oq70_feed(t,i,kap,kall,type) Regional feed demand oq70_cost_prod_liv_labor(t,i,type) Regional labor costs for livestock production oq70_cost_prod_liv_capital(t,i,type) Regional capital costs for livestock production diff --git a/modules/70_livestock/fbask_jan16/equations.gms b/modules/70_livestock/fbask_jan16/equations.gms index 53e594a19c..7773d8e6f8 100644 --- a/modules/70_livestock/fbask_jan16/equations.gms +++ b/modules/70_livestock/fbask_jan16/equations.gms @@ -35,12 +35,12 @@ q70_feed(i2,kap,kall) .. q70_cost_prod_liv_labor(i2) .. vm_cost_prod_livst(i2,"labor") =e= sum(kli, vm_prod_reg(i2,kli) * sum(ct, i70_fac_req_livst(ct,i2,kli))) - *sum(ct, p70_cost_share_livst(ct,i2,"labor")) + *sum(ct, pm_factor_cost_shares(ct,i2,"labor")) *sum(ct, (1/pm_productivity_gain_from_wages(ct,i2)) * (pm_hourly_costs(ct,i2,"scenario") / pm_hourly_costs(ct,i2,"baseline"))); q70_cost_prod_liv_capital(i2) .. vm_cost_prod_livst(i2,"capital") =e= sum(kli, vm_prod_reg(i2,kli) * sum(ct, i70_fac_req_livst(ct,i2,kli))) - *sum(ct, p70_cost_share_livst(ct,i2,"capital")); + *sum(ct, pm_factor_cost_shares(ct,i2,"capital")); q70_cost_prod_fish(i2) .. vm_cost_prod_fish(i2) =e= diff --git a/modules/70_livestock/fbask_jan16/input.gms b/modules/70_livestock/fbask_jan16/input.gms index a3acdbac2f..6161ae4a10 100644 --- a/modules/70_livestock/fbask_jan16/input.gms +++ b/modules/70_livestock/fbask_jan16/input.gms @@ -46,7 +46,7 @@ $ondelim $include "./modules/70_livestock/fbask_jan16/input/f70_livestock_productivity.cs3" $offdelim; -table f70_cost_regr(kap,cost_regr) Factor requirements livestock (USD04 per tDM (A) and USD (B)) +table f70_cost_regr(kap,cost_regr) Factor requirements livestock (USD17MER per tDM (A) and USD17MER (B)) $ondelim $include "./modules/70_livestock/fbask_jan16/input/f70_capit_liv_regr.csv" $offdelim @@ -67,21 +67,7 @@ $include "./modules/70_livestock/fbask_jan16/input/f70_pyld_slope_reg.cs4" $offdelim /; -parameter f70_cap_share_reg(share_regr) Parameters for regression -/ -$ondelim -$include "./modules/70_livestock/fbask_jan16/input/f70_cap_share_reg.csv" -$offdelim -/ -; - -table f70_hist_cap_share(t_all,i) Historical capital share -$ondelim -$include "./modules/70_livestock/fbask_jan16/input/f70_hist_cap_share.csv" -$offdelim -; - -table f70_hist_factor_costs_livst(t_all,i,kli) Historical factor costs in livestock production (mio. USD05MER) +table f70_hist_factor_costs_livst(t_all,i,kli) Historical factor costs in livestock production (mio. USD17MER) $ondelim $include "./modules/70_livestock/fbask_jan16/input/f70_hist_factor_costs_livst.cs3" $offdelim diff --git a/modules/70_livestock/fbask_jan16/input/files b/modules/70_livestock/fbask_jan16/input/files index ca00704e44..8de709636b 100644 --- a/modules/70_livestock/fbask_jan16/input/files +++ b/modules/70_livestock/fbask_jan16/input/files @@ -5,7 +5,5 @@ f70_livestock_productivity.cs3 f70_capit_liv_regr.csv f70_slaughter_feed_share.cs4 f70_pyld_slope_reg.cs4 -f70_cap_share_reg.csv -f70_hist_cap_share.csv f70_hist_factor_costs_livst.cs3 f70_hist_prod_livst.cs3 diff --git a/modules/70_livestock/fbask_jan16/preloop.gms b/modules/70_livestock/fbask_jan16/preloop.gms index 4564602ff2..5a8c12632b 100644 --- a/modules/70_livestock/fbask_jan16/preloop.gms +++ b/modules/70_livestock/fbask_jan16/preloop.gms @@ -21,14 +21,14 @@ i70_livestock_productivity(t_all,i,sys)$(i70_livestock_productivity(t_all,i,sys) * Switch to determine countries for which feed substitution scenarios shall be applied. * In the default case, the food scenario affects all countries when activated. -p70_country_dummy(iso) = 0; -p70_country_dummy(scen_countries70) = 1; +p70_country_switch(iso) = 0; +p70_country_switch(scen_countries70) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by their population size. -p70_feedscen_region_shr(t_all,i) = sum(i_to_iso(i,iso), p70_country_dummy(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); +p70_feedscen_region_shr(t_all,i) = sum(i_to_iso(i,iso), p70_country_switch(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); if (s70_subst_functional_form = 1, diff --git a/modules/70_livestock/fbask_jan16/presolve.gms b/modules/70_livestock/fbask_jan16/presolve.gms index ad6b37a10a..59c9667511 100644 --- a/modules/70_livestock/fbask_jan16/presolve.gms +++ b/modules/70_livestock/fbask_jan16/presolve.gms @@ -55,16 +55,6 @@ else *' @stop -p70_cost_share_calibration(i) = f70_hist_cap_share("y2010",i)-(f70_cap_share_reg("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso("y2010",iso)))+f70_cap_share_reg("intercept")); - -if (m_year(t)<2010, - p70_cost_share_livst(t,i,"capital") = f70_hist_cap_share(t,i); - p70_cost_share_livst(t,i,"labor") = 1 - f70_hist_cap_share(t,i); - -elseif (m_year(t)>=2010), - p70_cost_share_livst(t,i,"capital") = f70_cap_share_reg("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso(t,iso)))+f70_cap_share_reg("intercept")+p70_cost_share_calibration(i); - p70_cost_share_livst(t,i,"labor") = 1 - p70_cost_share_livst(t,i,"capital"); -); diff --git a/modules/70_livestock/fbask_jan16/realization.gms b/modules/70_livestock/fbask_jan16/realization.gms index 97f9aa4279..c3b44b9ebc 100644 --- a/modules/70_livestock/fbask_jan16/realization.gms +++ b/modules/70_livestock/fbask_jan16/realization.gms @@ -84,6 +84,7 @@ $Ifi "%phase%" == "sets" $include "./modules/70_livestock/fbask_jan16/sets.gms" $Ifi "%phase%" == "declarations" $include "./modules/70_livestock/fbask_jan16/declarations.gms" $Ifi "%phase%" == "input" $include "./modules/70_livestock/fbask_jan16/input.gms" $Ifi "%phase%" == "equations" $include "./modules/70_livestock/fbask_jan16/equations.gms" +$Ifi "%phase%" == "scaling" $include "./modules/70_livestock/fbask_jan16/scaling.gms" $Ifi "%phase%" == "preloop" $include "./modules/70_livestock/fbask_jan16/preloop.gms" $Ifi "%phase%" == "presolve" $include "./modules/70_livestock/fbask_jan16/presolve.gms" $Ifi "%phase%" == "postsolve" $include "./modules/70_livestock/fbask_jan16/postsolve.gms" diff --git a/modules/70_livestock/scaling.gms b/modules/70_livestock/fbask_jan16/scaling.gms similarity index 100% rename from modules/70_livestock/scaling.gms rename to modules/70_livestock/fbask_jan16/scaling.gms diff --git a/modules/70_livestock/fbask_jan16_sticky/declarations.gms b/modules/70_livestock/fbask_jan16_sticky/declarations.gms index 87bfd6c37e..3d342abd78 100644 --- a/modules/70_livestock/fbask_jan16_sticky/declarations.gms +++ b/modules/70_livestock/fbask_jan16_sticky/declarations.gms @@ -8,9 +8,9 @@ positive variables vm_dem_feed(i,kap,kall) Regional feed demand including byproducts (mio. tDM per yr) - vm_cost_prod_livst(i,factors) Livestock factor costs (mio. USD05MER per yr) - vm_cost_prod_fish(i) Fish factor costs (mio. USD05MER per yr) - v70_investment(i,kli) Investment in immobile farm capital (mio USD05MER per yr) + vm_cost_prod_livst(i,factors) Livestock factor costs (mio. USD17MER per yr) + vm_cost_prod_fish(i) Fish factor costs (mio. USD17MER per yr) + v70_investment(i,kli) Investment in immobile farm capital (mio USD17MER per yr) ; equations @@ -32,16 +32,14 @@ parameters pm_past_mngmnt_factor(t,i) Regional pasture management intensification factor (1) i70_cereal_scp_fadeout(t_all,i) Cereal feed fadeout (share 0-1) to be replaced by SCP (1) i70_foddr_scp_fadeout(t_all,i) Fodder fadeout (share 0-1) to be replaced by SCP (1) - p70_country_dummy(iso) Dummy parameter indicating whether country is affected by feed scenarios (1) + p70_country_switch(iso) Switch indicating whether country is affected by feed scenarios (1) p70_feedscen_region_shr(t_all,i) Weighted share of region with regards to feed scenario of countries (1) - p70_cost_share_livst(t,i,factors) Capital and labor shares of the regional factor costs for plant production for livestock (1) - p70_cost_share_calibration(i) Summation factor used to calibrate calculated capital shares with historical values (1) i70_cost_regr(i,kap,cost_regr) Regression coefficients for livestock factor requirements (1) - i70_fac_req_livst(t_all,i,kli) Factor requirements (USD05MER per tDM) + i70_fac_req_livst(t_all,i,kli) Factor requirements (USD17MER per tDM) p70_cereal_subst_fader(t_all) Cereal feed substitution with SCP fader (1) p70_foddr_subst_fader(t_all) Foddr substitution with SCP fader (1) - p70_capital_need(t,i,kli) Capital requirements per unit of output (USD05MER per ton DM) - p70_capital(t,i,kli) Preexisting immobile capital stocks before investment (mio USD05MER) + p70_capital_need(t,i,kli) Capital requirements per unit of output (USD17MER per ton DM) + p70_capital(t,i,kli) Preexisting immobile capital stocks before investment (mio USD17MER) p70_initial_1995_prod(i,kli) Initial regional production of livestock products taken from 1995 (mio ton DM) ; @@ -49,9 +47,9 @@ parameters *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov_dem_feed(t,i,kap,kall,type) Regional feed demand including byproducts (mio. tDM per yr) - ov_cost_prod_livst(t,i,factors,type) Livestock factor costs (mio. USD05MER per yr) - ov_cost_prod_fish(t,i,type) Fish factor costs (mio. USD05MER per yr) - ov70_investment(t,i,kli,type) Investment in immobile farm capital (mio USD05MER per yr) + ov_cost_prod_livst(t,i,factors,type) Livestock factor costs (mio. USD17MER per yr) + ov_cost_prod_fish(t,i,type) Fish factor costs (mio. USD17MER per yr) + ov70_investment(t,i,kli,type) Investment in immobile farm capital (mio USD17MER per yr) oq70_feed(t,i,kap,kall,type) Regional feed demand oq70_cost_prod_liv_labor(t,i,type) Regional labor costs for livestock production oq70_cost_prod_liv_capital(t,i,type) Regional investment costs in farm capital diff --git a/modules/70_livestock/fbask_jan16_sticky/equations.gms b/modules/70_livestock/fbask_jan16_sticky/equations.gms index 5febb63386..4a5b32746c 100644 --- a/modules/70_livestock/fbask_jan16_sticky/equations.gms +++ b/modules/70_livestock/fbask_jan16_sticky/equations.gms @@ -35,7 +35,7 @@ q70_feed(i2,kap,kall) .. q70_cost_prod_liv_labor(i2) .. vm_cost_prod_livst(i2,"labor") =e= sum(kli, vm_prod_reg(i2,kli) * sum(ct, i70_fac_req_livst(ct,i2,kli))) - *sum(ct, p70_cost_share_livst(ct,i2,"labor")) + *sum(ct, pm_factor_cost_shares(ct,i2,"labor")) *sum(ct, (1/pm_productivity_gain_from_wages(ct,i2)) * (pm_hourly_costs(ct,i2,"scenario") / pm_hourly_costs(ct,i2,"baseline"))); diff --git a/modules/70_livestock/fbask_jan16_sticky/input.gms b/modules/70_livestock/fbask_jan16_sticky/input.gms index 9981c2e4bb..6b17181e57 100644 --- a/modules/70_livestock/fbask_jan16_sticky/input.gms +++ b/modules/70_livestock/fbask_jan16_sticky/input.gms @@ -48,7 +48,7 @@ $ondelim $include "./modules/70_livestock/fbask_jan16_sticky/input/f70_livestock_productivity.cs3" $offdelim; -table f70_cost_regr(kap,cost_regr) Factor requirements livestock (USD04 per tDM (A) and USD (B)) +table f70_cost_regr(kap,cost_regr) Factor requirements livestock (USD17MER per tDM (A) and USD17MER (B)) $ondelim $include "./modules/70_livestock/fbask_jan16_sticky/input/f70_capit_liv_regr.csv" $offdelim @@ -69,21 +69,7 @@ $include "./modules/70_livestock/fbask_jan16_sticky/input/f70_pyld_slope_reg.cs4 $offdelim /; -parameter f70_cap_share_reg(share_regr) Parameters for regression -/ -$ondelim -$include "./modules/70_livestock/fbask_jan16_sticky/input/f70_cap_share_reg.csv" -$offdelim -/ -; - -table f70_hist_cap_share(t_all,i) Historical capital share -$ondelim -$include "./modules/70_livestock/fbask_jan16_sticky/input/f70_hist_cap_share.csv" -$offdelim -; - -table f70_hist_factor_costs_livst(t_all,i,kli) Historical factor costs in livestock production (mio. USD05MER) +table f70_hist_factor_costs_livst(t_all,i,kli) Historical factor costs in livestock production (mio. USD17MER) $ondelim $include "./modules/70_livestock/fbask_jan16_sticky/input/f70_hist_factor_costs_livst.cs3" $offdelim diff --git a/modules/70_livestock/fbask_jan16_sticky/input/files b/modules/70_livestock/fbask_jan16_sticky/input/files index ca00704e44..8de709636b 100644 --- a/modules/70_livestock/fbask_jan16_sticky/input/files +++ b/modules/70_livestock/fbask_jan16_sticky/input/files @@ -5,7 +5,5 @@ f70_livestock_productivity.cs3 f70_capit_liv_regr.csv f70_slaughter_feed_share.cs4 f70_pyld_slope_reg.cs4 -f70_cap_share_reg.csv -f70_hist_cap_share.csv f70_hist_factor_costs_livst.cs3 f70_hist_prod_livst.cs3 diff --git a/modules/70_livestock/fbask_jan16_sticky/preloop.gms b/modules/70_livestock/fbask_jan16_sticky/preloop.gms index 1e223d4a72..7ef03f7794 100644 --- a/modules/70_livestock/fbask_jan16_sticky/preloop.gms +++ b/modules/70_livestock/fbask_jan16_sticky/preloop.gms @@ -21,14 +21,14 @@ i70_livestock_productivity(t_all,i,sys)$(i70_livestock_productivity(t_all,i,sys) * Switch to determine countries for which feed substitution scenarios shall be applied. * In the default case, the food scenario affects all countries when activated. -p70_country_dummy(iso) = 0; -p70_country_dummy(scen_countries70) = 1; +p70_country_switch(iso) = 0; +p70_country_switch(scen_countries70) = 1; * Because MAgPIE is not run at country-level, but at region level, a region * share is calculated that translates the countries' influence to regional level. * Countries are weighted by their population size. -p70_feedscen_region_shr(t_all,i) = sum(i_to_iso(i,iso), p70_country_dummy(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); +p70_feedscen_region_shr(t_all,i) = sum(i_to_iso(i,iso), p70_country_switch(iso) * im_pop_iso(t_all,iso)) / sum(i_to_iso(i,iso), im_pop_iso(t_all,iso)); if (s70_subst_functional_form = 1, diff --git a/modules/70_livestock/fbask_jan16_sticky/presolve.gms b/modules/70_livestock/fbask_jan16_sticky/presolve.gms index 528f02b6f4..d78de1a773 100644 --- a/modules/70_livestock/fbask_jan16_sticky/presolve.gms +++ b/modules/70_livestock/fbask_jan16_sticky/presolve.gms @@ -55,17 +55,6 @@ else *' @stop -p70_cost_share_calibration(i) = f70_hist_cap_share("y2010",i)-(f70_cap_share_reg("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso("y2010",iso)))+f70_cap_share_reg("intercept")); - -if (m_year(t)<2010, - p70_cost_share_livst(t,i,"capital") = f70_hist_cap_share(t,i); - p70_cost_share_livst(t,i,"labor") = 1 - f70_hist_cap_share(t,i); - -elseif (m_year(t)>=2010), - p70_cost_share_livst(t,i,"capital") = f70_cap_share_reg("slope")*log10(sum(i_to_iso(i,iso),im_gdp_pc_ppp_iso(t,iso)))+f70_cap_share_reg("intercept")+p70_cost_share_calibration(i); - p70_cost_share_livst(t,i,"labor") = 1 - p70_cost_share_livst(t,i,"capital"); -); - *** Section implementing the "sticky" part of the realization *' The capital need per unit of production is based on the capital share of the factor requirements, @@ -73,7 +62,7 @@ elseif (m_year(t)>=2010), *' In addition `s70_multiplicator_capital_need` can be used to increase the capital need. p70_capital_need(t,i,kli) = i70_fac_req_livst(t,i,kli) - * p70_cost_share_livst(t,i,"capital") + * pm_factor_cost_shares(t,i,"capital") / (pm_interest(t,i)+s70_depreciation_rate) * s70_multiplicator_capital_need; diff --git a/modules/70_livestock/fbask_jan16_sticky/realization.gms b/modules/70_livestock/fbask_jan16_sticky/realization.gms index 46ff7d5323..734972e767 100644 --- a/modules/70_livestock/fbask_jan16_sticky/realization.gms +++ b/modules/70_livestock/fbask_jan16_sticky/realization.gms @@ -102,6 +102,7 @@ $Ifi "%phase%" == "sets" $include "./modules/70_livestock/fbask_jan16_sticky/set $Ifi "%phase%" == "declarations" $include "./modules/70_livestock/fbask_jan16_sticky/declarations.gms" $Ifi "%phase%" == "input" $include "./modules/70_livestock/fbask_jan16_sticky/input.gms" $Ifi "%phase%" == "equations" $include "./modules/70_livestock/fbask_jan16_sticky/equations.gms" +$Ifi "%phase%" == "scaling" $include "./modules/70_livestock/fbask_jan16_sticky/scaling.gms" $Ifi "%phase%" == "preloop" $include "./modules/70_livestock/fbask_jan16_sticky/preloop.gms" $Ifi "%phase%" == "presolve" $include "./modules/70_livestock/fbask_jan16_sticky/presolve.gms" $Ifi "%phase%" == "postsolve" $include "./modules/70_livestock/fbask_jan16_sticky/postsolve.gms" diff --git a/modules/10_land/landmatrix_dec18/preloop.gms b/modules/70_livestock/fbask_jan16_sticky/scaling.gms similarity index 83% rename from modules/10_land/landmatrix_dec18/preloop.gms rename to modules/70_livestock/fbask_jan16_sticky/scaling.gms index 3a209b115b..120fe57164 100644 --- a/modules/10_land/landmatrix_dec18/preloop.gms +++ b/modules/70_livestock/fbask_jan16_sticky/scaling.gms @@ -4,3 +4,7 @@ *** | AGPL-3.0, you are granted additional permissions described in the *** | MAgPIE License Exception, version 1.0 (see LICENSE file). *** | Contact: magpie@pik-potsdam.de + + +vm_cost_prod_livst.scale(i,factors) = 10e5; +vm_cost_prod_fish.scale(i) = 10e5; diff --git a/modules/71_disagg_lvst/foragebased_aug18/declarations.gms b/modules/71_disagg_lvst/foragebased_aug18/declarations.gms index 7b9b964599..2a56b7fc4d 100644 --- a/modules/71_disagg_lvst/foragebased_aug18/declarations.gms +++ b/modules/71_disagg_lvst/foragebased_aug18/declarations.gms @@ -8,7 +8,7 @@ positive variables v71_prod_rum(j,kli_rum,kforage) Production of forage fed ruminants within a cell (mio. tDM per yr) v71_additional_mon(j, kli_mon) Additional punished production of monogastric livestock (mio. tDM per yr) - vm_costs_additional_mon(i) Punishment cost for additionally transported monogastric livst_egg (mio. USD05MER per yr) + vm_costs_additional_mon(i) Punishment cost for additionally transported monogastric livst_egg (mio. USD17MER per yr) ; variables @@ -20,7 +20,7 @@ equations q71_balanceflow_constraint(j,kli_rum,kforage) Nonlinear balanceflow constraint for cellular forage feed products (mio. tDM per yr) q71_sum_rum_liv(j,kli_rum) Total production of forage fed ruminants (mio. tDM per yr) q71_prod_mon_liv(j,kli_mon) Production constraint for monogastric livestock products (mio. tDM per yr) - q71_punishment_mon(i) Punishment for additional monogastrics (mio. USD05MER per yr) + q71_punishment_mon(i) Punishment for additional monogastrics (mio. USD17MER per yr) ; parameters @@ -29,19 +29,19 @@ parameters scalars s71_scale_mon Scalar for flexible distribution of monogastrics (1) - s71_punish_additional_mon Scaling factor for transport punishment (USD05MER per tDM) + s71_punish_additional_mon Scaling factor for transport punishment (USD17MER per tDM) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov71_prod_rum(t,j,kli_rum,kforage,type) Production of forage fed ruminants within a cell (mio. tDM per yr) ov71_additional_mon(t,j,kli_mon,type) Additional punished production of monogastric livestock (mio. tDM per yr) - ov_costs_additional_mon(t,i,type) Punishment cost for additionally transported monogastric livst_egg (mio. USD05MER per yr) + ov_costs_additional_mon(t,i,type) Punishment cost for additionally transported monogastric livst_egg (mio. USD17MER per yr) ov71_feed_balanceflow_share(t,j,kli_rum,kforage,type) Cellular feed balanceflow multiplier for forage feed for ruminant livestock (1) oq71_feed_rum_liv(t,j,kforage,type) Production constraint for ruminant livestock products (mio. tDM per yr) oq71_balanceflow_constraint(t,j,kli_rum,kforage,type) Nonlinear balanceflow constraint for cellular forage feed products (mio. tDM per yr) oq71_sum_rum_liv(t,j,kli_rum,type) Total production of forage fed ruminants (mio. tDM per yr) oq71_prod_mon_liv(t,j,kli_mon,type) Production constraint for monogastric livestock products (mio. tDM per yr) - oq71_punishment_mon(t,i,type) Punishment for additional monogastrics (mio. USD05MER per yr) + oq71_punishment_mon(t,i,type) Punishment for additional monogastrics (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/71_disagg_lvst/foragebased_aug18/realization.gms b/modules/71_disagg_lvst/foragebased_aug18/realization.gms index 00e90d4012..94a0fdc42f 100644 --- a/modules/71_disagg_lvst/foragebased_aug18/realization.gms +++ b/modules/71_disagg_lvst/foragebased_aug18/realization.gms @@ -24,7 +24,6 @@ $Ifi "%phase%" == "sets" $include "./modules/71_disagg_lvst/foragebased_aug18/sets.gms" $Ifi "%phase%" == "declarations" $include "./modules/71_disagg_lvst/foragebased_aug18/declarations.gms" $Ifi "%phase%" == "equations" $include "./modules/71_disagg_lvst/foragebased_aug18/equations.gms" -$Ifi "%phase%" == "scaling" $include "./modules/71_disagg_lvst/foragebased_aug18/scaling.gms" $Ifi "%phase%" == "preloop" $include "./modules/71_disagg_lvst/foragebased_aug18/preloop.gms" $Ifi "%phase%" == "postsolve" $include "./modules/71_disagg_lvst/foragebased_aug18/postsolve.gms" *######################## R SECTION END (PHASES) ############################### diff --git a/modules/71_disagg_lvst/foragebased_jul23/declarations.gms b/modules/71_disagg_lvst/foragebased_jul23/declarations.gms index e49d436e04..0144c4973e 100644 --- a/modules/71_disagg_lvst/foragebased_jul23/declarations.gms +++ b/modules/71_disagg_lvst/foragebased_jul23/declarations.gms @@ -8,7 +8,7 @@ positive variables v71_feed_forage(j, kforage) Production of forage within a cell (mio. tDM per yr) v71_additional_mon(j, kli_mon) Additional punished production of monogastric livestock (mio. tDM per yr) - vm_costs_additional_mon(i) Punishment cost for additionally transported monogastric livst_egg (mio. USD05MER per yr) + vm_costs_additional_mon(i) Punishment cost for additionally transported monogastric livst_egg (mio. USD17MER per yr) ; variables @@ -21,7 +21,7 @@ equations q71_feed_balanceflow_nlp(j) Non-linear balanceflow constraint for forage feed products (mio. tDM per yr) q71_feed_balanceflow_lp(i) Linear balanceflow constraint for forage feed products (mio. tDM per yr) q71_prod_mon_liv(j,kli_mon) Production constraint for monogastric livestock products (mio. tDM per yr) - q71_punishment_mon(i) Punishment for additional monogastrics (mio. USD05MER per yr) + q71_punishment_mon(i) Punishment for additional monogastrics (mio. USD17MER per yr) ; parameters @@ -31,20 +31,20 @@ parameters scalars s71_lp_fix Switch to fix equations to linear relation (Logical) s71_scale_mon Scalar for flexible distribution of monogastrics (1) - s71_punish_additional_mon Scaling factor for transport punishment (USD05MER per tDM) + s71_punish_additional_mon Scaling factor for transport punishment (USD17MER per tDM) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters ov71_feed_forage(t,j,kforage,type) Production of forage within a cell (mio. tDM per yr) ov71_additional_mon(t,j,kli_mon,type) Additional punished production of monogastric livestock (mio. tDM per yr) - ov_costs_additional_mon(t,i,type) Punishment cost for additionally transported monogastric livst_egg (mio. USD05MER per yr) + ov_costs_additional_mon(t,i,type) Punishment cost for additionally transported monogastric livst_egg (mio. USD17MER per yr) ov71_feed_balanceflow(t,j,kforage,type) Cellular feed balanceflow for forage feed for ruminant livestock (mio. tDM per yr) oq71_feed_rum_liv(t,j,kforage,type) Production constraint for ruminant livestock products (mio. tDM per yr) oq71_feed_forage(t,j,type) Forage feed constraint (mio. tDM per yr) oq71_feed_balanceflow_nlp(t,j,type) Non-linear balanceflow constraint for forage feed products (mio. tDM per yr) oq71_feed_balanceflow_lp(t,i,type) Linear balanceflow constraint for forage feed products (mio. tDM per yr) oq71_prod_mon_liv(t,j,kli_mon,type) Production constraint for monogastric livestock products (mio. tDM per yr) - oq71_punishment_mon(t,i,type) Punishment for additional monogastrics (mio. USD05MER per yr) + oq71_punishment_mon(t,i,type) Punishment for additional monogastrics (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/71_disagg_lvst/foragebased_jul23/realization.gms b/modules/71_disagg_lvst/foragebased_jul23/realization.gms index 638bb9c520..d1cb9f6507 100644 --- a/modules/71_disagg_lvst/foragebased_jul23/realization.gms +++ b/modules/71_disagg_lvst/foragebased_jul23/realization.gms @@ -24,7 +24,6 @@ $Ifi "%phase%" == "sets" $include "./modules/71_disagg_lvst/foragebased_jul23/sets.gms" $Ifi "%phase%" == "declarations" $include "./modules/71_disagg_lvst/foragebased_jul23/declarations.gms" $Ifi "%phase%" == "equations" $include "./modules/71_disagg_lvst/foragebased_jul23/equations.gms" -$Ifi "%phase%" == "scaling" $include "./modules/71_disagg_lvst/foragebased_jul23/scaling.gms" $Ifi "%phase%" == "preloop" $include "./modules/71_disagg_lvst/foragebased_jul23/preloop.gms" $Ifi "%phase%" == "postsolve" $include "./modules/71_disagg_lvst/foragebased_jul23/postsolve.gms" $Ifi "%phase%" == "nl_fix" $include "./modules/71_disagg_lvst/foragebased_jul23/nl_fix.gms" diff --git a/modules/71_disagg_lvst/foragebased_jul23/scaling.gms b/modules/71_disagg_lvst/foragebased_jul23/scaling.gms deleted file mode 100644 index c3e721d03f..0000000000 --- a/modules/71_disagg_lvst/foragebased_jul23/scaling.gms +++ /dev/null @@ -1,10 +0,0 @@ -*** | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -*** | authors, and contributors see CITATION.cff file. This file is part -*** | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -*** | AGPL-3.0, you are granted additional permissions described in the -*** | MAgPIE License Exception, version 1.0 (see LICENSE file). -*** | Contact: magpie@pik-potsdam.de - -vm_costs_additional_mon.scale(i) = 10e4; -*Don't scale this variable. Model is very sensitive to scaling this variable and might become infeasible or very slow. -*v71_feed_balanceflow.scale(j,kforage) = 10e3; diff --git a/modules/71_disagg_lvst/off/declarations.gms b/modules/71_disagg_lvst/off/declarations.gms index a239efbfba..85cd6bce1c 100644 --- a/modules/71_disagg_lvst/off/declarations.gms +++ b/modules/71_disagg_lvst/off/declarations.gms @@ -6,10 +6,10 @@ *** | Contact: magpie@pik-potsdam.de positive variables - vm_costs_additional_mon(i) Punishment cost for additionally transported monogastric livst_egg (mio. USD05MER per yr) + vm_costs_additional_mon(i) Punishment cost for additionally transported monogastric livst_egg (mio. USD17MER per yr) ; *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_costs_additional_mon(t,i,type) Punishment cost for additionally transported monogastric livst_egg (mio. USD05MER per yr) + ov_costs_additional_mon(t,i,type) Punishment cost for additionally transported monogastric livst_egg (mio. USD17MER per yr) ; *##################### R SECTION END (OUTPUT DECLARATIONS) ##################### diff --git a/modules/73_timber/default/declarations.gms b/modules/73_timber/default/declarations.gms index 67ced42c84..6f18cf0548 100644 --- a/modules/73_timber/default/declarations.gms +++ b/modules/73_timber/default/declarations.gms @@ -15,17 +15,17 @@ p73_demand_modifier(t_all) Simp p73_fraction(t_all) Fraction over which construction wood demand is spread out (1) p73_demand_constr_wood(t_all,i) Demand for construction wood (mio. tDM per yr) p73_fraction_sm_fix Modifier fraction at sm_fix_SSP2 time step (1) -im_timber_prod_cost(kforestry) Cost for producing one unit of wood and woodfuel (USD per tDM) +im_timber_prod_cost(kforestry) Cost for producing one unit of wood and woodfuel (USD17MER per tDM) ; positive variables -vm_cost_timber(i) Actual cost of harvesting timber from forests (mio. USD per yr) +vm_cost_timber(i) Actual cost of harvesting timber from forests (mio. USD17MER per yr) v73_prod_heaven_timber(j,kforestry) Production of woody biomass from heaven (mio. tDM per yr) v73_prod_residues(j) Production of residues from industrial roundwood harvest (mio. tDM per yr) ; equations -q73_cost_timber(i) Actual cost of harvesting timber from forests (mio. USD per yr) +q73_cost_timber(i) Actual cost of harvesting timber from forests (mio. USD17MER per yr) q73_prod_wood(j) Production of industrial roundwood (mio. tDM per yr) q73_prod_woodfuel(j) Production of wood fuel (mio. tDM per yr) q73_prod_residues(j) Production of residues from industrial roundwood harvest (mio. tDM per yr) @@ -34,10 +34,10 @@ q73_prod_residues(j) Prod *#################### R SECTION START (OUTPUT DECLARATIONS) #################### parameters - ov_cost_timber(t,i,type) Actual cost of harvesting timber from forests (mio. USD per yr) + ov_cost_timber(t,i,type) Actual cost of harvesting timber from forests (mio. USD17MER per yr) ov73_prod_heaven_timber(t,j,kforestry,type) Production of woody biomass from heaven (mio. tDM per yr) ov73_prod_residues(t,j,type) Production of residues from industrial roundwood harvest (mio. tDM per yr) - oq73_cost_timber(t,i,type) Actual cost of harvesting timber from forests (mio. USD per yr) + oq73_cost_timber(t,i,type) Actual cost of harvesting timber from forests (mio. USD17MER per yr) oq73_prod_wood(t,j,type) Production of industrial roundwood (mio. tDM per yr) oq73_prod_woodfuel(t,j,type) Production of wood fuel (mio. tDM per yr) oq73_prod_residues(t,j,type) Production of residues from industrial roundwood harvest (mio. tDM per yr) diff --git a/modules/73_timber/default/input.gms b/modules/73_timber/default/input.gms index 91d789b5a2..50c4676f57 100644 --- a/modules/73_timber/default/input.gms +++ b/modules/73_timber/default/input.gms @@ -15,13 +15,14 @@ scalars * 60 EUR/m3 = 72 USD/m3 * 72 USD/m3 / 0.6 = 120 USD/tDM * https://unece.org/forests/prices - s73_timber_prod_cost_wood Cost for producing one unit of wood (USD per tDM) / 120 / - s73_timber_prod_cost_woodfuel Cost for prodcing one unit of woodfuel (USD per tDM) / 60 / - s73_free_prod_cost Very high cost for settling demand without production (USD per tDM) / 20000 / +* inflated using USD05 --> USD17 rate of 1.23 + s73_timber_prod_cost_wood Cost for producing one unit of wood (USD17MER per tDM) / 148 / + s73_timber_prod_cost_woodfuel Cost for prodcing one unit of woodfuel (USD17MER per tDM) / 74 / + s73_free_prod_cost Very high cost for settling demand without production (USD17MER per tDM) / 1e+06 / s73_timber_demand_switch Logical switch to turn on or off timber demand 1=on 0=off (1) / 1 / s73_increase_ceiling Limiter for not allowing a demand jump between time steps beyond a certain limit (1) / 1.025 / s73_residue_ratio Proportion of overall industrial roundwood production which ends up as residue during harvest (1) / 0.15 / - s73_reisdue_removal_cost Cost of removing residues left after industrial roundwood harvest (USD per tDM) / 2 / + s73_reisdue_removal_cost Cost of removing residues left after industrial roundwood harvest (USD17MER per tDM) / 2.5 / s73_expansion Construction wood demand expansion factor by end of century based on industrial roundwood demand as base (1=100 percent increase) / 0 / ; diff --git a/modules/73_timber/default/scaling.gms b/modules/73_timber/default/scaling.gms index 4741722426..1c85838a24 100644 --- a/modules/73_timber/default/scaling.gms +++ b/modules/73_timber/default/scaling.gms @@ -6,4 +6,3 @@ *** | Contact: magpie@pik-potsdam.de vm_cost_timber.scale(i)$(s73_timber_demand_switch = 1) = 10e4; -v73_prod_heaven_timber.scale(j,kforestry) = 10e-3; diff --git a/modules/80_optimization/lp_nlp_apr17/declarations.gms b/modules/80_optimization/lp_nlp_apr17/declarations.gms index 18bc7ca4d9..514d7bd6fa 100644 --- a/modules/80_optimization/lp_nlp_apr17/declarations.gms +++ b/modules/80_optimization/lp_nlp_apr17/declarations.gms @@ -12,5 +12,5 @@ parameters scalars s80_counter counter (1) - s80_obj_linear linear objective value (mio. USD05MER per yr) + s80_obj_linear linear objective value (mio. USD17MER per yr) ; diff --git a/renv/activate.R b/renv/activate.R index c360bf2962..0eb51088a2 100644 --- a/renv/activate.R +++ b/renv/activate.R @@ -2,7 +2,7 @@ local({ # the requested version of renv - version <- "1.0.9" + version <- "1.0.11" attr(version, "sha") <- NULL # the project directory @@ -368,8 +368,7 @@ local({ quiet = TRUE ) - if ("headers" %in% names(formals(utils::download.file))) - { + if ("headers" %in% names(formals(utils::download.file))) { headers <- renv_bootstrap_download_custom_headers(url) if (length(headers) && is.character(headers)) args$headers <- headers @@ -457,9 +456,8 @@ local({ # add custom headers if available -- note that # utils::available.packages() will pass this to download.file() - if ("headers" %in% names(formals(utils::download.file))) - { - headers <- renv_bootstrap_download_custom_headers(url) + if ("headers" %in% names(formals(utils::download.file))) { + headers <- renv_bootstrap_download_custom_headers(repos) if (length(headers) && is.character(headers)) args$headers <- headers } diff --git a/scripts/npi_ndc/start_npi_ndc.R b/scripts/npi_ndc/start_npi_ndc.R index 9b4681768b..6cd0d67e72 100644 --- a/scripts/npi_ndc/start_npi_ndc.R +++ b/scripts/npi_ndc/start_npi_ndc.R @@ -121,8 +121,8 @@ calc_NPI_NDC <- function(policyregions = "iso", map_file=map_file) getNames(ndc_ad) <- "ndc.forest" #Set all values before 2015 to NPI values; copy the values til 2010 from the NPI data - ndc_ad[,which(getYears(ndc_ad,as.integer=TRUE)<=2020),] <- - npi_ad[,which(getYears(npi_ad,as.integer=TRUE)<=2020),] + ndc_ad[,which(getYears(ndc_ad,as.integer=TRUE)<=2025),] <- + npi_ad[,which(getYears(npi_ad,as.integer=TRUE)<=2025),] cat(paste0(" (time elapsed: ",format(proc.time()["elapsed"]-ptm,width=6,nsmall=2,digits=2),"s)\n")) @@ -155,8 +155,8 @@ calc_NPI_NDC <- function(policyregions = "iso", pol_mapping=pol_mapping, map_file=map_file) getNames(ndc_aolc) <- "ndc.other" #Set all values before 2015 to NPI values; copy the values til 2010 from the NPI data - ndc_aolc[,which(getYears(ndc_aolc,as.integer=TRUE)<=2020),] <- - npi_aolc[,which(getYears(npi_aolc,as.integer=TRUE)<=2020),] + ndc_aolc[,which(getYears(ndc_aolc,as.integer=TRUE)<=2025),] <- + npi_aolc[,which(getYears(npi_aolc,as.integer=TRUE)<=2025),] #write AD and AOLC policies together none_ad_aolc_pol <- mbind(npi_ad,npi_aolc) @@ -182,7 +182,7 @@ calc_NPI_NDC <- function(policyregions = "iso", npi_aff <- droplevels(subset(pol_def, policy=="npi" & landpool=="affore")) addtable(npi_aff[,c(-2,-3)]) npi_aff <- calc_policy(npi_aff, land_stock, pol_type="aff", pol_mapping=pol_mapping, - weight=dimSums(land_stock[,2005,c("crop","past")]), + weight=dimSums(land_stock[,2005,c("crop","past")]) + 10^-10, map_file=map_file) getNames(npi_aff) <- "npi" cat(paste0(" (time elapsed: ",format(proc.time()["elapsed"]-ptm,width=6,nsmall=2,digits=2),"s)\n")) @@ -195,12 +195,12 @@ calc_NPI_NDC <- function(policyregions = "iso", ndc_aff <- droplevels(subset(pol_def, policy=="ndc" & landpool=="affore")) addtable(ndc_aff[,c(-2,-3)]) ndc_aff <- calc_policy(ndc_aff, land_stock, pol_type="aff", pol_mapping=pol_mapping, - weight=dimSums(land_stock[,2005,c("crop","past")]), + weight=dimSums(land_stock[,2005,c("crop","past")]) + 10^-10, map_file=map_file) getNames(ndc_aff) <- "ndc" #set all values before 2015 to NPI values; copy the values til 2010 from the NPI data - ndc_aff[,which(getYears(ndc_aff,as.integer=TRUE)<=2020),] <- - npi_aff[,which(getYears(npi_aff,as.integer=TRUE)<=2020),] + ndc_aff[,which(getYears(ndc_aff,as.integer=TRUE)<=2025),] <- + npi_aff[,which(getYears(npi_aff,as.integer=TRUE)<=2025),] #write AFF policies none_aff_pol <- npi_aff diff --git a/scripts/output/extra/disaggregation.R b/scripts/output/extra/disaggregation.R index e9e31f3367..7c464448e7 100644 --- a/scripts/output/extra/disaggregation.R +++ b/scripts/output/extra/disaggregation.R @@ -87,7 +87,8 @@ if (length(map_file) > 1) { } .dissagLandConsv <- function(gdx, cfg, map_file, wdpa_hr_file, consv_prio_hr_file) { - land_consv_lr <- readGDX(gdx, "p22_conservation_area", react = "silent") + land_consv_lr <- readGDX(gdx, "pm_land_conservation", react = "silent") + land_consv_lr <- dimSums(land_consv_lr, dim=3.2) wdpa_hr <- read.magpie(wdpa_hr_file) map <- readRDS(map_file) @@ -275,6 +276,8 @@ if (cfg$gms$urban == "exo_nov21") { # Prepare land conservation data # ---------------------------------------- +message("Disaggregating conservation land") + land_consv_hr <- NULL if (file.exists(wdpa_hr_file)) { land_consv_hr <- .dissagLandConsv(gdx, cfg, map_file, wdpa_hr_file, consv_prio_hr_file) @@ -300,6 +303,30 @@ avl_cropland_hr <- file.path(outputdir, "avl_cropland_0.5.mz") # available cropl marginal_land <- cfg$gms$c29_marginal_land # marginal land scenario snv_pol_fader <- readGDX(gdx, "i29_snv_scenario_fader") + +# -------------------------------- +# Disaggregate peatland +# -------------------------------- + +message("Disaggregating peatland") + +# check for peatland version +if (cfg$gms$peatland == "v2") { + peat_lr <- PeatlandArea(gdx, level = "cell", sum = FALSE) + peat_ini_hr <- read.magpie(peatland_v2_hr_file) + peat_ini_hr <- add_columns(peat_ini_hr, addnm = "rewetted", dim = "d3", fill = 0) + peat_ini_hr <- add_columns(peat_ini_hr, addnm = "unused", dim = "d3", fill = 0) + peat_hr <- suppressWarnings(luscale::interpolate2(peat_lr, peat_ini_hr, map_file)) + peat_hr <- peat_hr[, getYears(peat_hr, as.integer = T) >= cfg$gms$s58_fix_peatland, ] +} else if (cfg$gms$peatland == "on") { + peat_lr <- PeatlandArea(gdx, level = "cell", sum = TRUE) + peat_ini_hr <- mbind(setNames(read.magpie(peatland_on_intact_hr_file), "intact"), setNames(read.magpie(peatland_on_degrad_hr_file), "degrad")) + peat_ini_hr <- add_columns(peat_ini_hr, addnm = "rewet", dim = "d3", fill = 0) + peat_hr <- suppressWarnings(luscale::interpolate2(peat_lr, peat_ini_hr, map_file)) + peat_hr <- peat_hr[, getYears(peat_hr, as.integer = T) >= cfg$gms$s58_fix_peatland, ] +} +peat_hr <- .fixCoords(peat_hr) + # ============================================ # Start disaggregation # ============================================ @@ -319,6 +346,7 @@ land_hr <- interpolateAvlCroplandWeighted( marginal_land = marginal_land, urban_land_hr = urban_land_hr, land_consv_hr = land_consv_hr, + peat_hr = peat_hr, snv_pol_shr = snv_pol_shr, snv_pol_fader = snv_pol_fader ) @@ -335,6 +363,28 @@ land_hr <- .fixCoords(land_hr) ) gc() +# ----------------------------------- +# Write peatland outputs +# ----------------------------------- + +# Write output +.writeDisagg(peat_hr, peatland_hr_out_file, + comment = "unit: Mha per grid-cell", + message = "Write outputs peatland Mha" +) +gc() + +out <- peat_hr / dimSums(land_hr[, getYears(peat_hr), ], dim = 3) +out[is.nan(out)] <- 0 +out[is.infinite(out)] <- 0 + +.writeDisagg(out, peatland_hr_share_out_file, + comment = "unit: grid-cell land area fraction", + message = "Write outputs peatland share" +) +gc() + + # --------------------------------- # Split land pools # --------------------------------- @@ -450,7 +500,7 @@ message("Disaggregating BII values") # Load input data for BII disaggregation land_ini_hr <- read.magpie(land_hr_file)[, "y1995", ] side_layers_hr <- read.magpie(luh_side_layers) -landArea <- dimSums(land_ini_hr, dim = 3) +landArea <- dimSums(land_ini_hr, dim = 3) + 10^-10 side_layers_lr <- toolAggregate(x = side_layers_hr, rel = map_file, weight = landArea, from = "cell", to = "cluster") # Convert land types for BII disaggregation @@ -474,6 +524,10 @@ if (grepl("grass", cfg$gms$past)) { "past", "manpast", gsub("range", "rangeland", getNames(land_lr)) ) + getNames(land_consv_hr) <- gsub( + "past", "manpast", + gsub("range", "rangeland", getNames(land_consv_hr)) + ) } else { # Disaggregate pasture land_ini_lr <- mbind( @@ -485,6 +539,11 @@ if (grepl("grass", cfg$gms$past)) { land_lr[, , c("past"), invert = TRUE], collapseNames(land_lr[, , "past"]) * side_layers_lr[, , c("manpast", "rangeland")] ) + + land_consv_hr <- mbind( + land_consv_hr[, , c("past"), invert = TRUE], + collapseNames(land_consv_hr[, , "past"]) * side_layers_hr[, , c("manpast", "rangeland")] + ) } # Sort and rename @@ -504,6 +563,7 @@ land_bii_hr <- interpolateAvlCroplandWeighted( marginal_land = marginal_land, urban_land_hr = urban_land_hr, land_consv_hr = land_consv_hr, + peat_hr = peat_hr, snv_pol_shr = snv_pol_shr, snv_pol_fader = snv_pol_fader, unit = "share" @@ -532,46 +592,4 @@ rm(bii_hr) gc() -# -------------------------------- -# Disaggregate peatland -# -------------------------------- - -message("Disaggregating peatland") - -# check for peatland version -if (cfg$gms$peatland == "v2") { - peat_lr <- PeatlandArea(gdx, level = "cell", sum = FALSE) - peat_ini_hr <- read.magpie(peatland_v2_hr_file) - peat_ini_hr <- add_columns(peat_ini_hr, addnm = "rewetted", dim = "d3", fill = 0) - peat_ini_hr <- add_columns(peat_ini_hr, addnm = "unused", dim = "d3", fill = 0) - peat_hr <- suppressWarnings(luscale::interpolate2(peat_lr, peat_ini_hr, map_file)) - peat_hr <- peat_hr[, getYears(peat_hr, as.integer = T) >= cfg$gms$s58_fix_peatland, ] -} else if (cfg$gms$peatland == "on") { - peat_lr <- PeatlandArea(gdx, level = "cell", sum = TRUE) - peat_ini_hr <- mbind(setNames(read.magpie(peatland_on_intact_hr_file), "intact"), setNames(read.magpie(peatland_on_degrad_hr_file), "degrad")) - peat_ini_hr <- add_columns(peat_ini_hr, addnm = "rewet", dim = "d3", fill = 0) - peat_hr <- suppressWarnings(luscale::interpolate2(peat_lr, peat_ini_hr, map_file)) - peat_hr <- peat_hr[, getYears(peat_hr, as.integer = T) >= cfg$gms$s58_fix_peatland, ] -} -peat_hr <- .fixCoords(peat_hr) - -# Write output -.writeDisagg(peat_hr, peatland_hr_out_file, - comment = "unit: Mha per grid-cell", - message = "Write outputs peatland Mha" -) -gc() - -out <- peat_hr / dimSums(land_hr[, getYears(peat_hr), ], dim = 3) -out[is.nan(out)] <- 0 -out[is.infinite(out)] <- 0 - -rm(land_hr, peat_hr) - -.writeDisagg(out, peatland_hr_share_out_file, - comment = "unit: grid-cell land area fraction", - message = "Write outputs peatland share" -) -gc() - message("Finished disaggregation") diff --git a/scripts/output/extra/highres.R b/scripts/output/extra/highres.R index c1768e03d6..786e90bf4f 100644 --- a/scripts/output/extra/highres.R +++ b/scripts/output/extra/highres.R @@ -152,16 +152,20 @@ highres <- function(cfg = cfg, res = "c1000", tc = NULL) { cfg$gms$s15_elastic_demand <- 0 #get exogenous bioenergy demand and GHG prices from c200 run because these files may have been overwritten - write.magpie(readGDX(gdx,"f56_pollutant_prices_coupling"),"modules/56_ghg_policy/input/f56_pollutant_prices_coupling.cs3") - write.magpie(readGDX(gdx,"f56_pollutant_prices_emulator"),"modules/56_ghg_policy/input/f56_pollutant_prices_emulator.cs3") - write.magpie(readGDX(gdx,"f60_bioenergy_dem_coupling"),"modules/60_bioenergy/input/reg.2ndgen_bioenergy_demand.csv") - write.magpie(readGDX(gdx,"f60_bioenergy_dem_emulator"),"modules/60_bioenergy/input/glo.2ndgen_bioenergy_demand.csv") - - #get regional afforestation patterns from low resolution run with c200 + a <- readGDX(gdx,"f56_pollutant_prices_coupling", react = "silent") + if(!is.null(a)) write.magpie(a,"modules/56_ghg_policy/input/f56_pollutant_prices_coupling.cs3") + a <- readGDX(gdx,"f56_pollutant_prices_emulator", react = "silent") + if(!is.null(a)) write.magpie(a,"modules/56_ghg_policy/input/f56_pollutant_prices_emulator.cs3") + a <- readGDX(gdx,"f60_bioenergy_dem_coupling", react = "silent") + if(!is.null(a)) write.magpie(a,"modules/60_bioenergy/input/reg.2ndgen_bioenergy_demand.csv") + a <- readGDX(gdx,"f60_bioenergy_dem_emulator", react = "silent") + if(!is.null(a)) write.magpie(a,"modules/60_bioenergy/input/glo.2ndgen_bioenergy_demand.csv") + + #get regional afforestation/reforestation (AR) patterns from low resolution run with c200 aff <- dimSums(landForestry(gdx)[,,c("aff","ndc")],dim=3) - #Take away initial NDC area for consistency with global afforestation limit + #Take away initial NDC area for consistency with global AR limit aff <- aff-setYears(aff[,1,],NULL) - #calculate maximum regional afforestation over time + #calculate maximum regional AR over time aff_max <- setYears(aff[,1,],NULL) for (r in getRegions(aff)) { aff_max[r,,] <- max(aff[r,,]) @@ -169,10 +173,10 @@ highres <- function(cfg = cfg, res = "c1000", tc = NULL) { aff_max[aff_max < 0] <- 0 write.magpie(aff_max,"modules/32_forestry/input/f32_max_aff_area.cs4") cfg$gms$s32_max_aff_area_glo <- 0 - #check + #check if regional AR exceeds global AR limit if(cfg$gms$s32_max_aff_area < Inf) { - indicator <- abs(sum(aff_max)-cfg$gms$s32_max_aff_area) - if(indicator > 1e-06) warning(paste("Global and regional afforestation limit differ by",indicator,"Mha")) + indicator <- sum(aff_max)-cfg$gms$s32_max_aff_area + if(indicator > 1e-06) warning(paste("Regional AR exceeds global AR limit by",indicator,"Mha")) } Sys.sleep(2) diff --git a/scripts/output/extra/mrdownscale.R b/scripts/output/extra/mrdownscale.R new file mode 100644 index 0000000000..83b3295233 --- /dev/null +++ b/scripts/output/extra/mrdownscale.R @@ -0,0 +1,13 @@ +# | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) +# | authors, and contributors see CITATION.cff file. This file is part +# | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of +# | AGPL-3.0, you are granted additional permissions described in the +# | MAgPIE License Exception, version 1.0 (see LICENSE file). +# | Contact: magpie@pik-potsdam.de + +# ------------------------------------------------------------------------------------------------ +# description: Downscale MAgPIE results to 0.5 degree resolution using landuseinit as reference data +# comparison script: FALSE +# ------------------------------------------------------------------------------------------------ +library(mrdownscale) +downscaleRun(outputdir, "DOWNSCALEDMAGPIE") diff --git a/scripts/output/extra/disaggregation_mrdownscale.R b/scripts/output/extra/mrdownscale_LUH2.R similarity index 100% rename from scripts/output/extra/disaggregation_mrdownscale.R rename to scripts/output/extra/mrdownscale_LUH2.R diff --git a/scripts/output/extra/resubmit.R b/scripts/output/extra/resubmit.R index 2c597b72ef..9b86374df9 100644 --- a/scripts/output/extra/resubmit.R +++ b/scripts/output/extra/resubmit.R @@ -36,13 +36,16 @@ for (i in 1:length(outputdir)) { print(paste("Checking",outputdir[i])) #gdx file gdx<-file.path(outputdir[i],"fulldata.gdx") - if(file.exists(gdx)) tmp <- modelstat(gdx) else tmp <- 0 - if (any(tmp>2) | all(tmp==0)) { - file.copy(from = "scripts/run_submit/submit.sh",to = file.path(outputdir[i],"submit.sh"),overwrite = TRUE) + if(file.exists(gdx)) { + tmp <- try(modelstat(gdx),silent = TRUE) + if(!is.magpie(tmp)) tmp <- 0 + } else tmp <- 0 + if (any(tmp>2) | any(tmp==0)) { + file.copy(from = "scripts/run_submit/submit_standby.sh",to = file.path(outputdir[i],"submit_standby.sh"),overwrite = TRUE) current <- getwd() setwd(outputdir[i]) if (file.exists("magpie_y1995.gdx")) file.remove("magpie_y1995.gdx") - system("sbatch submit.sh") + system("sbatch submit_standby.sh") setwd(current) } } diff --git a/scripts/output/rds_report.R b/scripts/output/rds_report.R index 2b3dea3f0e..7e98f53b98 100644 --- a/scripts/output/rds_report.R +++ b/scripts/output/rds_report.R @@ -22,7 +22,7 @@ library(piamutils) options("magclass.verbosity" = 1) ############################# BASIC CONFIGURATION ############################# -if(!exists("source_include")) { +if (!exists("source_include")) { outputdir <- "/p/projects/landuse/users/miodrag/projects/tests/flexreg/output/H12_setup1_2016-11-23_12.38.56/" readArgs("outputdir") } @@ -37,32 +37,42 @@ resultsarchive <- "/p/projects/rd3mod/models/results/magpie" report <- getReport(gdx, scenario = cfg$title, dir = outputdir) +if (!all(grepl(" \\(([^\\()]*)\\)($|\\.)", getNames(report, fulldim = TRUE)$variable))) { + warning("Variables should be in the format 'name (unit)' (the space between name and unit is important), ", + "but the following are not:\n", + paste(grep(" \\(([^\\()]*)\\)($|\\.)", getNames(report, fulldim = TRUE)$variable, + invert = TRUE, value = TRUE), collapse = "\n")) +} for (mapping in c("AR6", "NAVIGATE", "SHAPE", "AR6_MAgPIE")) { - missingVariables <- sort(setdiff(unique(deletePlus(getMappingVariables(mapping,"M"))),unique(deletePlus(getNames(report,dim="variable"))))) + missingVariables <- sort(setdiff(unique(deletePlus(getMappingVariables(mapping, "M"))), + unique(deletePlus(getNames(report, dim = "variable"))))) if (length(missingVariables) > 0) { warning("# The following ", length(missingVariables), " variables are expected in the piamInterfaces package ", - "for mapping ", mapping, ", but cannot be found in the MAgPIE report.\nPlease either fix in magpie4 or adjust the mapping in piamInterfaces.\n- ", + "for mapping ", mapping, ", but cannot be found in the MAgPIE report.\n", + "Please either fix in magpie4 or adjust the mapping in piamInterfaces.\n- ", paste(missingVariables, collapse = ",\n- "), "\n") } } write.report(report, file = mif) -q <- as.quitte(report) +qu <- as.quitte(report) # as.quitte converts "World" into "GLO". But we want to keep "World" and therefore undo these changes -q <- droplevels(q) -levels(q$region)[levels(q$region) == "GLO"] <- "World" -q$region <- factor(q$region,levels = sort(levels(q$region))) +qu <- droplevels(qu) +levels(qu$region)[levels(qu$region) == "GLO"] <- "World" +qu$region <- factor(qu$region,levels = sort(levels(qu$region))) -if(all(is.na(q$value))) stop("No values in reporting!") +if (all(is.na(qu$value))) { + stop("No values in reporting!") +} -saveRDS(q, file = rds, version = 2) +saveRDS(qu, file = rds, version = 2) -if(file.exists(runstatistics) & dir.exists(resultsarchive)) { +if (file.exists(runstatistics) && dir.exists(resultsarchive)) { stats <- list() load(runstatistics) - if(is.null(stats$id)) { + if (is.null(stats$id)) { # create an id if it does not exist (which means that statistics have not # been saved to the archive before) and save statistics to the archive message("No id found in runstatistics.rda. Calling lucode2::runstatistics() to create one.") @@ -74,9 +84,8 @@ if(file.exists(runstatistics) & dir.exists(resultsarchive)) { } # Save report to results archive - saveRDS(q, file = paste0(resultsarchive, "/", stats$id, ".rds"), version = 2) - cwd <- getwd() - setwd(resultsarchive) - system("find -type f -name '1*.rds' -printf '%f\n' | sort > fileListForShinyresults") - setwd(cwd) + saveRDS(qu, file = paste0(resultsarchive, "/", stats$id, ".rds"), version = 2) + withr::with_dir(resultsarchive, { + system("find -type f -name '1*.rds' -printf '%f\n' | sort > fileListForShinyresults") + }) } diff --git a/scripts/output/rds_report_iso.R b/scripts/output/rds_report_iso.R index 52cf2aa574..7439b930f7 100644 --- a/scripts/output/rds_report_iso.R +++ b/scripts/output/rds_report_iso.R @@ -32,6 +32,10 @@ rds_iso <- paste0(outputdir, "/report_iso.rds") report <- getReportIso(gdx, scenario = cfg$title, dir = outputdir) +mif <- sub(".rds",".mif",rds_iso) +write.report(report, file = mif, scenario = cfg$title) +report <- read.report(file = mif, as.list = FALSE) + q <- as.quitte(report) # as.quitte converts "World" into "GLO". But we want to keep "World" and therefore undo these changes q <- droplevels(q) diff --git a/scripts/projects/fsec.R b/scripts/projects/fsec.R index f7f3302baa..78dd0490e5 100644 --- a/scripts/projects/fsec.R +++ b/scripts/projects/fsec.R @@ -226,7 +226,7 @@ fsecScenario <- function(scenario) { "rds_report") cfg$force_download <- TRUE cfg$gms$s80_optfile <- 0 - cfg$gms$s80_maxiter <- 100 + cfg$gms$s80_maxiter <- 30 return(cfg) } diff --git a/scripts/start/extra/emulator.R b/scripts/start/extra/emulator.R index 4645d5914a..f2d6850f38 100644 --- a/scripts/start/extra/emulator.R +++ b/scripts/start/extra/emulator.R @@ -59,9 +59,9 @@ write.ghgtax <- function(mifname, outfile) { tmp <- read.report(fname, as.list = FALSE) # Select variables from REMIND report - ghg_price_names <- c("Price|Carbon (US$2005/t CO2)", - "Price|N2O (US$2005/t N2O)", - "Price|CH4 (US$2005/t CH4)") + ghg_price_names <- c("Price|Carbon (US$2017/t CO2)", + "Price|N2O (US$2017/t N2O)", + "Price|CH4 (US$2017/t CH4)") tmp <- collapseNames(tmp[,,ghg_price_names]) # remove global dimension tmp <- tmp["GLO",,,invert=TRUE] @@ -72,11 +72,11 @@ write.ghgtax <- function(mifname, outfile) { ghgtax <- new.magpie(cells_and_regions = getRegions(tmp),years = time,fill = NA,sets = c("regions","years","gas"),names = c("n2o_n_direct","n2o_n_indirect","ch4","co2_c")) - # unit defined in modules/56_ghg_policy/input/f56_pollutant_prices.cs3: US$ 2005 per Mg N2O-N CH4 and CO2-C - ghgtax[,,"co2_c"] <- tmp[,,"Price|Carbon (US$2005/t CO2)"] * 44/12 # US$2005/tCO2 -> US$2005/tC - ghgtax[,,"ch4"] <- tmp[,,"Price|CH4 (US$2005/t CH4)"] - ghgtax[,,"n2o_n_direct"] <- tmp[,,"Price|N2O (US$2005/t N2O)"] * 44/28 # US$2005/tN2O -> US$2005/tN - ghgtax[,,"n2o_n_indirect"] <- tmp[,,"Price|N2O (US$2005/t N2O)"] * 44/28 # US$2005/tN2O -> US$2005/tN + # unit defined in modules/56_ghg_policy/input/f56_pollutant_prices.cs3: US$ 2017 per Mg N2O-N CH4 and CO2-C + ghgtax[,,"co2_c"] <- tmp[,,"Price|Carbon (US$2017/t CO2)"] * 44/12 # US$2017/tCO2 -> US$2017/tC + ghgtax[,,"ch4"] <- tmp[,,"Price|CH4 (US$2017/t CH4)"] + ghgtax[,,"n2o_n_direct"] <- tmp[,,"Price|N2O (US$2017/t N2O)"] * 44/28 # US$2017/tN2O -> US$2017/tN + ghgtax[,,"n2o_n_indirect"] <- tmp[,,"Price|N2O (US$2017/t N2O)"] * 44/28 # US$2017/tN2O -> US$2017/tN # set ghg prices before and in 2020 to zero ghgtax[,getYears(ghgtax)<="y2020",] <- 0 @@ -89,7 +89,7 @@ write.ghgtax <- function(mifname, outfile) { cat("CO2 price in 2025:",ghgtax[,2025,"co2_c"],"\n") for_plot <- ghgtax[1,,"co2_c"] * 12/44 # convert unit back just for plotting #for_plot <- for_plot[,c("y1995","y2110","y2130","y2150"),,invert=TRUE] - txtplot(as.numeric(gsub("y","",getYears(for_plot))),for_plot,ylab="US$2005/tCO2") + txtplot(as.numeric(gsub("y","",getYears(for_plot))),for_plot,ylab="US$2017/tCO2") cat("Writing GHG tax scenario",scenarios[scen,"ghgtax_name"],"\n\n") write.magpie(ghgtax, file_name = outfile) diff --git a/scripts/start/extra/recalibrateH16.R b/scripts/start/extra/recalibrateH16.R new file mode 100644 index 0000000000..79c532c9f2 --- /dev/null +++ b/scripts/start/extra/recalibrateH16.R @@ -0,0 +1,33 @@ +# | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) +# | authors, and contributors see CITATION.cff file. This file is part +# | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of +# | AGPL-3.0, you are granted additional permissions described in the +# | MAgPIE License Exception, version 1.0 (see LICENSE file). +# | Contact: magpie@pik-potsdam.de + +# -------------------------------------------------------- +# description: calculate and store new land conversion cost calibration factors for default setup (time consuming; up to 40 model runs with 5 time steps) +# -------------------------------------------------------- + +library(magpie4) +library(magclass) + +# Load start_run(cfg) function which is needed to start MAgPIE runs +source("scripts/start_functions.R") + +#start MAgPIE run +source("config/default.cfg") +cfg$input['regional'] <- "rev4.116_36f73207_magpie.tgz" +cfg$input['validation'] <- "rev4.116_36f73207_validation.tgz" +cfg$input['calibration'] <- "calibration_H16_27Sep24.tgz" +cfg$input['cellular'] <- "rev4.116_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + +cfg$results_folder <- "output/:title:" +cfg$recalibrate <- FALSE +cfg$recalibrate_landconversion_cost <- TRUE +cfg$title <- "calib_run_H16" +cfg$output <- c("rds_report") +cfg$force_replace <- TRUE +cfg$qos <- "priority" +start_run(cfg,codeCheck=FALSE) +magpie4::submitCalibration("H16") diff --git a/scripts/start/extra/recalibrate_FSEC.R b/scripts/start/extra/recalibrate_FSEC.R index 0611437f08..1b33e460b3 100644 --- a/scripts/start/extra/recalibrate_FSEC.R +++ b/scripts/start/extra/recalibrate_FSEC.R @@ -20,12 +20,12 @@ source("scripts/projects/fsec.R") # Calibration run cfg <- fsecScenario(scenario = "c_BAU") -cfg$title <- "FSEC23Mar2024" +cfg$title <- "calib_run_FSEC" cfg$results_folder <- "output/:title:" cfg$recalibrate <- TRUE # required when penality_apr22 activated cfg$best_calib <- TRUE cfg$recalibrate_landconversion_cost <- TRUE -cfg$best_calib_landconversion_cost <- FALSE +cfg$best_calib_landconversion_cost <- TRUE cfg$output <- c("rds_report") cfg$force_replace <- TRUE cfg$qos <- "priority" diff --git a/scripts/start/extra/recalibrate_default.R b/scripts/start/extra/recalibrate_default.R index 69f52a17f3..fdf41a97ae 100644 --- a/scripts/start/extra/recalibrate_default.R +++ b/scripts/start/extra/recalibrate_default.R @@ -20,7 +20,7 @@ source("config/default.cfg") cfg$results_folder <- "output/:title:" cfg$recalibrate <- FALSE cfg$recalibrate_landconversion_cost <- TRUE -cfg$title <- "calib_run" +cfg$title <- "calib_run_H12" cfg$output <- c("rds_report") cfg$force_replace <- TRUE cfg$qos <- "priority" diff --git a/scripts/start/projects/paper_grassland.R b/scripts/start/projects/paper_grassland.R deleted file mode 100644 index 7a405b0042..0000000000 --- a/scripts/start/projects/paper_grassland.R +++ /dev/null @@ -1,44 +0,0 @@ -# | (C) 2008-2024 Potsdam Institute for Climate Impact Research (PIK) -# | authors, and contributors see CITATION.cff file. This file is part -# | of MAgPIE and licensed under AGPL-3.0-or-later. Under Section 7 of -# | AGPL-3.0, you are granted additional permissions described in the -# | MAgPIE License Exception, version 1.0 (see LICENSE file). -# | Contact: magpie@pik-potsdam.de - -# ------------------------------------------------ -# description: Runs for Pasture mangagement paper -# ------------------------------------------------ -library(gms) -# Load start_run(cfg) function which is needed to start MAgPIE runs -source("scripts/start_functions.R") - -#start MAgPIE run - -scenarios <- list(c("SSP1","rcp2p6"), c("SSP2","rcp4p5"), c("SSP3","rcp7p0"), c("SSP4","rcp6p0"), c("SSP5", "rcp8p5")) - -for (ssp_setting in scenarios) { - name = "H12_G11" - cfg="default.cfg" - cfg <- setScenario(cfg,ssp_setting) - if(grepl("FSEC", name)) { - cfg$input["calibration"] <- "calibration_FSEC_G3_22Mar22.tgz" - if(SSP1 %in% ssp_setting){ - cfg$input["cellular"] <- "rev4.68_e2bdb6cd_6819938d_cellularmagpie_c200_MRI-ESM2-0-ssp126_lpjml-8e6c5eb1.tgz" - } else if (SSP2 %in% ssp_setting) { - cfg$input["cellular"] <- "rev4.68_e2bdb6cd_1b5c3817_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1.tgz" - } else if (SSP3 %in% ssp_setting) { - cfg$input["cellular"] <- "rev4.68_e2bdb6cd_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz" - } else if (SSP4 %in% ssp_setting) { - cfg$input["cellular"] <- "rev4.68_e2bdb6cd_3c888fa5_cellularmagpie_c200_MRI-ESM2-0-ssp460_lpjml-8e6c5eb1.tgz" - } else if (SSP5 %in% ssp_setting) { - cfg$input["cellular"] <- "rev4.68_e2bdb6cd_09a63995_cellularmagpie_c200_MRI-ESM2-0-ssp585_lpjml-8e6c5eb1.tgz" - } else { - stop("Select a correct SSP scenario!") - } - } else { - cfg$input["calibration"] <- "calibration_H12_grassland_mar22.tgz" - } - cfg$gms$past <- "grasslands_apr22" - cfg$title <- paste0(name,"_",ssp_setting[1],"_",ssp_setting[2],"_", substr(Sys.time(), 6,10),"-",gsub(":", "_I_", substr(Sys.time(), 12,16))) - start_run(cfg) -} diff --git a/scripts/start/projects/paper_peatlandTax.R b/scripts/start/projects/paper_peatlandTax.R index 91824915f5..c0ae8b6ad3 100644 --- a/scripts/start/projects/paper_peatlandTax.R +++ b/scripts/start/projects/paper_peatlandTax.R @@ -23,14 +23,13 @@ source("scripts/start_functions.R") source("config/default.cfg") # create additional information to describe the runs -cfg$info$flag <- "PTax24" +cfg$info$flag <- "PTax48" cfg$results_folder <- "output/:title:" cfg$results_folder_highres <- "output" -cfg$output <- c(cfg$output, "extra/highres") cfg$force_replace <- TRUE cfg$force_download <- FALSE -cfg$qos <- "standby_highMem_dayMax" +cfg$qos <- "standby_dayMax" # support function to create standardized title .title <- function(cfg, ...) @@ -44,10 +43,6 @@ cfg$repositories <- append( getOption("magpie_repos") ) -cfg$input['regional'] <- "rev4.111_36f73207_magpie.tgz" -cfg$input['validation'] <- "rev4.111_36f73207_validation.tgz" -cfg$input['calibration'] <- "calibration_H16_14Jun24.tgz" -cfg$input['cellular'] <- "rev4.111_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" download_and_update(cfg) ## Create patch file for GHG prices @@ -55,7 +50,7 @@ calc_ghgprice <- function() { T0 <- read.magpie("modules/56_ghg_policy/input/f56_pollutant_prices.cs3") T0 <- collapseNames(T0[, , getNames(T0, dim = 2)[1]]) T0[, , ] <- 0 - + #T200 200 USD/tCO2 in 2050 T200 <- new.magpie(getRegions(T0), c(seq(1995, 2025, by = 5), 2050, 2100, 2150), getNames(T0), fill = 0) T200[, "y2025", "co2_c"] <- 0 @@ -68,14 +63,21 @@ calc_ghgprice <- function() { T200[, , "n2o_n_direct"] <- T200[, , "co2_c"] * 265 * 44 / 28 T200[, , "n2o_n_indirect"] <- T200[, , "co2_c"] * 265 * 44 / 28 T200[, , "co2_c"] <- T200[, , "co2_c"] * 44 / 12 - + + T25 <- T200 * 0.125 T50 <- T200 * 0.25 T100 <- T200 * 0.5 T400 <- T200 * 2 T800 <- T200 * 4 - + GHG <- mbind( add_dimension(T0, dim = 3.2, add = "scen", nm = "T0-GHG"), + add_dimension( + T25, + dim = 3.2, + add = "scen", + nm = "T25-GHG" + ), add_dimension( T50, dim = 3.2, @@ -107,16 +109,16 @@ calc_ghgprice <- function() { nm = "T800-GHG" ) ) - + CO2 <- GHG CO2[, , c("ch4", "n2o_n_direct", "n2o_n_indirect")] <- 0 getNames(CO2, dim = 2) <- gsub("GHG", "CO2", getNames(CO2, dim = 2)) - + GHGCH4GWP20 <- GHG GHGCH4GWP20[, , "ch4"] <- GHGCH4GWP20[, , "ch4"] / 28 * 84 getNames(GHGCH4GWP20, dim = 2) <- gsub("GHG", "GHG-GWP20", getNames(GHGCH4GWP20, dim = 2)) - + GHG <- mbind(CO2, GHG, GHGCH4GWP20) if (!dir.exists("./patch_inputdata")) dir.create("./patch_inputdata") @@ -126,7 +128,7 @@ calc_ghgprice <- function() { write.magpie(GHG, file_name = "patch_inputdata/patchGHGprices/f56_pollutant_prices.cs3") tardir("patch_inputdata/patchGHGprices", "patch_inputdata/patchGHGprices.tgz") - + unlink("patch_inputdata/patchGHGprices", recursive = TRUE) return(getNames(GHG, dim = 2)) } @@ -139,34 +141,96 @@ ssp <- "SSP2" cfg <- setScenario(cfg, c(ssp, "NPI", "rcp7p0")) cfg$gms$c56_pollutant_prices_noselect <- "T0-CO2" cfg$gms$policy_countries56 <- isoCountriesEUR +cfg$gms$policy_countries58 <- isoCountriesEUR cfg$gms$c56_emis_policy <- "sdp_peatland" -cfg$gms$factor_costs <- "sticky_feb18" -cfg$gms$livestock <- "fbask_jan16_sticky" cfg$gms$s56_c_price_induced_aff <- 0 ## Start scenarios -for (res in c("c400")) { - if (res == "c400") - cfg$input['cellular'] <- "rev4.111_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" - else if (res == "c1000") { - cfg$input['cellular'] <- "rev4.111_36f73207_10f98ac1_cellularmagpie_c1000_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" - } - ## Ref scenario - cfg$title <- .title(cfg, paste(res, ssp, "Ref", sep = "-")) - cfg$gms$c56_mute_ghgprices_until <- "y2150" - cfg$gms$c56_pollutant_prices <- "T0-CO2" +## Ref scenario +cfg$title <- .title(cfg, paste("TAU",ssp, "Ref", sep = "-")) +cfg$gms$c56_mute_ghgprices_until <- "y2150" +cfg$gms$c56_pollutant_prices <- "T0-CO2" +cfg$gms$s58_rewetting_exo <- 0 +cfg$gms$s58_intact_prot_exo <- 0 +x <- try(modelstat(file.path("output",cfg$title,"fulldata.gdx")),silent = TRUE) +if(is.null(x) | (is.magpie(x) & any(!x %in% c(2,7)))) { + download_and_update(cfg) start_run(cfg, codeCheck = FALSE) - - ## Policy scenarios - for (tax in c("T50-CO2", - "T100-CO2", - "T200-CO2", - "T400-CO2", - "T400-GHG", - "T400-GHG-GWP20")) { - cfg$title <- .title(cfg, paste(res, ssp, tax, sep = "-")) - cfg$gms$c56_mute_ghgprices_until <- "y2025" - cfg$gms$c56_pollutant_prices <- tax - start_run(cfg, codeCheck = FALSE) + message(paste0("TAU run started: ",cfg$title)) + Sys.sleep(10) +} + + +### wait until model runs with endogenous TAU are finished, check is performed every 10 minutes +success <- FALSE +while (!success) { + z <- NULL + x <- try(modelstat(file.path("output",cfg$title,"fulldata.gdx")),silent = TRUE) + if (is.magpie(x) & all(x %in% c(2,7))) { + x <- x + } else x <- NULL + z <- mbind(z,x) + if (is.null(z)) { + message("Not any model run with endogenous TAU finished. Sleeping for 10 minutes.") + Sys.sleep(60*10) + } else { + if (all(z %in% c(2,7))) success <- TRUE else stop("Modelstat different from 2 or 7 detected") } } + +# use exo TC in all following runs +download_and_update(cfg) +write.magpie(readGDX(file.path("output",cfg$title,"fulldata.gdx"), "ov_tau", select=list(type="level")),"modules/13_tc/input/f13_tau_scenario.csv") +cfg$gms$tc <- "exo" + +## GHG policy scenarios +for (tax in c("T0-CO2", + "T25-CO2", + "T50-CO2", + "T100-CO2", + "T200-CO2", + "T400-CO2", + "T400-GHG", + "T400-GHG-GWP20")) { + cfg$title <- .title(cfg, paste(ssp, tax, sep = "-")) + cfg$gms$c56_mute_ghgprices_until <- "y2025" + cfg$gms$c56_pollutant_prices <- tax + start_run(cfg, codeCheck = FALSE) +} + +## Exo rewet scenarios +# 15% of currently drained peatland rewetted by 2050 (0.3 * 0.5) +cfg$title <- .title(cfg, paste(ssp, "NRL15", sep = "-")) +cfg$gms$c56_mute_ghgprices_until <- "y2150" +cfg$gms$c56_pollutant_prices <- "T0-CO2" +cfg$gms$s58_rewetting_exo <- 0.3 +cfg$gms$s58_rewet_exo_target_value <- 0.5 +cfg$gms$s58_intact_prot_exo <- 1 +start_run(cfg, codeCheck = FALSE) + +# 25% of currently drained peatland rewetted by 2050 (0.5 * 0.5) +cfg$title <- .title(cfg, paste(ssp, "NRL25", sep = "-")) +cfg$gms$c56_mute_ghgprices_until <- "y2150" +cfg$gms$c56_pollutant_prices <- "T0-CO2" +cfg$gms$s58_rewetting_exo <- 0.5 +cfg$gms$s58_rewet_exo_target_value <- 0.5 +cfg$gms$s58_intact_prot_exo <- 1 +start_run(cfg, codeCheck = FALSE) + +# 50% of currently drained peatland rewetted by 2050 (1 * 0.5) +cfg$title <- .title(cfg, paste(ssp, "NRL50", sep = "-")) +cfg$gms$c56_mute_ghgprices_until <- "y2150" +cfg$gms$c56_pollutant_prices <- "T0-CO2" +cfg$gms$s58_rewetting_exo <- 1 +cfg$gms$s58_rewet_exo_target_value <- 0.5 +cfg$gms$s58_intact_prot_exo <- 1 +start_run(cfg, codeCheck = FALSE) + +# 100% of currently drained peatland rewetted by 2050 (2 * 0.5) +cfg$title <- .title(cfg, paste(ssp, "NRL100", sep = "-")) +cfg$gms$c56_mute_ghgprices_until <- "y2150" +cfg$gms$c56_pollutant_prices <- "T0-CO2" +cfg$gms$s58_rewetting_exo <- 2 +cfg$gms$s58_rewet_exo_target_value <- 0.5 +cfg$gms$s58_intact_prot_exo <- 1 +start_run(cfg, codeCheck = FALSE) diff --git a/scripts/start/projects/project_ABCDR.R b/scripts/start/projects/project_ABCDR.R index 8b1480c537..c37eb41942 100644 --- a/scripts/start/projects/project_ABCDR.R +++ b/scripts/start/projects/project_ABCDR.R @@ -19,66 +19,64 @@ source("config/default.cfg") #download_and_update(cfg) # create additional information to describe the runs -cfg$info$flag <- "ABCDR08" +cfg$info$flag <- "ABCDR20" cfg$results_folder <- "output/:title:" cfg$force_replace <- TRUE cfg$force_download <- FALSE -cfg$qos <- "standby_highMem_dayMax" +cfg$qos <- "standby_dayMax" # support function to create standardized title .title <- function(cfg, ...) return(paste(cfg$info$flag, sep="_",...)) -cfg$input['regional'] <- "rev4.111_36f73207_magpie.tgz" -cfg$input['validation'] <- "rev4.111_36f73207_validation.tgz" -cfg$input['calibration'] <- "calibration_H16_14Jun24.tgz" -cfg$input['cellular'] <- "rev4.111_36f73207_44a213b6_cellularmagpie_c400_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" +cfg$input['regional'] <- "rev4.116_36f73207_magpie.tgz" +cfg$input['validation'] <- "rev4.116_36f73207_validation.tgz" +cfg$input['calibration'] <- "calibration_H16_27Sep24.tgz" +cfg$input['cellular'] <- "rev4.116_36f73207_bd86374e_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" ssp <- "SSP2" cfg$gms$cropland <- "detail_apr24" - cfg$gms$scen_countries15 <- isoCountriesEUR cfg$gms$policy_countries29 <- isoCountriesEUR cfg$gms$policy_countries30 <- isoCountriesEUR - -cfg$gms$s29_treecover_keep <- 0 -cfg$gms$s29_treecover_penalty_before <- 0 -cfg$gms$s29_treecover_penalty <- 5000 -cfg$gms$s30_betr_penalty <- 0 - cfg$gms$s29_fader_functional_form <- 1 # linear fader cfg$gms$s29_treecover_scenario_start <- 2025 cfg$gms$s29_treecover_scenario_target <- 2060 for (pol in c("NDC","1p5deg","1p5deg-Diet")) { for (shr in c(0, 0.005, 0.01, 0.02)) { # share in 2045 - cfg$title <- .title(cfg, paste(ssp,pol,paste0("AFS_tree_",sub("\\.","p",as.character(shr*100))),sep="-")) - if (pol == "NDC") { - cfg <- setScenario(cfg,c(ssp,"NDC","rcp4p5")) - cfg$input['cellular'] <- "rev4.111_36f73207_30c9dc61_cellularmagpie_c400_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" - cfg$gms$c56_mute_ghgprices_until <- "y2150" - cfg$gms$c56_pollutant_prices <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-NDC") - cfg$gms$c60_2ndgen_biodem <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-NDC") - } else if (pol == "1p5deg") { - cfg <- setScenario(cfg,c(ssp,"NDC","rcp1p9")) - cfg$input['cellular'] <- "rev4.111_36f73207_bc624950_cellularmagpie_c400_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" - cfg$gms$c56_mute_ghgprices_until <- "y2030" - cfg$gms$c56_pollutant_prices <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-PkBudg650") - cfg$gms$c60_2ndgen_biodem <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-PkBudg650") - } else if (pol == "1p5deg-Diet") { - cfg <- setScenario(cfg,c(ssp,"NDC","rcp1p9","eat_lancet_diet_v1")) - cfg$input['cellular'] <- "rev4.111_36f73207_bc624950_cellularmagpie_c400_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" - cfg$gms$c56_mute_ghgprices_until <- "y2030" - cfg$gms$c56_pollutant_prices <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-PkBudg650") - cfg$gms$c60_2ndgen_biodem <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-PkBudg650") + for (growth in c(0,1)) { + cfg$title <- .title(cfg, paste(ssp,pol,ifelse(growth==0,"natveg","plant"),paste0("AFS_tree_",sub("\\.","p",as.character(shr*100))),sep="-")) + if (pol == "NDC") { + cfg <- setScenario(cfg,c(ssp,"NDC","rcp4p5")) + cfg$input['cellular'] <- "rev4.116_36f73207_582d657c_cellularmagpie_c200_MRI-ESM2-0-ssp245_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$gms$c56_mute_ghgprices_until <- "y2150" + cfg$gms$c56_pollutant_prices <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-NDC") + cfg$gms$c60_2ndgen_biodem <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-NDC") + } else if (pol == "1p5deg") { + cfg <- setScenario(cfg,c(ssp,"NDC","rcp1p9")) + cfg$input['cellular'] <- "rev4.116_36f73207_ab632bd4_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$gms$c56_mute_ghgprices_until <- "y2030" + cfg$gms$c56_pollutant_prices <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-PkBudg650") + cfg$gms$c60_2ndgen_biodem <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-PkBudg650") + } else if (pol == "1p5deg-Diet") { + cfg <- setScenario(cfg,c(ssp,"NDC","rcp1p9","eat_lancet_diet_v1")) + cfg$input['cellular'] <- "rev4.116_36f73207_ab632bd4_cellularmagpie_c200_MRI-ESM2-0-ssp119_lpjml-8e6c5eb1_clusterweight-ba4466a8.tgz" + cfg$gms$c56_mute_ghgprices_until <- "y2030" + cfg$gms$c56_pollutant_prices <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-PkBudg650") + cfg$gms$c60_2ndgen_biodem <- paste0("R32M46-", if (ssp=="SSP2") "SSP2EU" else ssp,"-PkBudg650") + } + cfg$gms$s29_treecover_target <- shr / (2045 - 2025) * (2060 - 2025) # Continue linear increase after 2045 until 2060 + cfg$gms$s30_betr_target <- 0 + cfg$gms$s30_betr_penalty <- 0 + cfg$gms$s29_treecover_plantation <- growth + cfg$gms$s29_treecover_bii_coeff <- growth + start_run(cfg, codeCheck = FALSE) } - cfg$gms$s29_treecover_target <- shr / (2045 - 2025) * (2060 - 2025) # Continue linear increase after 2045 until 2060 - cfg$gms$s30_betr_target <- 0 - start_run(cfg, codeCheck = FALSE) } } diff --git a/scripts/start/projects/project_BEST.R b/scripts/start/projects/project_BEST.R index c525421d52..94122196c7 100644 --- a/scripts/start/projects/project_BEST.R +++ b/scripts/start/projects/project_BEST.R @@ -13,7 +13,7 @@ #### Script to start a MAgPIE run #### ###################################### -version <- "V13" +version <- "V14" library(lucode2) library(magclass) @@ -29,7 +29,7 @@ source("scripts/start_functions.R") calc_bioen <- function(x) { #B0 B0 <- new.magpie("GLO",seq(1995,2150,by=5),NULL,fill = 0) - + #B50 #50 EJ in 2050 globally, linear interpolation B50 <- new.magpie("GLO",c(seq(1995,2020,by=5),2050,2100,2150),NULL,fill = 0) @@ -43,7 +43,7 @@ calc_bioen <- function(x) { #B100 #100 EJ in 2050 globally, linear interpolation B100 <- B50*2 - + if (x == "B0") { return(B0) } else if (x == "B50") { @@ -108,18 +108,20 @@ for (rcp in rcps) { for (ssp in ssps) { cfg$title <- paste("TAU",ssp,rcp,tau_scen,sep="-") cfg <- setScenario(cfg,c(ssp,"NPI",rcp)) + cfg <- setScenario(cfg, "fix_2020", scenario_config = "config/projects/scenario_config_year_fix.csv") cfg$gms$s32_max_aff_area <- 0 cfg$gms$s56_c_price_induced_aff <- 0 cfg$gms$c30_bioen_type <- bioen_type cfg$gms$c30_bioen_water <- bioen_water cfg$gms$tc <- "endo_jan22" x <- try(modelstat(file.path("output",cfg$title,"fulldata.gdx")),silent = TRUE) - if(any(!x %in% c(2,7))) { + if(is.null(x) | (is.magpie(x) & any(!x %in% c(2,7)))) { download_and_update(cfg) write.magpie(calc_bioen(biodem),"modules/60_bioenergy/input/glo.2ndgen_bioenergy_demand.csv") write.magpie(calc_ghgprice(ghgprice),"modules/56_ghg_policy/input/f56_pollutant_prices_emulator.cs3") start_run(cfg,codeCheck=FALSE) message(paste0("TAU run started: ",cfg$title)) + Sys.sleep(10) } } } @@ -132,12 +134,12 @@ while (!success) { for (rcp in rcps) { for (ssp in ssps) { x <- try(modelstat(file.path("output",paste("TAU",ssp,rcp,tau_scen,sep="-"),"fulldata.gdx")),silent = TRUE) - if (is(x, "try-error")) x <- NULL else if (is.magpie(x) & all(x %in% c(2,7))) x <- add_dimension(collapseNames(x),dim = 3.1,add = "scen",nm = paste0(ssp,rcp)) + if (is.magpie(x) & all(x %in% c(2,7))) { + x <- add_dimension(collapseNames(x),dim = 3.1,add = "scen",nm = paste0(ssp,rcp)) + } else x <- NULL z <- mbind(z,x) } } - print(str(z)) - print(dim(z)) if (is.null(z)) { message("Not any model run with endogenous TAU finished. Sleeping for 10 minutes.") Sys.sleep(60*10) @@ -158,6 +160,7 @@ for (rcp in rcps) { for (bioen_type in c("all","begr","betr")) { for (bioen_water in c("all","rainfed")) { cfg <- setScenario(cfg,c(ssp,"NPI",rcp)) + cfg <- setScenario(cfg, "fix_2020", scenario_config = "config/projects/scenario_config_year_fix.csv") cfg$title <- paste(version,ssp,rcp,biodem,ghgprice,paste0("Type",toupper(bioen_type)),paste0("Water",toupper(bioen_water)),sep="-") cfg$gms$s32_max_aff_area <- 0 cfg$gms$s56_c_price_induced_aff <- 0 diff --git a/scripts/start/projects/project_EAT2p0.R b/scripts/start/projects/project_EAT2p0.R index 83c759c07b..40763095df 100644 --- a/scripts/start/projects/project_EAT2p0.R +++ b/scripts/start/projects/project_EAT2p0.R @@ -90,7 +90,7 @@ bau <- function(cfg) { cfg$gms$c60_2ndgen_biodem <- "R21M42-SSP2-NPi" # default # Climate Change - cfg$input["cellular"] <- "rev4.111EL2_h12_c6a7458f_cellularmagpie_c200_IPSL-CM6A-LR-ssp370_lpjml-8e6c5eb1.tgz" + cfg$input["cellular"] <- "rev4.116EL2_h12_c6a7458f_cellularmagpie_c200_IPSL-CM6A-LR-ssp370_lpjml-8e6c5eb1.tgz" return(cfg) } diff --git a/scripts/start_functions.R b/scripts/start_functions.R index cd6f48738f..af8da9ddb1 100644 --- a/scripts/start_functions.R +++ b/scripts/start_functions.R @@ -555,16 +555,16 @@ getReportData <- function(path_to_report_bioenergy, path_to_report_ghgprices = N } .emissionPrices <- function(mag){ - out_c <- mag[,,"Price|Carbon (US$2005/t CO2)"]*44/12 # US$2005/tCO2 -> US$2005/tC + out_c <- mag[,,"Price|Carbon (US$2017/t CO2)"]*44/12 # US$2017/tCO2 -> US$2017/tC dimnames(out_c)[[3]] <- "co2_c" - out_n2o_direct <- mag[,,"Price|N2O (US$2005/t N2O)"]*44/28 # US$2005/tN2O -> US$2005/tN + out_n2o_direct <- mag[,,"Price|N2O (US$2017/t N2O)"]*44/28 # US$2017/tN2O -> US$2017/tN dimnames(out_n2o_direct)[[3]] <- "n2o_n_direct" - out_n2o_indirect <- mag[,,"Price|N2O (US$2005/t N2O)"]*44/28 # US$2005/tN2O -> US$2005/tN + out_n2o_indirect <- mag[,,"Price|N2O (US$2017/t N2O)"]*44/28 # US$2017/tN2O -> US$2017/tN dimnames(out_n2o_indirect)[[3]] <- "n2o_n_indirect" - out_ch4 <- mag[,,"Price|CH4 (US$2005/t CH4)"] + out_ch4 <- mag[,,"Price|CH4 (US$2017/t CH4)"] dimnames(out_ch4)[[3]] <- "ch4" out <- mbind(out_n2o_direct,out_n2o_indirect,out_ch4,out_c)