OpenDrift / opendrift

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

vertical advection and mixing #1111

Closed CaroMedel closed 1 year ago

CaroMedel commented 1 year ago

Hi,

When using the Opendrift or Larval Fish modules, the particles go to the surface quickly and most stay there. To change this add the line o.set_config('drift:vertical_mixing', True) as this example shows: [https://opendrift.github.io/gallery/example_vertical_mixing.html]. That improves the vertical mixing and the particles oscillate on the surface. But, when I add vertical advection I don't have any change in the results. So I wonder how advection and mixing work in more detail and what parameters or variables they call when they are activated, in the case of mixing I understand that diffusivity is called, but in advection I don't know what it calls or needs. I would also like to know the relevance of the update_terminal_velocity variable, I removed that function from the module that I create and I only use vertical migration for the species that I am modeling. In the Larvalfish module, I see that the update_terminal_velocity variable has an important role, when i change the values of W, the particles show different vertical distribution.

I'm trying to understand how vertical dispersion works in Opendrift, given the possible configurations it offers.

Best, Caro

knutfrode commented 1 year ago

Hi, Vertical movement consists of:

These 3 components are independent, but since the two latter (buoyancy and mixing) are happening on a timescale finer than typical for horizontal advection (~15 minutes), they are combined in a sub-loop with finer timestep, typically 1 minute. This method is common in OceanDrift for all subclasses (including e.g. LarvalFish), but can in principle also be overloaded by each sub model, like any OpenDrift method.

CaroMedel commented 1 year ago

Thank you very much, your answer was very clear

CaroMedel commented 1 year ago

Continuing with this same issue, I'm using vertical mixing, but I only want the particles to oscillate within a specific range. How can I define that range?

Best, Caro

knutfrode commented 1 year ago

Hi, there is no specific functionality for exactly this. But it should happen if you have positive vertical diffusivity in your depth range of interest, and zero diffusivity above/below, although you would probably get some artefacts at boundaries. You would then also need to disable or adjust vertical advection, buoyancy and possibly swimming.