diff --git a/data/input/fishTryRealBV_CC.xml b/data/input/fishTryRealBV_CC.xml index d0a9a1a6bcaeb1730f94f96d66573c485346b430..3cbb97ae8ddaacea54d3db8e380b55a25aff5fb8 100644 --- a/data/input/fishTryRealBV_CC.xml +++ b/data/input/fishTryRealBV_CC.xml @@ -307,13 +307,13 @@ <maxNumberOfSuperIndividualPerReproduction>50.0 </maxNumberOfSuperIndividualPerReproduction> <withDiagnose>false</withDiagnose> - <displayFluxesOnConsole>false</displayFluxesOnConsole> + <displayFluxesOnConsole>true</displayFluxesOnConsole> </species.ReproduceAndSurviveAfterReproductionWithDiagnose> <species.MigrateToSea> <seaMigrationSeason>SUMMER</seaMigrationSeason> <synchronisationMode>ASYNCHRONOUS</synchronisationMode> - <displayFluxesOnConsole>false</displayFluxesOnConsole> + <displayFluxesOnConsole>true</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> diff --git a/data/input/fishTryRealBV_PL.xml b/data/input/fishTryRealBV_PL.xml index 34f20e8d6b441296185b1d284227611b6982d5a5..4f3b80d4a556edc2cff3150c8bc1ecefa293092a 100644 --- a/data/input/fishTryRealBV_PL.xml +++ b/data/input/fishTryRealBV_PL.xml @@ -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>mortality</fileNameMortality> <fileNameMortalityCrash>mortalityCrash</fileNameMortalityCrash> <fileNameStockTrap>stockTrap</fileNameStockTrap> <fileNamePopulationStatus>populationStatus</fileNamePopulationStatus> diff --git a/src/main/java/species/DiadromousFishGroup.java b/src/main/java/species/DiadromousFishGroup.java index 4ad4c7b26cb5694452a1f0d587c714732a016eff..6cb3acfad0d24d85a70448e63849bbcef830144b 100644 --- a/src/main/java/species/DiadromousFishGroup.java +++ b/src/main/java/species/DiadromousFishGroup.java @@ -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); } diff --git a/src/main/java/species/MigrateToSea.java b/src/main/java/species/MigrateToSea.java index e5887e23e4d81eef860b9370f8e10de482cf99fd..65720a77827eef4d0c0fbbb6dce658fa92a5b2ec 100644 --- a/src/main/java/species/MigrateToSea.java +++ b/src/main/java/species/MigrateToSea.java @@ -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() + ";IMPORT; NONE"); + +";"+ basin.getName() + ";" + basin.getJuvenileNumber() + ";EXPORT; NONE"); bW.write(";" + totalOutputFluxes.get("biomass")); for (String nutrient : group.getNutrientRoutine().getNutrientsOfInterest()) { bW.write(";" + totalOutputFluxes.get(nutrient)); diff --git a/src/main/java/species/NutrientRoutine.java b/src/main/java/species/NutrientRoutine.java index f3f26a36fe1717fc09b5dda2c33dc8b0863ac308..d026eb91a28a5b26e508addb04ebc25974d2ff87 100644 --- a/src/main/java/species/NutrientRoutine.java +++ b/src/main/java/species/NutrientRoutine.java @@ -356,8 +356,8 @@ public class NutrientRoutine { Map <String, Double> anExcretionRate = new Hashtable <String, Double>(); - anExcretionRate.put("N", 24.71E-6); //values from Barber et al, Alosa sapidissima in ug/g wet mass/hour : convertit en g - anExcretionRate.put("P", 2.17E-6); //values from Barber et al, Alosa sapidissima in ug/g wet mass/hour: convertit en g + anExcretionRate.put("N", 24.71E-6); //values from Barber et al, Alewifes in ug/g wet mass/hour : convertit en g + anExcretionRate.put("P", 2.17E-6); //values from Barber et al, Alewifes 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()); // diff --git a/src/main/java/species/ReproduceAndSurviveAfterReproductionWithDiagnose.java b/src/main/java/species/ReproduceAndSurviveAfterReproductionWithDiagnose.java index 5bebd92294b095d9bc34f8c377e9cbd53065ae50..3d54e84fe305847ebcdcc4ea97fe8656ff2d37d6 100644 --- a/src/main/java/species/ReproduceAndSurviveAfterReproductionWithDiagnose.java +++ b/src/main/java/species/ReproduceAndSurviveAfterReproductionWithDiagnose.java @@ -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 // --------------------------------------------------------------------------------------------------