<p>The main difference between online and offline trajectory calculation is that the online is implemented as part of the model, and the trajectories are part of the model output. Offline trajectory calculation is a separate piece of software that takes Eulerian model output fields as input and calculates the trajectories.</p>

<p>The main advantage of online particle tracking is that the displacement of a particle or tracer can be evaluated every time step, no matter how small it is. As a result, you can obtain a true particle trajectory based on what model produces. The disadvantage of the online tracking is that the user needs to know the particle release location and time ahead of running the model. The models listed below (at least) support online Lagrangian trajectory calculation:</p>

<ul>
<li><p><a href="http://hycom.org">HYbrid Coordinate Ocean Model (HYCOM)</a> is a hydrostatic, hybrid-coordinate ocean circulation model that has particle calculation built-in;</p></li>
<li><p><a href="http://mitgcm.org/">MIT General Circulation Model (MITgcm)</a> is a non-hydrostatic circulation model with many physical parameterization options and a single dynamical kernel for both the atmosphere and ocean;</p></li>
<li><p><a href="http://www.myroms.org">Regional Ocean Modeling System (ROMS)</a> is a hydrostatic, sigma-coordinate (terrain-following) ocean model with many physical parameterization options a large user community.</p></li>
</ul>

<p>On the other side, offline particle tracking can only use the Eulerian fields as often as they are output. Thus, there will be an error in the calculated trajectory depending on the frequency of the output. On the other side, the main advantage of offline calculation is that the user can experiment and play around with deployment locations, times, area of coverage etc., because trajectory calculation typically takes much less computational effort than the actual model. There are several options here:</p>

<ul>
<li><p><a href="https://code.google.com/p/connectivity-modeling-system/">Connectivity Modeling System (CMS)</a> takes gridded NetCDF files as input and produces Lagrangian trajectory output. Can handle fields from various Arakawa-staggered grids, and may produce probabilistic trajectories, diffusivity specified by user (optional). Compatible with at least HYCOM and ROMS output.</p></li>
<li><p><a href="http://stockage.univ-brest.fr/~grima/Ariane/">Ariane</a> also takes gridded NetCDF files and is compativle with at least HYCOM, ROMS and NEMO models.</p></li>
<li><p><a href="http://tracmass.org/">TRACMASS</a> seems to be compatible with many circulation models. It also has a <a href="https://github.com/kthyng/tracpy">Python interface</a>.</p></li>
</ul>

<p>All models and tools listed in this answer are freely available for download under different open source licenses.</p>

CC BY-SA 3.0
2014-05-05T07:54:38.157Z
Pretty sure that MIKE21 / MIKE3 allows for online tracking, although it may not call it that.
Semidiurnal Simon
CC BY-SA 3.0
2014-05-07T15:50:30.077Z
I did not know about CMS. Pretty cool. Thanks
arkaia
CC BY-SA 3.0
2014-05-04T20:21:29.777Z
2014-05-05T17:49:03.437Z
2014-05-05T17:49:03.437Z
milancurcic
<p>We are in the final stages of a new book on numerical particle tracking for the coastal ocean. Originally as part of that book and now separate from it, we have developed an evolving list of routines for particle tracking. It can be access at <a href="http://www.nefsc.noaa.gov/drifter/particles.html">http://www.nefsc.noaa.gov/drifter/particles.html</a>.</p>

<p>I don't mean to detract from the answer by @IRO-bot. I just wanted to complement his results.</p>

<p>Edits and extensions can be emailed to James Manning @NOAA</p>

<blockquote>
  <p>We provide a list of algorithms that is not meant to be complete. We separate the algorithms into two categories: 1) code run offline using available model results and 2) web-based particle tracking that does not require any execution by the user (point and click). Many of the web-based routines are now being shared and applied in multiple regions of the globe.</p>
  
  <p>Example Offline Particle Tracking Packages</p>
  
  <ul>
  <li>LTRANS: The Larval TRANSport Lagrangian model is an offline
  particle-tracking model that uses stored predictions of a 3D
  hydrodynamic model, specifically the Regional Ocean Modeling System
  (ROMS). Although LTRANS was built to simulate larvae, it has been
  adapted to simulate passive particles and other planktonic organisms.
  LTRANS is written in Fortran 90 and is designed to track the
  trajectories of particles in three dimensions using a 4th order
  Runge-Kutta scheme for advection and random displacement to account
  for vertical turbulence. Contact E. North (U. Maryland),
  enorth@umces.edu, <a href="http://northweb.hpl.umces.edu/LTRANS.htm">http://northweb.hpl.umces.edu/LTRANS.htm</a></li>
  <li>Ariane: Ariane is an offline computational tool (Fortran 90/95) to calculate 3D streamlines from the output velocity field of
  a finite difference circulation model such as OPA-NEMO, ROMS, or
  Symphonie. Contact B. Blanke from IFREMER),
  Bruno.Blanke@univ-brest.fr,
  <a href="http://stockage.univ-brest.fr/~grima/Ariane/">http://stockage.univ-brest.fr/~grima/Ariane/</a></li>
  <li>LarvalMap: Is a web service build on a python library that provides a common data model and methods for particle tracking. It
  was originally developed as a 3D web-based larval fish and
  invertebrate transport model connected to ROMS circulation fields for
  the northeast Pacific. It can be used with any Data Access Protocol
  (DAP) accessible circulation dataset formatted using the network
  Common Data Format for Climate and Forecast (NetCDF CF). Contact:
  DevOps@asascience.com.
  <a href="https://github.com/asascience-open/paegan-transport">https://github.com/asascience-open/paegan-transport</a></li>
  <li>PartTrack: PartTracker is a particle tracking research tool currently being developed in MatlabTM which is designed to be used
  with both unstructured and structured model grids and has previously
  been applied to outputs from SELFE (Semi -implicit
  Eulerian-Lagrangian Finite- Element model) for the purposes of
  assessing wastewater and larval dispersal. PartTracker applies the
  time adaptive composite 4th-5th order Runge-Kutta (RK45) numerical
  scheme to ensure required minimum standards of accuracy are achieved
  for individual particle paths. The application of the RK45 approach
  ensures consistency in particle path accuracy across hydrodynamically
  complex domains and a range of user defined time steps with the time
  adaptive aspect of the approach reducing computational overheads in
  hydrodynamically simple flows by allowing for long time steps. Knight
  BR, Zyngfogel R, Forrest B 2009. PartTracker â€“ a fate analysis tool
  for marine particles. In Proceedings of Australasian Coasts and Ports
  Conference 2009. Dawe I, ed. New Zealand Coastal Society, Wellington.
  pp 8. Contact Ben Knight (Carthron Institute, New Zealand.</li>
  <li>WebDrogue: Beta-release Java graphical user interface used to obtain drift predictions from user-specified points in the model
  domain and can be installed under MS-Windows and Linux. The drift
  trajectories are computed using circulation derived from the tides,
  the seasonal mean circulation, wind-driven circulation, and a
  surface-wind drift (Hannah, et al.2004) Contact: Jason Chaffey at
  ChaffeyJ@mar.dfo-mpo.gc.ca
  <a href="http://www.bio.gc.ca/science/research-recherche/ocean/webdrogue/index-eng.php">http://www.bio.gc.ca/science/research-recherche/ocean/webdrogue/index-eng.php</a></li>
  <li>Two-Way PTM: In order to determine the source of particle arriving at one location, particle tracks can be run backwards to
  determine a probable source, then forward to determine the robustness
  of the results given a prescribed randomness. This is described in
  Isobe, et al, 2009, for example, where it is applied to the East
  China Sea. Contact aisobe@sci.ehime-u.ac.jp</li>
  <li>ICTHYOP: Developed to study how physical factors (e.g., currents, water temperature) and biological factors (e.g., egg
  buoyancy, larva growth) affect the dynamics of fish eggs and larvae.
  It gathers physicians and biologists together around a common tool,
  easily available and user-friendly. Contact: info@previmer.org
  <a href="http://www.ichthyop.org">http://www.ichthyop.org</a></li>
  <li>OILTRANS: "an off-line particle-transport model coupled to the most up to date operational met-ocean model forecasts.
  Formulations for the dominant oil fate processes of spreading,
  advection, diffusion, evaporation, emulsi- fication and dispersion
  have been encoded, providing the model with the ability to accurately
  predict the horizontal movement of surface oil slick, the vertical
  entrainment of oil into the water column and the mass balance of
  spilled oil." Contact: alan.berry@marine.ies See Berry, A., T.
  Dabrowski, and K. Lyons. 2012. The oil spill model OILTRANS and its
  application to the Celtic Sea. Marine Pollution Bulletin. 64 pp.
  2489-2501. Some documentation reported here.</li>
  <li><p>Sediment Transport: A community models for coastal sediment transport are under development. Some notes on this project are
  provided here where there is a list of existing models. Contact
  csherwood@usgs.gov. </p>
  
  <p>Example Web-Based Particle Tracking Routines</p></li>
  <li>SCCOOS tracks the Monteray Bay flows off California (<a href="http://ourocean.jpl.nasa.gov/SCB/scbmangen.jsp">http://ourocean.jpl.nasa.gov/SCB/scbmangen.jsp</a>)</li>
  <li>NCSTATE: tracks flow in large Northwest Atlantic ROMS/HYCOM grid Contact: Ruoying He
  <a href="http://omgsrv1.meas.ncsu.edu:8080/ocean-circulation-useast2/trajectory.jsp">http://omgsrv1.meas.ncsu.edu:8080/ocean-circulation-useast2/trajectory.jsp</a>)</li>
  <li>ALAVAI: Visualization tool for a surface ocean drift forecast. Environmental Modelling and Software. Otero et al., 2013.
  Contact: Pablo Otero (<a href="https://github.com/PabloOtero/Alavai">https://github.com/PabloOtero/Alavai</a>)</li>
  <li>Connie Tool: An â€œonline tool for marine scientists and managers to investigate patterns of marine spatial connectivity. It
  has been applied in areas such as larval dispersion and recruitment
  studies, and the development of scenarios and risk assessments for
  contaminant dispersion.â€ Contact: connie@csiro.au
  (<a href="http://www.csiro.au/connie2/">http://www.csiro.au/connie2/</a>)</li>
  </ul>
</blockquote>

CC BY-SA 3.0
2014-05-07T15:35:09.287Z
Thanks, that is quite a comprehensive list. It would be good if you can expand your answer with the list of tools my answer did not mention.
milancurcic
CC BY-SA 3.0
2014-05-07T15:48:47.873Z
@IRO-bot: Let me know if this works. I know you have already mentioned Ariane in your answer, but I decided to keep the list from the website.
arkaia
CC BY-SA 3.0
2014-05-07T16:10:03.897Z
Yes, looks great.
milancurcic
CC BY-SA 3.0
2014-05-07T15:29:11.093Z
2014-05-07T15:47:10.663Z
2014-05-07T15:47:10.663Z
arkaia
<p>I am looking for a few options of particle tracking for ocean modeling to try to do a comparison of different codes.</p>

CC BY-SA 3.0
2014-05-06T17:43:54.697Z
Are you interested in coming up with your own code or are you just talking about current available tools?
Isopycnal Oscillation
CC BY-SA 3.0
2014-05-06T17:51:46.297Z
I have several codes myself (both online and offline) that I want to be able to compare with other codes.
arkaia
CC BY-SA 3.0
2014-05-06T19:39:22.953Z
Same here. I never used any external package or online tracking in models, but I implemented my own tracking because it was relatively quick and simple compared to learning to use a new tool. My guess is that the difference between tools will be mostly in how time integration and spatial interpolation is handled.
milancurcic
<ocean><oceanography><models><modelling>
What are some options for online and offline particle tracking in ocean models?
arkaia
# What are some options for online and offline particle tracking in ocean models?

(Asked by: username_0 on 2014-05-04)

I am looking for a few options of particle tracking for ocean modeling to try to do a comparison of different codes.

**Tags:** ocean, oceanography, models, modelling

> **Comments:**
> **username_1**: Are you interested in coming up with your own code or are you just talking about current available tools?  
> **username_0**: I have several codes myself (both online and offline) that I want to be able to compare with other codes.  
> **username_2**: Same here. I never used any external package or online tracking in models, but I implemented my own tracking because it was relatively quick and simple compared to learning to use a new tool. My guess is that the difference between tools will be mostly in how time integration and spatial interpolation is handled.  

---

## 2 answers

### Answer by username_2 on 2014-05-04. Score: 12

The main difference between online and offline trajectory calculation is that the online is implemented as part of the model, and the trajectories are part of the model output. Offline trajectory calculation is a separate piece of software that takes Eulerian model output fields as input and calculates the trajectories.

The main advantage of online particle tracking is that the displacement of a particle or tracer can be evaluated every time step, no matter how small it is. As a result, you can obtain a true particle trajectory based on what model produces. The disadvantage of the online tracking is that the user needs to know the particle release location and time ahead of running the model. The models listed below (at least) support online Lagrangian trajectory calculation:

* [HYbrid Coordinate Ocean Model (HYCOM)](http://hycom.org) is a hydrostatic, hybrid-coordinate ocean circulation model that has particle calculation built-in;
* [MIT General Circulation Model (MITgcm)](http://mitgcm.org/) is a non-hydrostatic circulation model with many physical parameterization options and a single dynamical kernel for both the atmosphere and ocean;
* [Regional Ocean Modeling System (ROMS)](http://www.myroms.org) is a hydrostatic, sigma-coordinate (terrain-following) ocean model with many physical parameterization options a large user community.

On the other side, offline particle tracking can only use the Eulerian fields as often as they are output. Thus, there will be an error in the calculated trajectory depending on the frequency of the output. On the other side, the main advantage of offline calculation is that the user can experiment and play around with deployment locations, times, area of coverage etc., because trajectory calculation typically takes much less computational effort than the actual model. There are several options here:

* [Connectivity Modeling System (CMS)](https://code.google.com/p/connectivity-modeling-system/) takes gridded NetCDF files as input and produces Lagrangian trajectory output. Can handle fields from various Arakawa-staggered grids, and may produce probabilistic trajectories, diffusivity specified by user (optional). Compatible with at least HYCOM and ROMS output.
* [Ariane](http://stockage.univ-brest.fr/~grima/Ariane/) also takes gridded NetCDF files and is compativle with at least HYCOM, ROMS and NEMO models.
* [TRACMASS](http://tracmass.org/) seems to be compatible with many circulation models. It also has a [Python interface](https://github.com/kthyng/tracpy).

All models and tools listed in this answer are freely available for download under different open source licenses.

> **Comments:**
> **username_3**: Pretty sure that MIKE21 / MIKE3 allows for online tracking, although it may not call it that.  
> **username_0**: I did not know about CMS. Pretty cool. Thanks  

---

### Answer by username_0 on 2014-05-07. Score: 6

We are in the final stages of a new book on numerical particle tracking for the coastal ocean. Originally as part of that book and now separate from it, we have developed an evolving list of routines for particle tracking. It can be access at <http://www.nefsc.noaa.gov/drifter/particles.html>.

I don't mean to detract from the answer by @IRO-bot. I just wanted to complement his results.

Edits and extensions can be emailed to James Manning @NOAA

> We provide a list of algorithms that is not meant to be complete. We separate the algorithms into two categories: 1) code run offline using available model results and 2) web-based particle tracking that does not require any execution by the user (point and click). Many of the web-based routines are now being shared and applied in multiple regions of the globe.
>
> Example Offline Particle Tracking Packages
>
> * LTRANS: The Larval TRANSport Lagrangian model is an offline
>   particle-tracking model that uses stored predictions of a 3D
>   hydrodynamic model, specifically the Regional Ocean Modeling System
>   (ROMS). Although LTRANS was built to simulate larvae, it has been
>   adapted to simulate passive particles and other planktonic organisms.
>   LTRANS is written in Fortran 90 and is designed to track the
>   trajectories of particles in three dimensions using a 4th order
>   Runge-Kutta scheme for advection and random displacement to account
>   for vertical turbulence. Contact E. North (U. Maryland),
>   enorth@umces.edu, <http://northweb.hpl.umces.edu/LTRANS.htm>
> * Ariane: Ariane is an offline computational tool (Fortran 90/95) to calculate 3D streamlines from the output velocity field of
>   a finite difference circulation model such as OPA-NEMO, ROMS, or
>   Symphonie. Contact B. Blanke from IFREMER),
>   Bruno.Blanke@univ-brest.fr,
>   <http://stockage.univ-brest.fr/~grima/Ariane/>
> * LarvalMap: Is a web service build on a python library that provides a common data model and methods for particle tracking. It
>   was originally developed as a 3D web-based larval fish and
>   invertebrate transport model connected to ROMS circulation fields for
>   the northeast Pacific. It can be used with any Data Access Protocol
>   (DAP) accessible circulation dataset formatted using the network
>   Common Data Format for Climate and Forecast (NetCDF CF). Contact:
>   DevOps@asascience.com.
>   <https://github.com/asascience-open/paegan-transport>
> * PartTrack: PartTracker is a particle tracking research tool currently being developed in MatlabTM which is designed to be used
>   with both unstructured and structured model grids and has previously
>   been applied to outputs from SELFE (Semi -implicit
>   Eulerian-Lagrangian Finite- Element model) for the purposes of
>   assessing wastewater and larval dispersal. PartTracker applies the
>   time adaptive composite 4th-5th order Runge-Kutta (RK45) numerical
>   scheme to ensure required minimum standards of accuracy are achieved
>   for individual particle paths. The application of the RK45 approach
>   ensures consistency in particle path accuracy across hydrodynamically
>   complex domains and a range of user defined time steps with the time
>   adaptive aspect of the approach reducing computational overheads in
>   hydrodynamically simple flows by allowing for long time steps. Knight
>   BR, Zyngfogel R, Forrest B 2009. PartTracker â€“ a fate analysis tool
>   for marine particles. In Proceedings of Australasian Coasts and Ports
>   Conference 2009. Dawe I, ed. New Zealand Coastal Society, Wellington.
>   pp 8. Contact Ben Knight (Carthron Institute, New Zealand.
> * WebDrogue: Beta-release Java graphical user interface used to obtain drift predictions from user-specified points in the model
>   domain and can be installed under MS-Windows and Linux. The drift
>   trajectories are computed using circulation derived from the tides,
>   the seasonal mean circulation, wind-driven circulation, and a
>   surface-wind drift (Hannah, et al.2004) Contact: Jason Chaffey at
>   ChaffeyJ@mar.dfo-mpo.gc.ca
>   <http://www.bio.gc.ca/science/research-recherche/ocean/webdrogue/index-eng.php>
> * Two-Way PTM: In order to determine the source of particle arriving at one location, particle tracks can be run backwards to
>   determine a probable source, then forward to determine the robustness
>   of the results given a prescribed randomness. This is described in
>   Isobe, et al, 2009, for example, where it is applied to the East
>   China Sea. Contact aisobe@sci.ehime-u.ac.jp
> * ICTHYOP: Developed to study how physical factors (e.g., currents, water temperature) and biological factors (e.g., egg
>   buoyancy, larva growth) affect the dynamics of fish eggs and larvae.
>   It gathers physicians and biologists together around a common tool,
>   easily available and user-friendly. Contact: info@previmer.org
>   <http://www.ichthyop.org>
> * OILTRANS: "an off-line particle-transport model coupled to the most up to date operational met-ocean model forecasts.
>   Formulations for the dominant oil fate processes of spreading,
>   advection, diffusion, evaporation, emulsi- fication and dispersion
>   have been encoded, providing the model with the ability to accurately
>   predict the horizontal movement of surface oil slick, the vertical
>   entrainment of oil into the water column and the mass balance of
>   spilled oil." Contact: alan.berry@marine.ies See Berry, A., T.
>   Dabrowski, and K. Lyons. 2012. The oil spill model OILTRANS and its
>   application to the Celtic Sea. Marine Pollution Bulletin. 64 pp.
>   2489-2501. Some documentation reported here.
> * Sediment Transport: A community models for coastal sediment transport are under development. Some notes on this project are
>   provided here where there is a list of existing models. Contact
>   csherwood@usgs.gov.
>
>   Example Web-Based Particle Tracking Routines
> * SCCOOS tracks the Monteray Bay flows off California (<http://ourocean.jpl.nasa.gov/SCB/scbmangen.jsp>)
> * NCSTATE: tracks flow in large Northwest Atlantic ROMS/HYCOM grid Contact: Ruoying He
>   <http://omgsrv1.meas.ncsu.edu:8080/ocean-circulation-useast2/trajectory.jsp>)
> * ALAVAI: Visualization tool for a surface ocean drift forecast. Environmental Modelling and Software. Otero et al., 2013.
>   Contact: Pablo Otero (<https://github.com/PabloOtero/Alavai>)
> * Connie Tool: An â€œonline tool for marine scientists and managers to investigate patterns of marine spatial connectivity. It
>   has been applied in areas such as larval dispersion and recruitment
>   studies, and the development of scenarios and risk assessments for
>   contaminant dispersion.â€ Contact: connie@csiro.au
>   (<http://www.csiro.au/connie2/>)

> **Comments:**
> **username_2**: Thanks, that is quite a comprehensive list. It would be good if you can expand your answer with the list of tools my answer did not mention.  
> **username_0**: @IRO-bot: Let me know if this works. I know you have already mentioned Ariane in your answer, but I decided to keep the list from the website.  
> **username_2**: Yes, looks great.  

---

