Commit 57fd5725 authored by Eric Duminil's avatar Eric Duminil
Browse files

units

parent 800520e4
This diff is collapsed.
...@@ -80,7 +80,7 @@ public class TreeWaterDemand { ...@@ -80,7 +80,7 @@ public class TreeWaterDemand {
try (BufferedWriter bw = Files.newBufferedWriter(Paths.get("all_values.csv"), StandardCharsets.UTF_8)) { try (BufferedWriter bw = Files.newBufferedWriter(Paths.get("all_values.csv"), StandardCharsets.UTF_8)) {
bw.write( bw.write(
"DateTime;Temperature;Humidity;GHI;DayOrNight;netLongwaveRadiation;WindSpeed;SaturationVaporPressure;ActualVaporPressure;Psy;NetRadiation;ET0;ET0u\n"); "DateTime;Temperature;Humidity;GHI;DayOrNight;netLongwaveRadiation;WindSpeed;SaturationVaporPressure;ActualVaporPressure;Psy;NetRadiation;ET0;ET0u\n");
bw.write("dd/mm/yyyy HH:MM;[°C];[%];[W/m²];[0/1];[W/m²];[m/s];[kPa];[kPa];[kPa/°C];[?];[l/h];[l/h]\n"); bw.write("dd/mm/yyyy HH:MM;[°C];[%];[W/m²];[0/1];[MJ/(m².h)];[m/s];[kPa];[kPa];[kPa/°C];[MJ/(m².h)];[l/h];[l/h]\n");
for (int i = startHours; i <= startHours + hours; i++) { for (int i = startHours; i <= startHours + hours; i++) {
bw.write(String.format("%s;", counter.format(f))); bw.write(String.format("%s;", counter.format(f)));
String[] row = csvValues.get(i + 2); String[] row = csvValues.get(i + 2);
...@@ -109,7 +109,7 @@ public class TreeWaterDemand { ...@@ -109,7 +109,7 @@ public class TreeWaterDemand {
hourOfDay, lz, lm); hourOfDay, lz, lm);
double et0u = et0u(svf, advection, et0); double et0u = et0u(svf, advection, et0);
bw.write(String.format(";%.0f", netLongwaveRadiation)); bw.write(String.format(";%.5f", netLongwaveRadiation));
bw.write(String.format(";%.1f", windSpeed)); bw.write(String.format(";%.1f", windSpeed));
bw.write(String.format(";%.5f", saturationVaporPressure)); bw.write(String.format(";%.5f", saturationVaporPressure));
bw.write(String.format(";%.5f", actualVaporPressure)); bw.write(String.format(";%.5f", actualVaporPressure));
...@@ -192,6 +192,7 @@ public class TreeWaterDemand { ...@@ -192,6 +192,7 @@ public class TreeWaterDemand {
} }
} }
// unit is apparently [MJ / (m².h)]
private static double rn(double temperature, double actualVaporPressure, double shortWaveRadiation, double height, private static double rn(double temperature, double actualVaporPressure, double shortWaveRadiation, double height,
int dayOfYear, double hourOfDay, double lz, double lm) { int dayOfYear, double hourOfDay, double lz, double lm) {
// 1 - 0.23: albedo effect of grass // 1 - 0.23: albedo effect of grass
...@@ -199,6 +200,7 @@ public class TreeWaterDemand { ...@@ -199,6 +200,7 @@ public class TreeWaterDemand {
- rnl(temperature, actualVaporPressure, shortWaveRadiation, height, dayOfYear, hourOfDay, lz, lm); - rnl(temperature, actualVaporPressure, shortWaveRadiation, height, dayOfYear, hourOfDay, lz, lm);
} }
// unit is apparently [MJ / (m².h)]
private static double rnl(double temperature, double actualVaporPressure, double shortWaveRadiation, double height, private static double rnl(double temperature, double actualVaporPressure, double shortWaveRadiation, double height,
int dayOfYear, double hourOfDay, double lz, double lm) { int dayOfYear, double hourOfDay, double lz, double lm) {
// divide by 24 for hourly // divide by 24 for hourly
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment