OpenDrift / opendrift

Open source framework for ocean trajectory modelling
https://opendrift.github.io
GNU General Public License v2.0
249 stars 120 forks source link

Tides in opendrift #372

Closed John-Luick closed 3 years ago

John-Luick commented 4 years ago

I am looking into different ways of incorporating tides into opendrift particle trajectories. Can you advise as to my options? I can think of two: a)use a global model with tides (if there is such a thing), or b)compute tides separately, either through a local tidal model, or from a global tidal model, and then linearly superposing them on the non-tidal global model current field, then writing it to a netcdf file. This would probably require a new reader for opendrift. "b)" could be a bit messy, especially for the forecast period, as it would have to be done on the fly.

knutfrode commented 4 years ago

Yes, a) would be the simplest, whenever possible.

But if you locally superpose non-tidal and tidal currents and write to a file, you can still use the regular readers (typically reader_netCDF_CF_generic), as long as the format is compliant with the reader. Current is automatically detected from standard_name (x_sea_water_velocity/y_sea_water_velocity, or east_*/north_*), but those names (and OpenDrift) do not consider which components are included in the currents.

It would be convenient to be able to add (or subtract/multiply/divide) variables from different readers dynamically in OpenDrift, e.g. with an "algebraic compositional reader". With this, you would not need to superpose beforehand and write to file, but could do this dynamically. I believe this could be fairly easy to make for variables on identical grid, but a bit more complicated for the general case.

gauteh commented 3 years ago

Closing, re-open if needed.