Skip to content

Commit

Permalink
Merge pull request magpiemodel#581 from pfuehrlich-pik/master
Browse files Browse the repository at this point in the history
magpie release 4.6.9
  • Loading branch information
pfuehrlich-pik authored Jul 27, 2023
2 parents 018050c + 6de57e6 commit 09a26cf
Show file tree
Hide file tree
Showing 24 changed files with 72 additions and 49 deletions.
6 changes: 0 additions & 6 deletions .github/workflows/test-code.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}
4 changes: 2 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "MAgPIE - An Open Source land-use modeling framework",
"version": "4.6.8",
"version": "4.6.9",
"creators": [
{
"name": "Dietrich, Jan Philipp",
Expand Down Expand Up @@ -109,5 +109,5 @@
"license": {
"id": "AGPL-3.0-or-later"
},
"publication_date": "2023-07-17"
"publication_date": "2023-07-27"
}
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ authors:
email: [email protected]

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
Expand Down
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Imports:
iamc,
lucode2 (>= 0.36.0),
luplot,
luscale,
luscale (>= 2.27.4),
lusweave,
m4fsdp,
madrat,
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ https://www.pik-potsdam.de/research/projects/activities/land-use-modelling/magpi
A framework description paper has been published in
Geoscientific Model Development (GMD): https://doi.org/10.5194/gmd-12-1299-2019

The model documentation for version 4.6.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
Expand Down Expand Up @@ -188,7 +188,7 @@ [email protected]
Please contact [email protected]

## CITATION
See file CITATION.cff or the [How-to-Cite section](https://rse.pik-potsdam.de/doc/magpie/4.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
Expand Down
2 changes: 1 addition & 1 deletion config/default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions modules/15_food/anthro_iso_jun22/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/15_food/anthro_iso_jun22/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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
;

Expand Down
5 changes: 2 additions & 3 deletions modules/15_food/anthro_iso_jun22/exodietmacro.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/15_food/anthro_iso_jun22/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions modules/15_food/anthro_iso_jun22/preloop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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;
7 changes: 4 additions & 3 deletions modules/15_food/anthro_iso_jun22/sets.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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 /
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions modules/15_food/anthropometrics_jan18/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion modules/15_food/anthropometrics_jan18/equations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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
;

Expand Down
2 changes: 1 addition & 1 deletion modules/15_food/anthropometrics_jan18/input.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion modules/15_food/anthropometrics_jan18/intersolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions modules/15_food/anthropometrics_jan18/preloop.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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;
2 changes: 1 addition & 1 deletion modules/15_food/anthropometrics_jan18/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions modules/15_food/anthropometrics_jan18/sets.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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 /
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion modules/15_food/module.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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) ##########################
Expand Down
3 changes: 3 additions & 0 deletions modules/16_demand/sector_may15/sets.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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 /

Expand Down
4 changes: 3 additions & 1 deletion modules/70_livestock/fbask_jan16/declarations.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
28 changes: 21 additions & 7 deletions modules/70_livestock/fbask_jan16/presolve.gms
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 09a26cf

Please sign in to comment.