Commit b24c9b11 authored by patrick.lambert's avatar patrick.lambert
Browse files

woth connections between catchment

parent 3f26cc59
......@@ -18,11 +18,12 @@
<offshoreBasinNameLabel>BASIN_NAME</offshoreBasinNameLabel>
<distanceGridFileName>data/input/northeastamerica/distanceGridNEA.csv</distanceGridFileName>
<basinConnectionFileName>data/input/northeastamerica/inshore_offshore_connections.csv</basinConnectionFileName>
<temperatureOffshoreFile>data/input/northeastamerica/observed_offshore_temperatures.csv</temperatureOffshoreFile>
<temperatureInshoreFile>data/input/northeastamerica/observed_inshore_temperatures.csv</temperatureInshoreFile>
<temperatureRiverFile>data/input/northeastamerica/observed_river_temperatures.csv</temperatureRiverFile>
<useRealPDam>false</useRealPDam>
</environment.RIOBasinNetworkWithContinent>
......@@ -43,6 +43,7 @@ public class RIOBasinNetworkWithContinent extends RIOBasinNetwork {
private String offshoreBasinNameLabel = "BASIN_NAME";
private String distanceGridFileName = "data/input/northeastamerica/distanceGridNEA.csv";
private String basinConnectionFileName = "data/input/northeastamerica/inshore_offshore_connections.csv";
private String temperatureOffshoreFile = "data/input/northeastamerica/observed_offshore_temperatures.csv";
private String temperatureInshoreFile = "data/input/northeastamerica/observed_inshore_temperatures.csv";
......@@ -373,12 +374,15 @@ public class RIOBasinNetworkWithContinent extends RIOBasinNetwork {
OffshoreBasin offshorebasin = new OffshoreBasin(basin_id, name, OffshoreBasinFunction.valueOf(function));
if (mapOffshoreBasin != null) {
if (mapOffshoreBasin.containsKey(name)) {
System.out.println(name);
if (mapOffshoreBasin.containsKey(name.strip())) {
// offshorebasin.getShape().append(mapInshoreBasin.get(name), true);
offshorebasin.setShape(mapOffshoreBasin.get(name));
offshorebasin.setShape(mapOffshoreBasin.get(name.strip()));
} else {
System.out.println(name + "does not exist in " + offshoreBasinShpFile);
for (String nameMap : mapOffshoreBasin.keySet()) {
System.out.println(name.strip() + ":" + nameMap + "=" + name.strip().equals(nameMap));
}
System.exit(1);
}
}
......@@ -436,7 +440,7 @@ public class RIOBasinNetworkWithContinent extends RIOBasinNetwork {
try {
// open the file
reader = new FileReader(distanceGridFileName);
reader = new FileReader(basinConnectionFileName);
// Parsing the file
scanner = new Scanner(reader);
......
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