Home >> Forums >> Release from different zones at different times

Release from different zones at different times

Hi everyone,
 
Sorry if this is off topic (not sure if general or technical assistance). I asked this side question (http://www.ichthyop.org/forum/simulating-hycom) about a year ago. I had finally gotten back on this project and decided to give it a whirl again.
 
That said, I still hadn't figured out what I was trying to do, but I thought I'd make another post that's specific to the side question above.
 
I'm trying to release particles from different locations at specific times. For example, I want to release particles from Location A on Sept 25, 2015, let the simulation run for it's duration, and then release particles at Location B on Dec 26th, 2015.
 
At the moment, I've been manually simulating the release of particles at different locations at different times, which is a trial because I have nearly 800 release points. I've gone through about 400, which has taken me a couple of weeks, but I'm wondering if there's a faster way to do it.
 
I suspect it has something to do with the Advanced > Release > Drifters form text file menu and the Advanced > Release > Schedule menu, but I'm not quite sure how to do it. The former seems easy enough, it's just a text file with latitude and longitude, but the release time is at time "Beginning of simulation", which to me sounds like the particles will be released from all the locations at the same time. This isn't exactly what I want, as I want a different release time from each of the release locations.
 
If I have Release > Schedule activated, then it will "repeatedly release a whole bunch of drifters (for each release event)". Correct me if I'm wrong, but that sounds like it will release particles from all my locations at time 1, and then release particles from all my locations again at time 2. If that's the case, it's not what I want, either; I need time 1 to be coupled with location 1, and time 2 to be coupled with location 2, and so on and so forth.
 
If Ichthyop can't do it, should I give it a try in R (I don't know how to use Python and I think to learn Python just to get this done seems to be far too investment for a small output)? If so, any suggested codes/packages I should give a whirl with?
 
Thanks!

Ichthyop version: 
Ichthyop 3.3alpha
Hydrodynamic dataset: 
OSCAR
Java version: 
Java SE 8
Operating system: 
Windows 10

Hi

Yes, you are right. The drifter file provides the locations of the particles to be released. When combined with the release schedule, this set of particle will be released N time (at different times).

A way to do what you want to do is to run Ichthyop from R.

- You create a sample configuration file containing the parameters that are common to all your simulations (input files, transport duration, etc.)

- You create a R script that loops over the (location, time) pairs and modifies the sample configuration file accordingly. You should also modify the output directory to be sure that output files will not be overwritteen. Since Ich. uses XML file, you will need to use the R XML Library (https://cran.r-project.org/web/packages/XML/index.html)

- Then, you can run Ichthyop in command mode from R by using the "system2" command as follows:

system2("java", args="-jar ichthyop_v3.jar edited_configuration_files.xml")

Hope this helps

Nicolas