diff --git a/hindcast/hind_config.properties b/hindcast/hind_config.properties index 790dbb08a3a6897bf07492241c8f6ea84528820b..e4e42cc2f85c091864056a95f969493d732566f3 100644 --- a/hindcast/hind_config.properties +++ b/hindcast/hind_config.properties @@ -2,8 +2,8 @@ BASE_DIR=./hindcast INITAL_LAND_COVER_FILENAME=netfract_hurtt_1990.txt BASE_YEAR=1990 SSP_SCENARIO=HINDCAST -YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/19Jan2017/LPJG_PLUM_expt1.1_1971-2005_forED -#YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/IPSL/LPJG_PLUM_expt1.1_1966-2005_ipsl_lessIO_forED +#YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/19Jan2017/LPJG_PLUM_expt1.1_1971-2005_forED +YIELD_DIR=/Users/peteralexander/Documents/LURG/LPJ/IPSL/LPJG_PLUM_expt1.1_1966-2005_ipsl_lessIO_forED # irritatingly the gams file is also found under the BASE_DIR, and don't want to duplicate so need to specify exactly GAMS_MODEL=./GAMS/IntExtOpt.gms diff --git a/src/ac/ed/lurg/ModelConfig.java b/src/ac/ed/lurg/ModelConfig.java index 441fcfd8c33fa76cc344927697c804da75eb1be1..a8dd6d8e15eb453125d651e4210d036d88bc6fa0 100644 --- a/src/ac/ed/lurg/ModelConfig.java +++ b/src/ac/ed/lurg/ModelConfig.java @@ -193,23 +193,23 @@ public class ModelConfig { public static final int BIOENERGY_CHANGE_START_YEAR = getIntProperty("BIOENERGY_CHANGE_START_YEAR", 2010); public static final int BIOENERGY_CHANGE_END_YEAR = getIntProperty("BIOENERGY_CHANGE_END_YEAR", 2030); - public static final double MARKET_LAMBA = getDoubleProperty("MARKET_LAMBA", 0.3); // controls international market price adjustment rate + public static final double MARKET_LAMBA = getDoubleProperty("MARKET_LAMBA", 0.4); // controls international market price adjustment rate public static final double POPULATION_AGGREG_LIMIT = getDoubleProperty("POPULATION_AGGREG_LIMIT", 30.0); // in millions, smaller countries are aggregated on a regional basis public static final double UNHANDLED_CROP_AREA = getDoubleProperty("UNHANDLED_CROP_AREA", 0.3); // includes fruit veg forage crops set aside and failed crop - public static final double OTHER_INTENSITY_COST = getDoubleProperty("OTHER_INTENSITY_COST", 0.4); + public static final double OTHER_INTENSITY_COST = getDoubleProperty("OTHER_INTENSITY_COST", 0.2); 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.03); + public static final double IRRIG_COST_SCALE_FACTOR = getDoubleProperty("IRRIG_COST_SCALE_FACTOR", 0.02); public static final double FERTILISER_COST_PER_T = getDoubleProperty("FERTILISER_COST_PER_T", 0.5/0.18); // $500/t, 18% N/t public static final double FERTILISER_MAX_COST = FERTILISER_COST_PER_T * MAX_FERT_AMOUNT/1000; - public static final double DOMESTIC_PRICE_MARKUP = getDoubleProperty("DOMESTIC_PRICE_MARKUP", 2.0); + public static final double DOMESTIC_PRICE_MARKUP = getDoubleProperty("DOMESTIC_PRICE_MARKUP", 1.0); public static final double TRANSPORT_LOSSES = getDoubleProperty("TRANSPORT_LOSSES", 0.05); // in international trade - public static final double TRANSPORT_COST = getDoubleProperty("TRANSPORT_COST", 0.2); // 100 $/t see Wheat Transportation Profile - USDA - public static final double TRADE_BARRIER_FACTOR_DEFAULT = getDoubleProperty("TRADE_BARRIER_FACTOR_DEFAULT", 0.4); // price factor in international trade, transport cost and real trade barriers + public static final double TRANSPORT_COST = getDoubleProperty("TRANSPORT_COST", 0.3); // 100 $/t see Wheat Transportation Profile - USDA + public static final double TRADE_BARRIER_FACTOR_DEFAULT = getDoubleProperty("TRADE_BARRIER_FACTOR_DEFAULT", 0.5); // price factor in international trade, transport cost and real trade barriers public static final double TRADE_BARRIER_ADJ = getDoubleProperty("TRADE_BARRIER_ADJ", 1.0); public static final boolean ACTIVE_TRADE_BARRIERS = getBooleanProperty("ACTIVE_TRADE_BARRIERS", false); // if set to true read in barrier information from file, otherwise use default as above @@ -222,5 +222,5 @@ public class ModelConfig { public static final int LPJG_TIMESTEP_SIZE = 5; public static final int NUM_YIELD_CLUSTERS = 500; - public static final long RANDOM_SEED = 290374; // any number will do + public static final long RANDOM_SEED = 29031974; // any number will do } diff --git a/src/ac/ed/lurg/output/LandUseOutputer.java b/src/ac/ed/lurg/output/LandUseOutputer.java index 30814ef961eaa7d923b143ba2fab971269aa9f0f..9fb3bf6e06f85b5a61c8fda21d23671aa0f17406 100644 --- a/src/ac/ed/lurg/output/LandUseOutputer.java +++ b/src/ac/ed/lurg/output/LandUseOutputer.java @@ -29,15 +29,15 @@ public class LandUseOutputer extends AbstractLandUseOutputer { String landCoverFileName = outputDir.getPath() + File.separator + "LandUse.txt"; fertWriter = new BufferedWriter(new FileWriter(landCoverFileName, false)); - StringBuffer sbHeader = new StringBuffer("Lon,Lat,protected"); + StringBuffer sbHeader = new StringBuffer("Lon Lat area protected"); for (LandCoverType cover : LandCoverType.values()) { - sbHeader.append("," + cover.getName()); + sbHeader.append(" " + cover.getName()); } for (CropType crop : CropType.getAllItems()) { String cropString = crop.getGamsName(); - sbHeader.append("," + cropString + "_A," + cropString + "_FI," + cropString + "_II," + cropString + "_OI"); + sbHeader.append(" " + cropString + "_A " + cropString + "_FI " + cropString + "_FQ " + cropString + "_II " + cropString + "_IQ "+ cropString + "_OI"); } fertWriter.write(sbHeader.toString()); fertWriter.newLine(); @@ -52,21 +52,25 @@ public class LandUseOutputer extends AbstractLandUseOutputer { double lat = landUseRaster.getXCoordin(key); double lon = landUseRaster.getYCoordin(key); - StringBuffer sbData = new StringBuffer(String.format("%.2f,%.2f", lat, lon)); + StringBuffer sbData = new StringBuffer(String.format("%.2f %.2f", lat, lon)); - sbData.append(String.format(",%.14f", item.getProtectedArea())); + sbData.append(String.format(" %.14f", item.getTotalLandCoverArea())); + + sbData.append(String.format(" %.14f", item.getProtectedArea())); for (LandCoverType cover : LandCoverType.values()) { - sbData.append(String.format(",%.14f", item.getLandCoverArea(cover))); + sbData.append(String.format(" %.14f", item.getLandCoverArea(cover))); } for (CropType crop : CropType.getAllItems()) { double cropFract = item.getCropFraction(crop); Intensity intensity = item.getIntensity(crop); double fertI = intensity==null ? 0.0 : intensity.getFertiliserIntensity(); + double fertQ = intensity==null ? 0.0 : intensity.getFertiliserAmount(); double irrigI = intensity==null ? 0.0 : intensity.getIrrigationIntensity(); + double irrigQ = intensity==null ? 0.0 : intensity.getIrrigationRate(); double otherI = intensity==null ? 0.0 : intensity.getOtherIntensity(); - sbData.append(String.format(",%.14f,%.14f,%.14f,%.14f", cropFract, fertI, irrigI, otherI)); + sbData.append(String.format(" %.14f %.14f %.14f %.14f %.14f %.14f", cropFract, fertI, fertQ, irrigI, irrigQ, otherI)); } fertWriter.write(sbData.toString());