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

Allow new FPU water availability to be switched off

parent 71f8abcb
Branches
No related tags found
No related merge requests found
......@@ -204,10 +204,10 @@ public class ModelConfig {
public static final double PASTURE_HARVEST_FRACTION = getDoubleProperty("PASTURE_HARVEST_FRACTION", 0.5);
public static final double MEAT_EFFICIENCY = getDoubleProperty("MEAT_EFFICIENCY", 1.0); // 'meat' is includes feed conversion ratio already, this is tech. change or similar
public static final double IRRIGIATION_EFFICIENCY = getDoubleProperty("IRRIGIATION_EFFICIENCY", 0.25);
public static final double IRRIGIATION_EFFICIENCY = getDoubleProperty("IRRIGIATION_EFFICIENCY", 0.5);
public static final double ENVIRONMENTAL_WATER_CONSTRAINT = getDoubleProperty("ENVIRONMENTAL_WATER_CONSTRAINT", 1.0);
public static final double WATER_AVAILIBILITY_RATE_OF_CHANGE = IS_CALIBRATION_RUN ? 0.0 : getDoubleProperty("WATER_AVAILIBILITY_RATE_OF_CHANGE", 0.0);
public static final boolean USE_BLUE_WATER_FILE_IRRIG_CONSTRAINT = getBooleanProperty("USE_BLUE_WATER_FILE_IRRIG_CONSTRAINT", true);;
public static final double LAND_CHANGE_COST = getDoubleProperty("LAND_CHANGE_COST", 0.7);
public static final double CROP_TO_PASTURE_COST_FACTOR = getDoubleProperty("CROP_TO_PASTURE_COST_FACTOR", 1.0);
......@@ -222,7 +222,7 @@ public class ModelConfig {
public static final double SEED_AND_WASTE_FRACTION = getDoubleProperty("SEED_AND_WASTE_FRACTION", 0.1);
public static final double TECHNOLOGY_CHANGE_ANNUAL_RATE = IS_CALIBRATION_RUN ? 0.0 : getDoubleProperty("TECHNOLOGY_CHANGE_ANNUAL_RATE", 0.0);
public static final double TECHNOLOGY_CHANGE_ANNUAL_RATE = getDoubleProperty("TECHNOLOGY_CHANGE_ANNUAL_RATE", 0.0);
public static final int TECHNOLOGY_CHANGE_START_STEP = getIntProperty("TECHNOLOGY_CHANGE_START_STEP", 0);
public static final boolean USE_BIOENERGY_TRAJECTORY = getBooleanProperty("USE_BIOENERGY_TRAJECTORY", false); // false is the old style, i.e. BIOENERGY_CHANGE_ANNUAL_RATE, BIOENERGY_CHANGE_START_YEAR and BIOENERGY_CHANGE_END_YEAR
......@@ -246,7 +246,7 @@ public class ModelConfig {
public static final double OTHER_INTENSITY_COST = getDoubleProperty("OTHER_INTENSITY_COST", 0.4);
public static final double OTHER_INTENSITY_PARAM = getDoubleProperty("OTHER_INTENSITY_PARAM", 3.22);
public static final double IRRIG_COST_SCALE_FACTOR = getDoubleProperty("IRRIG_COST_SCALE_FACTOR", 0.0006);
public static final double IRRIG_COST_SCALE_FACTOR = getDoubleProperty("IRRIG_COST_SCALE_FACTOR", 0.001);
public static final double FERTILISER_COST_PER_T = getDoubleProperty("FERTILISER_COST_PER_T", 2.7); // $500/t, 18% N/t
public static final double FERTILISER_MAX_COST = FERTILISER_COST_PER_T * MAX_FERT_AMOUNT/1000;
......
......@@ -571,15 +571,21 @@ public class ModelMain {
private IrrigationRasterSet getFixedIrrigationData() {
IrrigationRasterSet fixedIrrigData = new IrrigationRasterSet(desiredProjection, fpuManager);
new IrrigiationCostReader(fixedIrrigData).getRasterDataFromFile(ModelConfig.IRRIGATION_COST_FILE);
// new IrrigationConstraintReader(fixedIrrigData).getRasterDataFromFile(ModelConfig.IRRIGATION_CONSTRAINT_FILE);
if (ModelConfig.USE_BLUE_WATER_FILE_IRRIG_CONSTRAINT)
new IrrigationConstraintReader(fixedIrrigData).getRasterDataFromFile(ModelConfig.IRRIGATION_CONSTRAINT_FILE);
return fixedIrrigData;
}
private RasterSet<IrrigationItem> getUpdateIrrigationData(Timestep timestep, YieldRaster yieldSurfaces) {
String rootDir = timestep.getYearSubDir(ModelConfig.YIELD_DIR);
new IrrigationMaxAmountReader(currentIrrigationData, yieldSurfaces).getRasterDataFromFile(rootDir + File.separator + ModelConfig.IRRIG_MAX_WATER_FILENAME);
new RunOffReader(currentIrrigationData).getRasterDataFromFile(rootDir + File.separator + ModelConfig.IRRIG_RUNOFF_FILE);
currentIrrigationData.updateConstraintByFPU(timestep);
if (!ModelConfig.USE_BLUE_WATER_FILE_IRRIG_CONSTRAINT) {
new RunOffReader(currentIrrigationData).getRasterDataFromFile(rootDir + File.separator + ModelConfig.IRRIG_RUNOFF_FILE);
currentIrrigationData.updateConstraintByFPU(timestep);
}
return currentIrrigationData;
}
......
......@@ -38,7 +38,9 @@ public class LPJYieldResponseMapReader {
LogWriter.println("Found marker file in " + (System.currentTimeMillis() - startTime) + " ms");
// arithmetic adjustment of yield for tech change
int yearsOfTech = (timestep.getTimestep() - ModelConfig.TECHNOLOGY_CHANGE_START_STEP) * ModelConfig.TIMESTEP_SIZE;
int timeStepForTechChange = ModelConfig.IS_CALIBRATION_RUN ? ModelConfig.START_TIMESTEP : timestep.getTimestep(); // we don't want technology to change in calibration, but sometime we run tech change backwards
int yearsOfTech = (timeStepForTechChange - ModelConfig.TECHNOLOGY_CHANGE_START_STEP) * ModelConfig.TIMESTEP_SIZE;
techYieldAdj = 1.0 + yearsOfTech * ModelConfig.TECHNOLOGY_CHANGE_ANNUAL_RATE;
LogWriter.println("Yield adjustment for technology for " + timestep + " is " + techYieldAdj);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment