Home >> Forums >> About release schedule

About release schedule

I want to simulate continuous releases each 5 days over a year (50k particles relased the first week of january, 50k the 2nd week, 50k the third week...) and I want Ichthyop to perform the simulation until 31st December.
By doing so, the first release event will be tracked over a year, the second release event will be tracked over a year minus 10 days, the 2nd release event will be tracked over a year minus 20 days and so on... And the last release event will be tracked over just 5 days.
This can be done by fine tuning a single .xml for each release event (73 different .xml configuration files), and that's not really a problem. It can be done relatively simply.
However, I want to do that using a single configuration file, with the help of the release schedule module. And that's where the problems start:
I can easiy set the .txt file containing the initial location of each particle, and set the correct schedule. But I want the simulation to end nicely after a total year of simulation, and the only way I found to control the simulation time is to set a tracking time per release event (in "Main/Time/Transport duration", which I set to be 365 days 0 hours and 0 minutes).
Is there a way to do what I want? Can I set a total simulation time? If not, can I set a tracking time per release event?
Thank you in advance!

Ichthyop version: 
Ichthyop 3.1
Hydrodynamic dataset: 
Java version: 
Java SE 8
Operating system: 

Well... I coded a new option that allows me to limit the total time of the simulation. Let's wait 4 days until the simulation is complete and the output NetCDF file can be examined.

The following applies for Ichthyop v3.1, but I guess it should be trivial to adapt to newer versions:
On TimeManager.java look for initializePerformed() method and replace with this:

public void initializePerformed(InitializeEvent e) throws Exception {

simuDuration = transportDuration + getSimulationManager().getReleaseManager().getReleaseDuration();
try {
simuDuration = transportDuration;
catch(Exception exception) {/* Do nothing */}

i_step = 0;
time = t0;
nb_steps = (int) Math.abs(simuDuration / dt);
getLogger().info("Time manager initialization [OK]");
And in the configuration .xml file, in the app.time block, something like this can be added:

<long_name>Transport duration represents total simulation time</long_name>
<description>If set to "true", the simulation will end after Beginning of simulation + Transport duration. If set to "false", the simulation will end after the last release event + Transport duration. If unsure, left to "false".</description>

Hope this will be useful to someone with the same use case as me.

Hi Ignacio

Sorry for the very late response. I will try to look at this on monday, and will come back to you.