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

change LandUse output and some parameters

parent 7b0f662d
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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
}
......@@ -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());
......
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