Commit 0dd43ae8 authored by patrick.lambert's avatar patrick.lambert
Browse files

update temperature for RIO basins

parent 736e2e23
...@@ -326,10 +326,9 @@ ...@@ -326,10 +326,9 @@
<migrationSeasonToReachSummeringOffshore>SPRING</migrationSeasonToReachSummeringOffshore> <migrationSeasonToReachSummeringOffshore>SPRING</migrationSeasonToReachSummeringOffshore>
</species.MigrateToOffshore> </species.MigrateToOffshore>
<environment.updateTemperatureInRealBasin> <environment.updateTemperatureInRIOBasin>
<synchronisationMode>ASYNCHRONOUS</synchronisationMode> <synchronisationMode>ASYNCHRONOUS</synchronisationMode>
<offshoreTemperature>12.0</offshoreTemperature> </environment.updateTemperatureInRIOBasin>
</environment.updateTemperatureInRealBasin>
</processesEachStep> </processesEachStep>
<processesAtEnd> <processesAtEnd>
......
package environment;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.xml.DomDriver;
import environment.Time.Season;
import fr.cemagref.simaqualife.kernel.processes.AquaNismsGroupProcess;
import species.DiadromousFish;
import species.DiadromousFishGroup;
public class updateTemperatureInRIOBasin extends AquaNismsGroupProcess<DiadromousFish, DiadromousFishGroup> {
public static void main(String[] args) {
System.out.println((new XStream(new DomDriver())).toXML(new updateTemperatureInRIOBasin()));
}
@Override
public void doProcess(DiadromousFishGroup group) {
Time time = group.getEnvironment().getTime();
if (time.getSeason(group.getPilot()) == Season.WINTER) {
Long year = time.getYear(group.getPilot());
for (Basin basin : group.getEnvironment().getBasins()) {
basin.updateSeasonalTemperatures(year);
}
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment