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
f39df346
Commit
f39df346
authored
Apr 23, 2020
by
Poulet Camille
Browse files
Error GR3D String reading
parent
fe8449ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
data/input/northeastamerica/BNneaBasins.xml
View file @
f39df346
...
...
@@ -10,7 +10,7 @@
<riverBasinShpFile>
data/input/northeastamerica/shape/riverbasins.shp
</riverBasinShpFile>
<continentShpFile>
data/input/northeastamerica/shape/nea_continent.shp
</continentShpFile>
<riverBasinNameLabel>
NAME
</riverBasinNameLabel>
<seaBasinNameLabel>
name
</seaBasinNameLabel>
<seaBasinNameLabel>
NAME
</seaBasinNameLabel>
<continentPathName>
PATH
</continentPathName>
<distanceGridFileName>
data/input/northeastamerica/distanceGridNEA.csv
</distanceGridFileName>
<temperatureCatchmentFile>
data/input/northeastamerica/basins_temperatures_from_1800.csv
</temperatureCatchmentFile>
...
...
data/input/northeastamerica/distanceGridNEA.csv
View file @
f39df346
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/main/java/environment/BasinNetworkSWithContinent.java
View file @
f39df346
...
...
@@ -396,16 +396,19 @@ public class BasinNetworkSWithContinent extends BasinNetwork {
char
[]
charac
=
{
'"'
};
String
doublequote
=
new
String
(
charac
);
scanner
.
nextLine
();
// skip the first line with headers
while
(
scanner
.
hasNext
())
{
scanner
.
next
();
// skip gid
name
=
scanner
.
next
();
while
(
scanner
.
hasNextLine
())
{
String
[]
fields
=
scanner
.
nextLine
().
split
(
","
);
// skip gid
name
=
fields
[
1
];
name
=
name
.
replaceAll
(
new
String
(
doublequote
),
""
);
year
=
(
l
ong
)
scanner
.
nextInt
(
);
year
=
L
ong
.
valueOf
(
fields
[
2
]
);
Double
[]
seasonalTemperature
=
new
Double
[
4
];
seasonalTemperature
[
0
]
=
scanner
.
nextDouble
(
);
seasonalTemperature
[
1
]
=
scanner
.
nextDouble
(
);
seasonalTemperature
[
2
]
=
scanner
.
nextDouble
(
);
seasonalTemperature
[
3
]
=
scanner
.
nextDouble
(
);
seasonalTemperature
[
0
]
=
Double
.
valueOf
(
fields
[
3
]
);
seasonalTemperature
[
1
]
=
Double
.
valueOf
(
fields
[
4
]
);
seasonalTemperature
[
2
]
=
Double
.
valueOf
(
fields
[
5
]
);
seasonalTemperature
[
3
]
=
Double
.
valueOf
(
fields
[
6
]
);
// scanner.nextLine();
// store seasonal temperatures for each basin for the
...
...
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