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

For LPJ output irrigation intensity, rather than rate (l/m2)

parent 5f644ac3
No related branches found
No related tags found
No related merge requests found
...@@ -124,7 +124,7 @@ rcp/constCO2_constClim,TECHNOLOGY_CHANGE_ANNUAL_RATE,unif,0.001,0.003, ...@@ -124,7 +124,7 @@ rcp/constCO2_constClim,TECHNOLOGY_CHANGE_ANNUAL_RATE,unif,0.001,0.003,
rcp/constCO2_constClim,TRADE_BARRIER_FACTOR_DEFAULT,unif,0.1,0.3, rcp/constCO2_constClim,TRADE_BARRIER_FACTOR_DEFAULT,unif,0.1,0.3,
rcp/constCO2_constClim,TRANSPORT_COST,unif,0.025,0.075, rcp/constCO2_constClim,TRANSPORT_COST,unif,0.025,0.075,
rcp/constCO2_constClim,TRANSPORT_LOSSES,unif,0.025,0.075, rcp/constCO2_constClim,TRANSPORT_LOSSES,unif,0.025,0.075,
rcp/constCO2_constClim,YIELD_DIR_TOP,value,,,runs_20171008_constCO2_constClim/LPJG_PLUM_expt1.2_rcp85_ipsl_irrV7104_b20170728_bothDS_irrWaits_constCO2_constClim_forED_20171008124330 rcp/constCO2_constClim,YIELD_DIR_TOP,value,,,LPJG_PLUM_expt1.2_rcp85_ipsl_irrV7104_b20170728_bothDS_irrWaits_constCO2_constClim_forED_20171019121906
rcp/26_constCO2_constClim,AGRI_LAND_EXPANSION_COST_FACTOR,unif,0.5,1.5, rcp/26_constCO2_constClim,AGRI_LAND_EXPANSION_COST_FACTOR,unif,0.5,1.5,
rcp/26_constCO2_constClim,ANNUAL_MAX_IMPORT_CHANGE,unif,0.01,0.03, rcp/26_constCO2_constClim,ANNUAL_MAX_IMPORT_CHANGE,unif,0.01,0.03,
rcp/26_constCO2_constClim,CROP_TO_PASTURE_COST_FACTOR,unif,0.5,1.5, rcp/26_constCO2_constClim,CROP_TO_PASTURE_COST_FACTOR,unif,0.5,1.5,
......
This diff is collapsed.
...@@ -94,7 +94,13 @@ public class LandUseItem implements InterpolatingRasterItem<LandUseItem>, Serial ...@@ -94,7 +94,13 @@ public class LandUseItem implements InterpolatingRasterItem<LandUseItem>, Serial
public static double getFertiliserTotal(Collection<? extends LandUseItem> items, Collection<CropType> crops) { public static double getFertiliserTotal(Collection<? extends LandUseItem> items, Collection<CropType> crops) {
return getFertiliserTotal(items, crops.toArray(new CropType[crops.size()])); return getFertiliserTotal(items, crops.toArray(new CropType[crops.size()]));
} }
/** Irrigation Intensity (unit less) */
public double getIrrigationIntensity(CropType crop) {
Intensity i = getIntensity(crop);
return (i == null) ? 0 : i.getIrrigationIntensity();
}
/** Irrigation rate in litre/m2 */ /** Irrigation rate in litre/m2 */
public double getIrrigationRate(CropType crop) { public double getIrrigationRate(CropType crop) {
Intensity i = getIntensity(crop); Intensity i = getIntensity(crop);
...@@ -109,14 +115,14 @@ public class LandUseItem implements InterpolatingRasterItem<LandUseItem>, Serial ...@@ -109,14 +115,14 @@ public class LandUseItem implements InterpolatingRasterItem<LandUseItem>, Serial
return rate * area * 0.01; // rate(10^-3m or mm or l/m2) * area(10^6ha) = 10^3 m.ha = 10^7 m3 = 1/100 km3 return rate * area * 0.01; // rate(10^-3m or mm or l/m2) * area(10^6ha) = 10^3 m.ha = 10^7 m3 = 1/100 km3
} }
/** Irrigation rate in litre/m2 */ /** Irrigation Intensity (unit less) */
public double getIrrigationAverageRate(CropType... crops) { public double getIrrigationAverageIntensity(CropType... crops) {
double irrigTotal = 0; double irrigTotal = 0;
double areaTotal = 0; double areaTotal = 0;
for (CropType c : crops) { for (CropType c : crops) {
double area = getCropArea(c); double area = getCropArea(c);
irrigTotal += getIrrigationRate(c) * area; irrigTotal += getIrrigationIntensity(c) * area;
areaTotal += area; areaTotal += area;
} }
......
...@@ -60,11 +60,11 @@ public class LpjgOutputer extends AbstractLandUseOutputer { ...@@ -60,11 +60,11 @@ public class LpjgOutputer extends AbstractLandUseOutputer {
double lon = landUseRaster.getYCoordin(key); double lon = landUseRaster.getYCoordin(key);
boolean isSpringWheat = yieldSurfaces.isSpringWheat(key); boolean isSpringWheat = yieldSurfaces.isSpringWheat(key);
double winterWheatIrrig = item.getIrrigationAverageRate(CropType.OILCROPS, isSpringWheat ? null : CropType.WHEAT); double winterWheatIrrig = item.getIrrigationAverageIntensity(CropType.OILCROPS, isSpringWheat ? null : CropType.WHEAT);
double springWheatIrrig = item.getIrrigationAverageRate(CropType.PULSES, CropType.STARCHY_ROOTS, isSpringWheat ? CropType.WHEAT : null); double springWheatIrrig = item.getIrrigationAverageIntensity(CropType.PULSES, CropType.STARCHY_ROOTS, isSpringWheat ? CropType.WHEAT : null);
double cornIrrig = item.getIrrigationAverageRate(CropType.MAIZE, CropType.ENERGY_CROPS); double cornIrrig = item.getIrrigationAverageIntensity(CropType.MAIZE, CropType.ENERGY_CROPS);
double riceIrrig = item.getIrrigationAverageRate(CropType.RICE); double riceIrrig = item.getIrrigationAverageIntensity(CropType.RICE);
double pastureIrrig = item.getIrrigationAverageRate(CropType.PASTURE); double pastureIrrig = item.getIrrigationAverageIntensity(CropType.PASTURE);
irrigWriter.write(String.format("%.2f %.2f %d %.14f %.14f %.14f %.14f %.14f", lat, lon, year, winterWheatIrrig, springWheatIrrig, cornIrrig, riceIrrig, pastureIrrig)); irrigWriter.write(String.format("%.2f %.2f %d %.14f %.14f %.14f %.14f %.14f", lat, lon, year, winterWheatIrrig, springWheatIrrig, cornIrrig, riceIrrig, pastureIrrig));
irrigWriter.newLine(); irrigWriter.newLine();
......
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