Commit 01b7001f authored by patrick.lambert's avatar patrick.lambert
Browse files

with verbose for correspondance between fields

parent 6d33d845
......@@ -25,5 +25,7 @@
<temperatureInshoreFile>data/input/northeastamerica/observed_inshore_temperatures.csv</temperatureInshoreFile>
<temperatureRiverFile>data/input/northeastamerica/observed_river_temperatures.csv</temperatureRiverFile>
<verboseCorrespondance>false</verboseCorrespondance>
<useRealPDam>false</useRealPDam>
</environment.RIOBasinNetworkWithContinent>
\ No newline at end of file
......@@ -50,6 +50,8 @@ public class RIOBasinNetworkWithContinent extends RIOBasinNetwork {
private String temperatureInshoreFile = "data/input/northeastamerica/observed_inshore_temperatures.csv";
private String temperatureRiverFile = "data/input/northeastamerica/observed_river_temperatures.csv";
private Boolean verboseCorrespondance = false;
private boolean useRealPDam = false;
private transient Map<Long, Map<String, Double[]>> temperatureSeries;
......@@ -220,6 +222,10 @@ public class RIOBasinNetworkWithContinent extends RIOBasinNetwork {
super.initTransientParameters(pilot);
// default value
if (verboseCorrespondance == null)
verboseCorrespondance = false;
if (cobservable == null) {
cobservable = pilot.addObservable(this.getClass());
}
......@@ -293,11 +299,12 @@ public class RIOBasinNetworkWithContinent extends RIOBasinNetwork {
String[] headers = scanner.nextLine().split(","); // skip the first line with headers
String[] fields = { "basin_id", "name", "longitude", "latitude", "surface", "order", "pDam" };
System.out.println("\nCorrespondace between fields in " + RiverBasin.class.getSimpleName() + " and file columns in "
+ riverBasinFile);
for (int i = 0; i < headers.length; i++)
System.out.println(" " + fields[i] + " \t<-> " + headers[i]);
if (verboseCorrespondance) {
System.out.println("\nCorrespondace between fields in " + RiverBasin.class.getSimpleName()
+ " and file columns in " + riverBasinFile);
for (int i = 0; i < headers.length; i++)
System.out.println(" " + fields[i] + " \t<-> " + headers[i]);
}
while (scanner.hasNextLine()) {
String[] values = scanner.nextLine().split(",");
basin_id = Integer.valueOf(values[0]); // gid
......@@ -379,11 +386,12 @@ public class RIOBasinNetworkWithContinent extends RIOBasinNetwork {
String[] headers = scanner.nextLine().split(","); // skip the first line with headers
String[] fields = { "basin_id", "name", "function" };
System.out.println("\nCorrespondace between fields in " + OffshoreBasin.class.getSimpleName()
+ " and file columns in " + riverBasinFile);
for (int i = 0; i < headers.length; i++)
System.out.println(" " + fields[i] + " \t<-> " + headers[i]);
if (verboseCorrespondance) {
System.out.println("\nCorrespondace between fields in " + OffshoreBasin.class.getSimpleName()
+ " and file columns in " + riverBasinFile);
for (int i = 0; i < headers.length; i++)
System.out.println(" " + fields[i] + " \t<-> " + headers[i]);
}
while (scanner.hasNextLine()) {
fields = scanner.nextLine().split(",");
......
Markdown is supported
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