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
12575da1
Commit
12575da1
authored
Jul 01, 2020
by
Lambert Patrick
Browse files
no buffered Writer created when fileNameFluxes is empty
parent
02b29d96
Changes
2
Hide whitespace changes
Inline
Side-by-side
data/input/atlanticarea/fishTryRealBV_CC.xml
View file @
12575da1
...
...
@@ -198,9 +198,9 @@
<parameterSetLine>
0
</parameterSetLine>
<yearOfTheUpdate>
0
</yearOfTheUpdate>
<basinsToUpdateFile>
data/input/reality/basinsToUpdate.csv
</basinsToUpdateFile>
<outputPath>
data/output/
</outputPath>
<outputPath>
data/output/
atlanticarea/
</outputPath>
<minYearToWrite>
1900
</minYearToWrite>
<fileNameFluxes>
nutrientFluxes
</fileNameFluxes>
<fileNameFluxes></fileNameFluxes>
<lengthAtHatching>
2.0
</lengthAtHatching>
<linfVonBertForFemale>
70.0
</linfVonBertForFemale>
<linfVonBertForMale>
70.0
</linfVonBertForMale>
...
...
@@ -318,7 +318,7 @@
<processesAtEnd>
<species.WriteNutrientImportFluxes>
<synchronisationMode>
ASYNCHRONOUS
</synchronisationMode>
<fileName>
f
luxes
</fileName>
<fileName>
nutrientImportF
luxes
</fileName>
</species.WriteNutrientImportFluxes>
<species.WriteNutrientExportFluxes>
...
...
src/main/java/species/DiadromousFishGroup.java
View file @
12575da1
...
...
@@ -8,7 +8,6 @@ import java.io.FileWriter;
import
java.io.IOException
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.Hashtable
;
import
java.util.List
;
...
...
@@ -465,8 +464,8 @@ public class DiadromousFishGroup extends AquaNismsGroup<DiadromousFish, BasinNet
tempMinRep
=
parameterSets
.
get
(
parameterSetLine
-
1
).
getSecond
();
}
// open an buffer
a
d writer to export fluxes
if
(
fileNameFluxes
!=
null
)
{
// open an buffer
e
d writer to export fluxes
if
(
!
fileNameFluxes
.
isEmpty
()
)
{
sep
=
";"
;
new
File
(
this
.
outputPath
+
fileNameFluxes
).
getParentFile
().
mkdirs
();
try
{
...
...
@@ -502,7 +501,7 @@ public class DiadromousFishGroup extends AquaNismsGroup<DiadromousFish, BasinNet
while
(
scanner
.
hasNextLine
())
{
String
[]
fields
=
scanner
.
nextLine
().
split
(
","
);
System
.
out
.
println
(
Arrays
.
toString
(
fields
));
//
System.out.println(Arrays.toString(fields));
if
(
fields
.
length
>
2
)
{
if
(!
fields
[
2
].
isEmpty
())
obs1900
.
put
(
fields
[
1
],
Integer
.
valueOf
(
fields
[
2
]));
...
...
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