diff --git a/.github/workflows/test-code.yaml b/.github/workflows/test-code.yaml index cad05908ee..2a3831d0ab 100644 --- a/.github/workflows/test-code.yaml +++ b/.github/workflows/test-code.yaml @@ -27,12 +27,6 @@ jobs: with: extra-repositories: https://cloud.r-project.org https://rse.pik-potsdam.de/r/packages/ - - name: Install R dependencies - uses: r-lib/actions/setup-r-dependencies@v2 - with: - packages: gms - extra-packages: gms - - name: pre-commit Hook run: source(".githooks/pre-commit") shell: Rscript {0} diff --git a/.zenodo.json b/.zenodo.json index 5e69eaa32a..254e507cce 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "MAgPIE - An Open Source land-use modeling framework", - "version": "4.6.8", + "version": "4.6.9", "creators": [ { "name": "Dietrich, Jan Philipp", @@ -109,5 +109,5 @@ "license": { "id": "AGPL-3.0-or-later" }, - "publication_date": "2023-07-17" + "publication_date": "2023-07-27" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 6840e5850a..1550497d58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,11 +5,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [4.6.9] - 2023-07-27 + +### fixed +- **70_livestock** consideration of milk demand in the calculation of the pasture management factor +- **scripts** Fixed inaccuracies and inconsistent application of SNV policies during disaggregation in luscale::interpolateAvlCroplandWeighted(), which is called in extra/disaggregation.R + + ## [4.6.8] - 2023-07-17 ### changed - **41_area_equipped_for_irrigation** new AEI data (Mehta2022) replacing old Siebert data -- **80_optimization** printing of solprint when solver status is 7 re-activated +- **80_optimization** printing of solprint when solver status is 7 re-activated - **scripts** start_functions.R can now handle clusters per region flexibly - **scripts** the REMIND-MAgPIE coupling now uses renv @@ -33,6 +40,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - **config** corrected wrong names of parameters for peatland costs - **config** updated scenario configs to newest preprocessing (4.87) + ## [4.6.7] - 2023-05-10 ### changed @@ -729,7 +737,8 @@ This release version is focussed on consistency between the MAgPIE setup and the First open source release of the framework. See [MAgPIE 4.0 paper](https://doi.org/10.5194/gmd-12-1299-2019) for more information. -[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.6.8...develop +[Unreleased]: https://github.com/magpiemodel/magpie/compare/v4.6.9...develop +[4.6.9]: https://github.com/magpiemodel/magpie/compare/v4.6.8...v4.6.9 [4.6.8]: https://github.com/magpiemodel/magpie/compare/v4.6.7...v4.6.8 [4.6.7]: https://github.com/magpiemodel/magpie/compare/v4.6.6...v4.6.7 [4.6.6]: https://github.com/magpiemodel/magpie/compare/v4.6.5...v4.6.6 diff --git a/CITATION.cff b/CITATION.cff index 6ebb15977b..843aea845c 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -125,8 +125,8 @@ authors: email: popp@pik-potsdam.de title: MAgPIE - An Open Source land-use modeling framework -version: 4.6.8 -date-released: 2023-07-17 +version: 4.6.9 +date-released: 2023-07-27 repository-code: https://github.com/magpiemodel/magpie keywords: - landuse diff --git a/DESCRIPTION b/DESCRIPTION index ffe0b1d813..e23f4d8f05 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -17,7 +17,7 @@ Imports: iamc, lucode2 (>= 0.36.0), luplot, - luscale, + luscale (>= 2.27.4), lusweave, m4fsdp, madrat, diff --git a/README.md b/README.md index 5f15852147..9a13bf8260 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.6.8 can be found at -https://rse.pik-potsdam.de/doc/magpie/4.6.8/ +The model documentation for version 4.6.9 can be found at +https://rse.pik-potsdam.de/doc/magpie/4.6.9/ A most recent version of the documentation can also be extracted from the model source code via the R package goxygen @@ -188,7 +188,7 @@ magpie@pik-potsdam.de Please contact magpie@pik-potsdam.de ## CITATION -See file CITATION.cff or the [How-to-Cite section](https://rse.pik-potsdam.de/doc/magpie/4.6.8/#how-to-cite) in the model documentation for information how to cite the model. +See file CITATION.cff or the [How-to-Cite section](https://rse.pik-potsdam.de/doc/magpie/4.6.9/#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 821203f355..f796720c61 100644 --- a/config/default.cfg +++ b/config/default.cfg @@ -26,7 +26,7 @@ cfg$input <- c(regional = "rev4.87_h12_magpie.tgz", cellular = "rev4.87_h12_fd712c0b_cellularmagpie_c200_MRI-ESM2-0-ssp370_lpjml-8e6c5eb1.tgz", validation = "rev4.87_h12_validation.tgz", additional = "additional_data_rev4.43.tgz", - calibration = "calibration_H12_per_ton_fao_may22_glo_08Jul23.tgz") + calibration = "calibration_H12_per_ton_fao_may22_glo_14Jul23.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, diff --git a/modules/15_food/anthro_iso_jun22/declarations.gms b/modules/15_food/anthro_iso_jun22/declarations.gms index 89a8964cf8..b5f7cd8ef2 100644 --- a/modules/15_food/anthro_iso_jun22/declarations.gms +++ b/modules/15_food/anthro_iso_jun22/declarations.gms @@ -125,8 +125,7 @@ parameters * before shock o15_kcal_regr_initial(t,iso,kfo) Uncalibrated per capita demand before price shock (kcal per capita per day) - p15_kcal_pc_initial(t,i,kfo) Per capita consumption in food demand model before price shock on regional level (kcal per capita per day) - pm_kcal_pc_initial(t,i,kfo) Per capita consumption in food demand model before price shock (kcal per capita per day) + pm_kcal_pc_initial(t,i,kall) Per capita consumption in food demand model before price shock (kcal per capita per day) p15_kcal_pc_initial_iso(t,iso,kfo) Per capita consumption in food demand model before price shock on country level (kcal per capita per day) * after price shock diff --git a/modules/15_food/anthro_iso_jun22/equations.gms b/modules/15_food/anthro_iso_jun22/equations.gms index 6cb9c227b4..421dd270e5 100644 --- a/modules/15_food/anthro_iso_jun22/equations.gms +++ b/modules/15_food/anthro_iso_jun22/equations.gms @@ -9,7 +9,7 @@ q15_food_demand(i2,kfo) .. (vm_dem_food(i2,kfo) + sum(ct, f15_household_balanceflow(ct,i2,kfo,"dm"))) - * sum(ct,(f15_nutrition_attributes(ct,kfo,"kcal") * 10**6)) =g= + * sum(ct,(fm_nutrition_attributes(ct,kfo,"kcal") * 10**6)) =g= sum(ct,im_pop(ct,i2) * p15_kcal_pc_calibrated(ct,i2,kfo)) * 365 ; diff --git a/modules/15_food/anthro_iso_jun22/exodietmacro.gms b/modules/15_food/anthro_iso_jun22/exodietmacro.gms index ca0b6813d4..a8a5b23e44 100644 --- a/modules/15_food/anthro_iso_jun22/exodietmacro.gms +++ b/modules/15_food/anthro_iso_jun22/exodietmacro.gms @@ -28,8 +28,7 @@ if (s15_run_diet_postprocessing = 1, p15_bmi_shr_regr(t,iso,sex,age,bmi_group15) = v15_bmi_shr_regr.l(iso,sex,age,bmi_group15); p15_bmi_shr_calibrated(t,iso,sex,age,bmi_group15) = - p15_bmi_shr_regr(t,iso,sex,age,bmi_group15)+ - i15_bmi_shr_calib(t,iso,sex,age,bmi_group15); + p15_bmi_shr_regr(t,iso,sex,age,bmi_group15) + i15_bmi_shr_calib(t,iso,sex,age,bmi_group15) * s15_calibrate; * The BMI shares are not allowed to exceed the bounds 0 and 1. Values are corrected to the bounds. p15_bmi_shr_calibrated(t,iso,sex,age,bmi_group15)$(p15_bmi_shr_calibrated(t,iso,sex,age,bmi_group15)<0) = 0; @@ -108,7 +107,7 @@ if (s15_run_diet_postprocessing = 1, + p15_kcal_pc_iso_rumdairy_orig(t,iso) * (1- i15_rumdairy_fadeout(t,iso))); *** Substitution of ruminant meat and dairy products (kfo_rd) with single-cell protein (SCP) based on protein/cap/day - i15_protein_to_kcal_ratio(t,kfo) = f15_nutrition_attributes(t,kfo,"protein")/f15_nutrition_attributes(t,kfo,"kcal"); + i15_protein_to_kcal_ratio(t,kfo) = fm_nutrition_attributes(t,kfo,"protein")/fm_nutrition_attributes(t,kfo,"kcal"); * Before the substitution, kfo_rd is converted from kcal/cap/day to g protein/cap/day * using i15_protein_to_kcal_ratio(t,kfo_rd). * After the substitution of kfo_rd with SCP (1-i15_rumdairy_scp_fadeout), SCP is converted diff --git a/modules/15_food/anthro_iso_jun22/input.gms b/modules/15_food/anthro_iso_jun22/input.gms index 45e9a4493e..099e6acbfc 100644 --- a/modules/15_food/anthro_iso_jun22/input.gms +++ b/modules/15_food/anthro_iso_jun22/input.gms @@ -124,7 +124,7 @@ $ondelim $include "./modules/15_food/input/f15_household_balanceflow.cs3" $offdelim; -table f15_nutrition_attributes(t_all,kall,nutrition) Nutrition attributes of food items dedicated for fooduse (mio. kcal per tDM | t Protein per tDM) +table fm_nutrition_attributes(t_all,kall,nutrition) Nutrition attributes of food items dedicated for fooduse (mio. kcal per tDM | t Protein per tDM) $ondelim $include "./modules/15_food/input/f15_nutrition_attributes.cs3" $offdelim; diff --git a/modules/15_food/anthro_iso_jun22/preloop.gms b/modules/15_food/anthro_iso_jun22/preloop.gms index 80684940c3..0397c55f4b 100644 --- a/modules/15_food/anthro_iso_jun22/preloop.gms +++ b/modules/15_food/anthro_iso_jun22/preloop.gms @@ -92,7 +92,7 @@ $else $endif * initial prices in $US per Kcal -i15_prices_initial_kcal(iso,kfo)$(f15_nutrition_attributes("y1995",kfo,"kcal")>0) = f15_prices_initial(kfo) - / (f15_nutrition_attributes("y1995",kfo,"kcal")*10**6); +i15_prices_initial_kcal(iso,kfo)$(fm_nutrition_attributes("y1995",kfo,"kcal")>0) = f15_prices_initial(kfo) + / (fm_nutrition_attributes("y1995",kfo,"kcal")*10**6); p15_prices_kcal(t,iso,kfo,"iter1")=i15_prices_initial_kcal(iso,kfo); p15_convergence_measure(t,iter15)=NA; diff --git a/modules/15_food/anthro_iso_jun22/sets.gms b/modules/15_food/anthro_iso_jun22/sets.gms index 942de46d9e..18f196764f 100644 --- a/modules/15_food/anthro_iso_jun22/sets.gms +++ b/modules/15_food/anthro_iso_jun22/sets.gms @@ -102,9 +102,6 @@ sets kfo_lp(kfo) Livestock food products / livst_rum,livst_pig,livst_chick, livst_egg, livst_milk / - kfo_rd(kfo) Ruminant meat and dairy food products - / livst_rum,livst_milk / - kfo_st(kfo) Staple products / tece,maiz,trce,rice_pro,soybean,rapeseed,groundnut,sunflower,puls_pro, potato,cassav_sp,sugr_cane,sugr_beet,molasses,brans,scp / @@ -148,6 +145,10 @@ sets livst_fadeoutscen15 Scenarios for changed composition of livestock products / halving2050, constant / +* The set kfo_rd can be defined in default.cfg and is used in the food substitution scenarios c15_rumdairy_scp_scen and c15_rumdairyscen + kfo_rd(kfo) Ruminant meat and dairy food products + / livst_rum,livst_milk / + fadeoutscen15 Food substitution scenarios including functional forms with targets and transition periods / constant, lin_zero_10_50, lin_zero_20_50, lin_zero_20_30, lin_zero_20_70, lin_50pc_20_50, lin_50pc_20_50_extend65, lin_50pc_20_50_extend80, diff --git a/modules/15_food/anthropometrics_jan18/declarations.gms b/modules/15_food/anthropometrics_jan18/declarations.gms index 22224c44f3..072a935f0c 100644 --- a/modules/15_food/anthropometrics_jan18/declarations.gms +++ b/modules/15_food/anthropometrics_jan18/declarations.gms @@ -126,8 +126,7 @@ parameters * before shock o15_kcal_regr_initial(t,iso,kfo) Uncalibrated per capita demand before price shock (kcal per capita per day) - p15_kcal_pc_initial(t,i,kfo) Per capita consumption in food demand model before price shock on regional level (kcal per capita per day) - pm_kcal_pc_initial(t,i,kfo) Per capita consumption in food demand model before price shock (kcal per capita per day) + pm_kcal_pc_initial(t,i,kall) Per capita consumption in food demand model before price shock (kcal per capita per day) p15_kcal_pc_initial_iso(t,iso,kfo) Per capita consumption in food demand model before price shock on country level (kcal per capita per day) * after price shock diff --git a/modules/15_food/anthropometrics_jan18/equations.gms b/modules/15_food/anthropometrics_jan18/equations.gms index 6cb9c227b4..421dd270e5 100644 --- a/modules/15_food/anthropometrics_jan18/equations.gms +++ b/modules/15_food/anthropometrics_jan18/equations.gms @@ -9,7 +9,7 @@ q15_food_demand(i2,kfo) .. (vm_dem_food(i2,kfo) + sum(ct, f15_household_balanceflow(ct,i2,kfo,"dm"))) - * sum(ct,(f15_nutrition_attributes(ct,kfo,"kcal") * 10**6)) =g= + * sum(ct,(fm_nutrition_attributes(ct,kfo,"kcal") * 10**6)) =g= sum(ct,im_pop(ct,i2) * p15_kcal_pc_calibrated(ct,i2,kfo)) * 365 ; diff --git a/modules/15_food/anthropometrics_jan18/input.gms b/modules/15_food/anthropometrics_jan18/input.gms index cbf8b2f6ac..bd81857867 100644 --- a/modules/15_food/anthropometrics_jan18/input.gms +++ b/modules/15_food/anthropometrics_jan18/input.gms @@ -105,7 +105,7 @@ $ondelim $include "./modules/15_food/input/f15_household_balanceflow.cs3" $offdelim; -table f15_nutrition_attributes(t_all,kall,nutrition) Nutrition attributes of food items dedicated for fooduse (mio. kcal per tDM | t Protein per tDM) +table fm_nutrition_attributes(t_all,kall,nutrition) Nutrition attributes of food items dedicated for fooduse (mio. kcal per tDM | t Protein per tDM) $ondelim $include "./modules/15_food/input/f15_nutrition_attributes.cs3" $offdelim; diff --git a/modules/15_food/anthropometrics_jan18/intersolve.gms b/modules/15_food/anthropometrics_jan18/intersolve.gms index c980023b73..a8326dab0a 100644 --- a/modules/15_food/anthropometrics_jan18/intersolve.gms +++ b/modules/15_food/anthropometrics_jan18/intersolve.gms @@ -222,7 +222,7 @@ p15_kcal_pc_calibrated(t,i,kfo_pp) = p15_plant_kcal_structure_orig(t,i,kfo_pp) + p15_kcal_pc_calibrated_rumdairy_orig(t,i) * (1-i15_rumdairy_fadeout(t,i))); *** Substitution of ruminant meat and dairy products (kfo_rd) with single-cell protein (SCP) based on protein/cap/day -i15_protein_to_kcal_ratio(t,kfo) = f15_nutrition_attributes(t,kfo,"protein")/f15_nutrition_attributes(t,kfo,"kcal"); +i15_protein_to_kcal_ratio(t,kfo) = fm_nutrition_attributes(t,kfo,"protein")/fm_nutrition_attributes(t,kfo,"kcal"); * Before the substitution, kfo_rd is converted from kcal/cap/day to g protein/cap/day * using i15_protein_to_kcal_ratio(t,kfo_rd). * After the substitution of kfo_rd with SCP (1-i15_rumdairy_scp_fadeout), SCP is converted diff --git a/modules/15_food/anthropometrics_jan18/preloop.gms b/modules/15_food/anthropometrics_jan18/preloop.gms index 00e0fbe2ac..8d84dcd7c6 100644 --- a/modules/15_food/anthropometrics_jan18/preloop.gms +++ b/modules/15_food/anthropometrics_jan18/preloop.gms @@ -98,7 +98,7 @@ i15_exo_foodscen_fader(t,i) = (1-f15_food_substitution_fader(t,"%c15_exo_foodsce * initial prices in $US per Kcal -i15_prices_initial_kcal(iso,kfo)$(f15_nutrition_attributes("y1995",kfo,"kcal")>0) = f15_prices_initial(kfo) - / (f15_nutrition_attributes("y1995",kfo,"kcal")*10**6); +i15_prices_initial_kcal(iso,kfo)$(fm_nutrition_attributes("y1995",kfo,"kcal")>0) = f15_prices_initial(kfo) + / (fm_nutrition_attributes("y1995",kfo,"kcal")*10**6); p15_prices_kcal(t,iso,kfo,"iter1")=i15_prices_initial_kcal(iso,kfo); p15_convergence_measure(t,iter15)=NA; diff --git a/modules/15_food/anthropometrics_jan18/presolve.gms b/modules/15_food/anthropometrics_jan18/presolve.gms index 4cb9ed673d..64ed7f2fe4 100644 --- a/modules/15_food/anthropometrics_jan18/presolve.gms +++ b/modules/15_food/anthropometrics_jan18/presolve.gms @@ -429,7 +429,7 @@ p15_kcal_pc_calibrated(t,i,kfo_pp) = p15_plant_kcal_structure_orig(t,i,kfo_pp) + p15_kcal_pc_calibrated_rumdairy_orig(t,i) * (1-i15_rumdairy_fadeout(t,i))); *** Substitution of ruminant meat and dairy products (kfo_rd) with single-cell protein (SCP) based on protein/cap/day -i15_protein_to_kcal_ratio(t,kfo) = f15_nutrition_attributes(t,kfo,"protein")/f15_nutrition_attributes(t,kfo,"kcal"); +i15_protein_to_kcal_ratio(t,kfo) = fm_nutrition_attributes(t,kfo,"protein")/fm_nutrition_attributes(t,kfo,"kcal"); * Before the substitution, kfo_rd is converted from kcal/cap/day to g protein/cap/day * using i15_protein_to_kcal_ratio(t,kfo_rd). * After the substitution of kfo_rd with SCP (1-i15_rumdairy_scp_fadeout), SCP is converted diff --git a/modules/15_food/anthropometrics_jan18/sets.gms b/modules/15_food/anthropometrics_jan18/sets.gms index 04a1576e6f..4f1ae4d1d5 100644 --- a/modules/15_food/anthropometrics_jan18/sets.gms +++ b/modules/15_food/anthropometrics_jan18/sets.gms @@ -102,9 +102,6 @@ sets kfo_lp(kfo) Livestock food products / livst_rum,livst_pig,livst_chick, livst_egg, livst_milk / - kfo_rd(kfo) Ruminant meat and dairy food products - / livst_rum,livst_milk / - kfo_st(kfo) Staple products / tece,maiz,trce,rice_pro,soybean,rapeseed,groundnut,sunflower,puls_pro, potato,cassav_sp,sugr_cane,sugr_beet,molasses,brans,scp / @@ -148,6 +145,10 @@ sets livst_fadeoutscen15 Scenarios for changed composition of livestock products / halving2050, constant / +* The set kfo_rd can be defined in default.cfg and is used in the food substitution scenarios c15_rumdairy_scp_scen and c15_rumdairyscen + kfo_rd(kfo) Ruminant meat and dairy food products + / livst_rum,livst_milk / + fadeoutscen15 Food substitution scenarios including functional forms with targets and transition periods / constant, lin_zero_10_50, lin_zero_20_50, lin_zero_20_30, lin_zero_20_70, lin_50pc_20_50, lin_50pc_20_50_extend65, lin_50pc_20_50_extend80, diff --git a/modules/15_food/module.gms b/modules/15_food/module.gms index b228f51668..6df74f2de3 100644 --- a/modules/15_food/module.gms +++ b/modules/15_food/module.gms @@ -15,7 +15,9 @@ *' agricultural commodities q15_food_demand.m to change food demand and iterates *' with MAgPIE until a common solution is found. Outputs include next to food *' demand also projections of anthropometric parameters such as body height and -*' weight distribution, as well as phyiscal activity levels. +*' weight distribution, as well as phyiscal activity levels. In addition, this +*' module also provides information about nutrition attributes of foods that can +*' be used in other modules via the interface fm_nutrition_attributes. *' @authors Benjamin Leon Bodirsky, Isabelle Weindl, Jan Philipp Dietrich *###################### R SECTION START (MODULETYPES) ########################## diff --git a/modules/16_demand/sector_may15/sets.gms b/modules/16_demand/sector_may15/sets.gms index 2fc3950776..2f2b3f9c5c 100644 --- a/modules/16_demand/sector_may15/sets.gms +++ b/modules/16_demand/sector_may15/sets.gms @@ -21,6 +21,9 @@ sets kli(kap) Livestock products / livst_rum, livst_pig, livst_chick, livst_egg, livst_milk / + kli_rd(kap) Ruminant meat and dairy products + / livst_rum,livst_milk / + kforestry(k) forestry products / wood, woodfuel / diff --git a/modules/70_livestock/fbask_jan16/declarations.gms b/modules/70_livestock/fbask_jan16/declarations.gms index 71dc155495..c6c5851514 100644 --- a/modules/70_livestock/fbask_jan16/declarations.gms +++ b/modules/70_livestock/fbask_jan16/declarations.gms @@ -23,7 +23,9 @@ parameters im_slaughter_feed_share(t_all,i,kap,attributes) Share of feed that is incorporated in animal biomass (1) i70_livestock_productivity(t_all,i,sys) Productivity indicator for livestock production (t FM per animal per yr) im_feed_baskets(t_all,i,kap,kall) Feed baskets in tDM per tDM livestock product (1) - p70_cattle_stock_proxy(t,i) Proxy for cattle stocks needed to fullfil domestic food demand (mio. animals per yr) + p70_cattle_stock_proxy(t,i) Proxy for cattle stocks needed to fullfil food demand for ruminant meat (mio. animals per yr) + p70_milk_cow_proxy(t,i) Proxy for milk cows needed to fullfil food demand for milk (mio. animals per yr) + p70_cattle_feed_pc_proxy(t,i,kli_rd) Proxy for daily per capita feed demand for pasture biomass driven by demand for beef and dairy products (tDM per capita per day) p70_incr_cattle(t,i) Change in estimated cattle stocks attributed to food demand projections (1) 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) diff --git a/modules/70_livestock/fbask_jan16/presolve.gms b/modules/70_livestock/fbask_jan16/presolve.gms index 0e14beeb88..902ad25139 100644 --- a/modules/70_livestock/fbask_jan16/presolve.gms +++ b/modules/70_livestock/fbask_jan16/presolve.gms @@ -12,25 +12,39 @@ *' biophysical pasture yields in the module [14_yields]. *' The exogenous calculation of pasture management requires information on -*' the number of cattle reared to fulfil the domestic demand for ruminant +*' changes in the number of cattle reared to fulfil the food demand for ruminant *' livestock products: p70_cattle_stock_proxy(t,i) = im_pop(t,i)*pm_kcal_pc_initial(t,i,"livst_rum") - /i70_livestock_productivity(t,i,"sys_beef"); + /i70_livestock_productivity(t,i,"sys_beef"); -*' The lower bound for `p70_cattle_stock_proxy` is set to 20% of initial cattle -*' stocks in 1995: +p70_milk_cow_proxy(t,i) = im_pop(t,i)*pm_kcal_pc_initial(t,i,"livst_milk") + /i70_livestock_productivity(t,i,"sys_dairy"); + +*' The lower bound for `p70_cattle_stock_proxy` and `p70_milk_cow_proxy` is +*' set to 20% of initial values in 1995: p70_cattle_stock_proxy(t,i)$(p70_cattle_stock_proxy(t,i) < 0.2*p70_cattle_stock_proxy("y1995",i)) = 0.2*p70_cattle_stock_proxy("y1995",i); +p70_milk_cow_proxy(t,i)$(p70_milk_cow_proxy(t,i) < 0.2*p70_milk_cow_proxy("y1995",i)) = 0.2*p70_milk_cow_proxy("y1995",i); + +*' The parameter `p70_cattle_feed_pc_proxy` is a proxy for regional daily per capita +*' feed demand for pasture biomass driven by demand for beef and dairy products, +*' which is later used for weighted aggregation. +p70_cattle_feed_pc_proxy(t,i,kli_rd) = pm_kcal_pc_initial(t,i,kli_rd)*im_feed_baskets(t,i,kli_rd,"pasture")/(fm_nutrition_attributes(t,kli_rd,"kcal") * 10**6); -*' The parameter `p70_incr_cattle` describes the changes in cattle stocks +*' The parameter `p70_incr_cattle` describes the changes in the number of cattle *' relative to the previous time step: p70_incr_cattle(t,i) = 1$(ord(t)=1) - + (p70_cattle_stock_proxy(t,i)/p70_cattle_stock_proxy(t-1,i))$(ord(t)>1); + + ( + ( p70_cattle_feed_pc_proxy(t,i,"livst_rum") * (p70_cattle_stock_proxy(t,i)/p70_cattle_stock_proxy(t-1,i)) + + + p70_cattle_feed_pc_proxy(t,i,"livst_milk") * (p70_milk_cow_proxy(t,i)/p70_milk_cow_proxy(t-1,i)) ) + / sum(kli_rd, p70_cattle_feed_pc_proxy(t,i,kli_rd) ) + )$(ord(t)>1); *' The pasture management factor is calculated by applying a linear relationship -*' that links changes in pasture management with changes in cattle stocks: +*' that links changes in pasture management with changes in the number of cattle: if (m_year(t) <= s70_past_mngmnt_factor_fix, pm_past_mngmnt_factor(t,i) = 1;