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
e403278f
Commit
e403278f
authored
Aug 02, 2019
by
Poulet Camille
Browse files
Add coloumnn abundance in csv file
parent
55e4f229
Changes
6
Hide whitespace changes
Inline
Side-by-side
data/input/fishTryRealBV_CC.xml
View file @
e403278f
...
...
@@ -307,13 +307,13 @@
<maxNumberOfSuperIndividualPerReproduction>
50.0
</maxNumberOfSuperIndividualPerReproduction>
<withDiagnose>
false
</withDiagnose>
<displayFluxesOnConsole>
fals
e
</displayFluxesOnConsole>
<displayFluxesOnConsole>
tru
e
</displayFluxesOnConsole>
</species.ReproduceAndSurviveAfterReproductionWithDiagnose>
<species.MigrateToSea>
<seaMigrationSeason>
SUMMER
</seaMigrationSeason>
<synchronisationMode>
ASYNCHRONOUS
</synchronisationMode>
<displayFluxesOnConsole>
fals
e
</displayFluxesOnConsole>
<displayFluxesOnConsole>
tru
e
</displayFluxesOnConsole>
</species.MigrateToSea>
<environment.updateTemperatureInRealBasin>
...
...
@@ -331,7 +331,7 @@
<long>
2000
</long>
<long>
2100
</long>
</years>
<fileNameOutput>
fluxes
</fileNameOutput>
<fileNameOutput>
JeuParam100_2100RCP85_A_essai
</fileNameOutput>
</species.IdentifyPopulation>
<species.TypeTrajectoryCV>
<synchronisationMode>
ASYNCHRONOUS
</synchronisationMode>
...
...
data/input/fishTryRealBV_PL.xml
View file @
e403278f
...
...
@@ -127,7 +127,7 @@
<long>
2100
</long>
</years>
<fluxesSeason>
SPRING
</fluxesSeason>
<fileNameOutput>
fluxes
</fileNameOutput>
<fileNameOutput>
JeuParam100_20100RCP85_A_essai
</fileNameOutput>
</species.IdentifyPopulation>
<species.ExportRecruitment>
...
...
@@ -144,7 +144,7 @@
<species.ExportPopulationStatus>
<synchronisationMode>
ASYNCHRONOUS
</synchronisationMode>
<fileNameMortality>
mortalty
</fileNameMortality>
<fileNameMortality>
mortal
i
ty
</fileNameMortality>
<fileNameMortalityCrash>
mortalityCrash
</fileNameMortalityCrash>
<fileNameStockTrap>
stockTrap
</fileNameStockTrap>
<fileNamePopulationStatus>
populationStatus
</fileNamePopulationStatus>
...
...
src/main/java/species/DiadromousFishGroup.java
View file @
e403278f
...
...
@@ -409,10 +409,10 @@ public class DiadromousFishGroup extends AquaNismsGroup< DiadromousFish, BasinNe
new
File
(
this
.
outputPath
+
fileNameFluxes
).
getParentFile
().
mkdirs
();
try
{
bWForFluxes
=
new
BufferedWriter
(
new
FileWriter
(
new
File
(
this
.
outputPath
+
fileNameFluxes
+
this
.
getSimulationId
()+
".csv"
)));
fileNameFluxes
+
this
.
getSimulationId
()
+
".csv"
)));
bWForFluxes
.
write
(
"timestep"
+
sep
+
"year"
+
sep
+
"season"
+
sep
+
"basin"
+
sep
+
"fluxType"
+
sep
+
"origine"
+
sep
+
"biomass"
);
+
sep
+
"abundance"
+
sep
+
"fluxType"
+
sep
+
"origine"
+
sep
+
"biomass"
);
for
(
String
nutrient
:
nutrientRoutine
.
getNutrientsOfInterest
())
{
bWForFluxes
.
write
(
sep
+
nutrient
);
}
...
...
src/main/java/species/MigrateToSea.java
View file @
e403278f
...
...
@@ -84,7 +84,7 @@ public class MigrateToSea extends AquaNismsGroupProcess<DiadromousFish, Diadromo
try
{
bW
.
write
(
group
.
getPilot
().
getCurrentTime
()
+
"; "
+
Time
.
getYear
(
group
.
getPilot
())
+
";"
+
Time
.
getSeason
(
group
.
getPilot
())
+
";"
+
basin
.
getName
()
+
";
IM
PORT; NONE"
);
+
";"
+
basin
.
getName
()
+
";"
+
basin
.
getJuvenileNumber
()
+
";
EX
PORT; NONE"
);
bW
.
write
(
";"
+
totalOutputFluxes
.
get
(
"biomass"
));
for
(
String
nutrient
:
group
.
getNutrientRoutine
().
getNutrientsOfInterest
())
{
bW
.
write
(
";"
+
totalOutputFluxes
.
get
(
nutrient
));
...
...
src/main/java/species/NutrientRoutine.java
View file @
e403278f
...
...
@@ -356,8 +356,8 @@ public class NutrientRoutine {
Map
<
String
,
Double
>
anExcretionRate
=
new
Hashtable
<
String
,
Double
>();
anExcretionRate
.
put
(
"N"
,
24.71
E
-
6
);
//values from Barber et al, Al
osa sapidissima
in ug/g wet mass/hour : convertit en g
anExcretionRate
.
put
(
"P"
,
2.17
E
-
6
);
//values from Barber et al, Al
osa sapidissima
in ug/g wet mass/hour: convertit en g
anExcretionRate
.
put
(
"N"
,
24.71
E
-
6
);
//values from Barber et al, Al
ewifes
in ug/g wet mass/hour : convertit en g
anExcretionRate
.
put
(
"P"
,
2.17
E
-
6
);
//values from Barber et al, Al
ewifes
in ug/g wet mass/hour: convertit en g
System
.
out
.
println
(
"anExcretionRate: "
+
anExcretionRate
.
toString
());
//
...
...
@@ -431,13 +431,13 @@ public class NutrientRoutine {
// carcass composition for fish before spawning
Map
<
Gender
,
Map
<
String
,
Double
>>
aCompoCarcassPreSpawning
=
new
Hashtable
<
DiadromousFish
.
Gender
,
Map
<
String
,
Double
>>();
Map
<
String
,
Double
>
aCompo
=
new
Hashtable
<
String
,
Double
>();
aCompo
.
put
(
"N"
,
2.958
/
100
.);
//On remplit une collection avec un put.
aCompo
.
put
(
"P"
,
0.673
/
100
.);
aCompo
.
put
(
"N"
,
2.958
/
100
.);
//On remplit une collection avec un put.
Values from Haskell (2018) Alosa sapidissima (%)
aCompo
.
put
(
"P"
,
0.673
/
100
.);
//Values from Haskell (2018) Alosa sapidissima (%)
aCompoCarcassPreSpawning
.
put
(
Gender
.
FEMALE
,
aCompo
);
aCompo
=
new
Hashtable
<
String
,
Double
>();
aCompo
.
put
(
"N"
,
2.941
/
100
.);
aCompo
.
put
(
"P"
,
0.666
/
100
.);
aCompo
.
put
(
"N"
,
2.941
/
100
.);
//Values from Haskell (2018) Alosa sapidissima (%)
aCompo
.
put
(
"P"
,
0.666
/
100
.);
// Values from Haskell (2018) Alosa sapidissima (%)
aCompoCarcassPreSpawning
.
put
(
Gender
.
MALE
,
aCompo
);
System
.
out
.
println
(
"aCompoCarcassPreSpawning: "
+
aCompoCarcassPreSpawning
.
toString
());
//
...
...
src/main/java/species/ReproduceAndSurviveAfterReproductionWithDiagnose.java
View file @
e403278f
...
...
@@ -169,6 +169,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
// age of autochnonous spawnser
Map
<
Integer
,
Long
>
ageOfNativeSpawners
=
new
TreeMap
<
Integer
,
Long
>();
// compute the number of spawners and keep the origines of the spawners
for
(
DiadromousFish
fish
:
fishInBasin
){
...
...
@@ -310,7 +311,7 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
}
}
}
System
.
out
.
println
(
"\t"
+
message
);
//
System.out.println("\t"+message);
}
// --------------------------------------------------------------------------------------------------
...
...
@@ -401,18 +402,17 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
}
deadFish
.
clear
();
if
(
displayFluxesOnConsole
)
System
.
out
.
println
(
group
.
getPilot
().
getCurrentTime
()
+
"; "
+
Time
.
getYear
(
group
.
getPilot
())
+
";"
+
Time
.
getSeason
(
group
.
getPilot
())
+
";IMPORT;"
+
riverBasin
.
getName
()
+
"; "
+
totalInputFluxes
);
+
riverBasin
.
getName
()
+
";"
+
riverBasin
.
getSpawnerNumber
()
+
"; "
+
totalInputFluxes
);
BufferedWriter
bW
=
group
.
getbWForFluxes
();
if
(
bW
!=
null
)
{
try
{
for
(
fluxOrigin
origin
:
totalInputFluxes
.
keySet
())
{
bW
.
write
(
group
.
getPilot
().
getCurrentTime
()
+
"; "
+
Time
.
getYear
(
group
.
getPilot
())
+
";"
+
Time
.
getSeason
(
group
.
getPilot
())
+
";"
+
riverBasin
.
getName
()
+
";IMPORT;"
+
origin
);
+
";"
+
riverBasin
.
getName
()
+
";"
+
riverBasin
.
getSpawnerNumber
()
+
";"
+
";IMPORT;"
+
origin
);
bW
.
write
(
";"
+
totalInputFluxes
.
get
(
origin
).
get
(
"biomass"
));
for
(
String
nutrient
:
group
.
getNutrientRoutine
().
getNutrientsOfInterest
())
{
bW
.
write
(
";"
+
totalInputFluxes
.
get
(
origin
).
get
(
nutrient
));
}
...
...
@@ -429,11 +429,13 @@ public class ReproduceAndSurviveAfterReproductionWithDiagnose extends AquaNismsG
}
//
System.out.println("("+numberOfGenitors+")");
//System.out.println("("+numberOfGenitors+")");
//System.out.println(" BEFORE " +riverBasin.getSpawnerOrigins().keySet());
riverBasin
.
getSpawnerOrigins
().
push
(
spawnerOriginsDuringReproduction
);
//System.out.println(" AFTER " +riverBasin.getSpawnerOrigins().keySet());
}
// --------------------------------------------------------------------------------------------------
// update the observers
// --------------------------------------------------------------------------------------------------
...
...
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