Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
SimAquaLife
GR3D
Commits
b24c9b11
Commit
b24c9b11
authored
Aug 08, 2020
by
patrick.lambert
Browse files
woth connections between catchment
parent
3f26cc59
Changes
2
Hide whitespace changes
Inline
Side-by-side
data/input/northeastamerica/RIOBNneaBasins.xml
View file @
b24c9b11
...
...
@@ -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>
src/main/java/environment/RIOBasinNetworkWithContinent.java
View file @
b24c9b11
...
...
@@ -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
(
distanceGrid
FileName
);
reader
=
new
FileReader
(
basinConnection
FileName
);
// Parsing the file
scanner
=
new
Scanner
(
reader
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment