Skip to content
Snippets Groups Projects
Commit b904db23 authored by Peter Alexander's avatar Peter Alexander
Browse files

Hold cereal fraction constant during calibration

parent 3c542c57
No related branches found
No related tags found
No related merge requests found
BASE_DIR=. BASE_DIR=.
#YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/IPSL/LPJG_PLUM_expt1.2_rcp45_ipsl_lessIO_forED #YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/IPSL/LPJG_PLUM_expt1.2_rcp45_ipsl_lessIO_forED
YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/runs_20170925/LPJG_PLUM_expt1.2_rcp26_ipsl_irrV7104_b20170728_bothDS_irrWaits_forED_20170925154752 #YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/runs_20170925/LPJG_PLUM_expt1.2_rcp26_ipsl_irrV7104_b20170728_bothDS_irrWaits_forED_20170925154752
YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/LPJGPLUM_expt1.1_2006-2100_PLUM6xtra_20180412171654/rcp60
# Properties for testing # Properties for testing
#CHANGE_YIELD_DATA_YEAR=true #CHANGE_YIELD_DATA_YEAR=true
#CHANGE_DEMAND_YEAR=false #CHANGE_DEMAND_YEAR=false
DEBUG_LIMIT_COUNTRIES=true DEBUG_LIMIT_COUNTRIES=false
DEBUG_COUNTRY_NAME=China DEBUG_COUNTRY_NAME=China
#MAX_IMPORT_CHANGE=0.0 #MAX_IMPORT_CHANGE=0.0
#MARKET_ADJ_PRICE=false #MARKET_ADJ_PRICE=false
...@@ -15,7 +16,8 @@ DEBUG_JUST_DEMAND_OUTPUT=false ...@@ -15,7 +16,8 @@ DEBUG_JUST_DEMAND_OUTPUT=false
SSP_SCENARIO=SSP2_v9_130325 SSP_SCENARIO=SSP2_v9_130325
IS_CALIBRATION_RUN = false IS_CALIBRATION_RUN = true
GENERATE_NEW_YIELD_CLUSTERS = false
LIMIT_CEREAL_FRACTION=true LIMIT_CEREAL_FRACTION=true
...@@ -26,7 +28,8 @@ ENABLE_GEN2_BIOENERGY=true ...@@ -26,7 +28,8 @@ ENABLE_GEN2_BIOENERGY=true
#TRADE_BARRIER_FACTOR_DEFAULT=0.3 #TRADE_BARRIER_FACTOR_DEFAULT=0.3
#NUM_YIELD_CLUSTERS=100 #NUM_YIELD_CLUSTERS=100
END_TIMESTEP=2
END_TIMESTEP=4
TIMESTEP_SIZE=1 TIMESTEP_SIZE=1
INTERPOLATE_OUTPUT_YEARS = false INTERPOLATE_OUTPUT_YEARS = false
\ No newline at end of file
...@@ -184,7 +184,7 @@ public class CountryAgent { ...@@ -184,7 +184,7 @@ public class CountryAgent {
private Map<CropType, Double> getMinCerealFraction(Timestep timestep) { private Map<CropType, Double> getMinCerealFraction(Timestep timestep) {
Map<CropType, Double> minCerealFraction = new HashMap<CropType, Double>(); Map<CropType, Double> minCerealFraction = new HashMap<CropType, Double>();
int yearsOfChange = (timestep.getTimestep() - ModelConfig.TECHNOLOGY_CHANGE_START_STEP) * ModelConfig.TIMESTEP_SIZE; int yearsOfChange = ModelConfig.IS_CALIBRATION_RUN ? 0 : (timestep.getTimestep() - ModelConfig.TECHNOLOGY_CHANGE_START_STEP) * ModelConfig.TIMESTEP_SIZE;
for (Map.Entry<CropType, Double> entry : demandManager.getBaseCerealFraction(country).entrySet()) { for (Map.Entry<CropType, Double> entry : demandManager.getBaseCerealFraction(country).entrySet()) {
minCerealFraction.put(entry.getKey(), entry.getValue() * Math.max(ModelConfig.TOTAL_MAX_CEREAL_CHANGE, (1- ModelConfig.ANNUAL_MAX_CEREAL_CHANGE * yearsOfChange))); minCerealFraction.put(entry.getKey(), entry.getValue() * Math.max(ModelConfig.TOTAL_MAX_CEREAL_CHANGE, (1- ModelConfig.ANNUAL_MAX_CEREAL_CHANGE * yearsOfChange)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment