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
8d4b11a3
Commit
8d4b11a3
authored
Dec 13, 2019
by
Poulet Camille
Browse files
Try_Export_Abundance
parent
c26977cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
data/input/fishTryRealBV_CC.xml
View file @
8d4b11a3
...
...
@@ -199,7 +199,7 @@
<yearOfTheUpdate>
0
</yearOfTheUpdate>
<basinsToUpdateFile>
data/input/reality/basinsToUpdate.csv
</basinsToUpdateFile>
<outputPath>
data/output/
</outputPath>
<minYearToWrite>
1
84
0
</minYearToWrite>
<minYearToWrite>
1
90
0
</minYearToWrite>
<fileNameFluxes>
nutrientFluxes
</fileNameFluxes>
<lengthAtHatching>
2.0
</lengthAtHatching>
<linfVonBertForFemale>
70.0
</linfVonBertForFemale>
...
...
@@ -280,7 +280,7 @@
<exportSeason>
SPRING
</exportSeason>
<fileNameOutput>
effectiveBiomassFluxesBeforeReproduction
</fileNameOutput>
</species.WriteEffectiveAndBiomassFluxes>
<species.ReproduceAndSurviveAfterReproductionWithDiagnose>
<synchronisationMode>
ASYNCHRONOUS
</synchronisationMode>
<reproductionSeason>
SPRING
</reproductionSeason>
...
...
src/main/java/species/DiadromousFishGroup.java
View file @
8d4b11a3
...
...
@@ -466,7 +466,7 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe
fileNameFluxes
+
this
.
getSimulationId
()
+
".csv"
)));
bWForFluxes
.
write
(
"timestep"
+
sep
+
"year"
+
sep
+
"season"
+
sep
+
"basin"
+
sep
+
"abundance"
+
sep
+
"fluxType"
+
sep
+
"origin"
+
sep
+
"biomass"
);
+
sep
+
"abundance"
+
sep
+
"fluxType"
+
sep
+
"origin"
+
sep
+
"abundanceExp"
+
sep
+
"biomass"
);
for
(
String
nutrient
:
nutrientRoutine
.
getNutrientsOfInterest
())
{
bWForFluxes
.
write
(
sep
+
nutrient
);
}
...
...
src/main/java/species/MigrateToSea.java
View file @
8d4b11a3
...
...
@@ -40,6 +40,7 @@ public class MigrateToSea extends AquaNismsGroupProcess<DiadromousFish, Diadromo
//On cr�er la Map pour stocker les flux d'export
Map
<
String
,
Double
>
totalOutputFluxes
=
new
Hashtable
<
String
,
Double
>();
List
<
Duo
<
DiadromousFish
,
Basin
>>
fishesToMove
=
new
ArrayList
<
Duo
<
DiadromousFish
,
Basin
>>();
for
(
RiverBasin
basin
:
group
.
getEnvironment
().
getRiverBasins
())
{
...
...
@@ -52,12 +53,14 @@ public class MigrateToSea extends AquaNismsGroupProcess<DiadromousFish, Diadromo
totalOutputFluxes
.
put
(
nutrient
,
0
.);
}
totalOutputFluxes
.
put
(
"biomass"
,
0
.);
//cr�ation de la biomasse
totalOutputFluxes
.
put
(
"abundanceExp"
,
0
.);
if
(
fishes
!=
null
)
{
for
(
DiadromousFish
fish
:
fishes
)
{
destination
=
group
.
getEnvironment
().
getAssociatedSeaBasin
(
fish
.
getPosition
());
fishesToMove
.
add
(
new
Duo
<
DiadromousFish
,
Basin
>(
fish
,
destination
));
//Mentionne la sortie d'un poisson de la boucle
double
abundanceExp
=
fish
.
getAmount
();
double
biomass
=
group
.
getNutrientRoutine
().
getWeight
(
fish
)
*
fish
.
getAmount
();
if
(
fish
.
getStage
()==
Stage
.
IMMATURE
)
{
...
...
@@ -69,6 +72,7 @@ public class MigrateToSea extends AquaNismsGroupProcess<DiadromousFish, Diadromo
}
totalOutputFluxes
.
put
(
"biomass"
,
totalOutputFluxes
.
get
(
"biomass"
)
+
biomass
);
totalOutputFluxes
.
put
(
"abundanceExp"
,
totalOutputFluxes
.
get
(
"abundanceExp"
)+
abundanceExp
);
}
}
}
...
...
@@ -88,7 +92,7 @@ public class MigrateToSea extends AquaNismsGroupProcess<DiadromousFish, Diadromo
bW
.
write
(
group
.
getPilot
().
getCurrentTime
()
+
"; "
+
Time
.
getYear
(
group
.
getPilot
())
+
";"
+
Time
.
getSeason
(
group
.
getPilot
())
+
";"
+
basin
.
getName
()
+
";"
+
basin
.
getJuvenileNumber
()
+
";EXPORT; NONE"
);
bW
.
write
(
";"
+
totalOutputFluxes
.
get
(
"biomass"
));
bW
.
write
(
";"
+
totalOutputFluxes
.
get
(
"abundanceExp"
)
+
";"
+
totalOutputFluxes
.
get
(
"biomass"
));
for
(
String
nutrient
:
group
.
getNutrientRoutine
().
getNutrientsOfInterest
())
{
bW
.
write
(
";"
+
totalOutputFluxes
.
get
(
nutrient
));
}
...
...
@@ -101,4 +105,5 @@ public class MigrateToSea extends AquaNismsGroupProcess<DiadromousFish, Diadromo
}
}
}
}
\ No newline at end of file
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