Commit 87f41508 authored by Eric Duminil's avatar Eric Duminil
Browse files

one more column

parent bbfb7f67
This diff is collapsed.
...@@ -79,8 +79,8 @@ public class TreeWaterDemand { ...@@ -79,8 +79,8 @@ public class TreeWaterDemand {
Locale.setDefault(new Locale("en", "US")); Locale.setDefault(new Locale("en", "US"));
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;WindSpeed;SaturationVaporPressure;ActualVaporPressure;Psy;NetRadiation;ET0;ET0u\n"); "DateTime;Temperature;Humidity;GHI;DayOrNight;WindSpeed;SaturationVaporPressure;ActualVaporPressure;Psy;NetRadiation;ET0;ET0u\n");
bw.write("dd/mm/yyyy HH:MM;[°C];[%];[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];[m/s];[kPa];[kPa];[kPa/°C];[?];[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);
...@@ -91,6 +91,7 @@ public class TreeWaterDemand { ...@@ -91,6 +91,7 @@ public class TreeWaterDemand {
bw.write(String.format("%.1f", temp)); bw.write(String.format("%.1f", temp));
bw.write(String.format(";%.0f", humidity)); bw.write(String.format(";%.0f", humidity));
bw.write(String.format(";%.0f", incomingRadiation)); bw.write(String.format(";%.0f", incomingRadiation));
bw.write(String.format(";%d", incomingRadiation > 0 ? 1 : 0));
// convert to MJ/h - 1 W = 0.0036 MJ/h // convert to MJ/h - 1 W = 0.0036 MJ/h
incomingRadiation *= 0.0036; incomingRadiation *= 0.0036;
......
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