Commit 8717c842 authored by Eric Duminil's avatar Eric Duminil
Browse files

Moves datetime index by 1h

parent 6f4999f8
This diff is collapsed.
...@@ -62,9 +62,9 @@ public class TreeWaterDemand ...@@ -62,9 +62,9 @@ public class TreeWaterDemand
double advection = 1.6; double advection = 1.6;
double tr = 0.9; double tr = 0.9;
LocalDateTime startOfYear = LocalDateTime.of(2005, 1, 1, 0, 0); LocalDateTime startOfYear = LocalDateTime.of(2005, 1, 1, 1, 0);
LocalDateTime start = LocalDateTime.of(2005, 1, 1, 0, 0); LocalDateTime start = LocalDateTime.of(2005, 1, 1, 1, 0);
LocalDateTime end = LocalDateTime.of(2006, 1, 1, 0, 0); LocalDateTime end = LocalDateTime.of(2006, 1, 1, 0, 0);
// LocalDateTime start = LocalDateTime.of(2005, 4, 1, 0, 0); // LocalDateTime start = LocalDateTime.of(2005, 4, 1, 0, 0);
...@@ -83,7 +83,7 @@ public class TreeWaterDemand ...@@ -83,7 +83,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("DateTime;Temperature;Humidity;GHI;WindSpeed;SaturationVaporPressure;ActualVaporPressure;ET0;ET0u\n"); bw.write("DateTime;Temperature;Humidity;GHI;WindSpeed;SaturationVaporPressure;ActualVaporPressure;ET0;ET0u\n");
bw.write("dd/mm/yyyy HH:MM;[°C];[%];[W/m²];[m/s];[?];[?];[l/h];[l/h]\n"); bw.write("dd/mm/yyyy HH:MM;[°C];[%];[W/m²];[m/s];[?];[?];[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);
double temp = Double.parseDouble(row[tempIndex]); double temp = Double.parseDouble(row[tempIndex]);
......
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