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 mixing in specific range #1113

Open CaroMedel opened 1 year ago

CaroMedel commented 1 year ago

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

AndresSepulveda commented 1 year ago

Hi Caro,

Do you mean vertical migration? In response to daylight, for example?

CaroMedel commented 1 year ago

Hi Andrés,

No, I want the particles move with the vertical mixing, only inside the mixed layer, which is defined as 20 m. When I activate the vertical mixing, the particles move even below 80 m.

AndresSepulveda commented 1 year ago

You could add to the IBM something like

depth = min(maxDepth, current_depth)

to force the particle to stay in the maxDepth that you specify. But unless the particle has some sort of vertical migration capability (buoyancy adjustment?) it might not be very physical.

knutfrode commented 1 year ago

Hi,

Please see this example:

https://opendrift.github.io/gallery/example_mixed_layer_depth.html#sphx-glr-gallery-example-mixed-layer-depth-py

Here vertical diffusivity is parameterized from wind. If you instead obtain it from ocean model, it will generally not be nonzero below a specific depth, and thus mixing can continue to seafloor, although normally less mixing below ~20m.

On Wed, May 10, 2023, 19:58 Carolina Medel @.***> wrote:

Hi Andrés,

No, I want the particles move with the vertical mixing, only inside the mixed layer, which is defined as 20 m. When I activate the vertical mixing, the particles move even below 80 m.

— Reply to this email directly, view it on GitHub https://github.com/OpenDrift/opendrift/issues/1113#issuecomment-1542598013, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABH25I5U6JTXCORVF3W6JFLXFPJOBANCNFSM6AAAAAAX4YQSUI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

CaroMedel commented 1 year ago

thanks to both of you

CaroMedel commented 1 year ago

Hi Trond,

I checked the example you mentioned, but it still doesn't work. The particles go below 20 meters.

z

I need the particles to always stay above 20 meters. I'm using the following:

terminal_velocity = 0 'ocean_vertical_diffusivity': {'fallback': 0.001, 'profiles': True}, 'ocean_mixed_layer_thickness': {'fallback': 20}

o.set_config('drift:vertical_mixing', True) o.set_config('vertical_mixing:diffusivitymodel', 'windspeed_Large1994') o.set_config('vertical_mixing:background_diffusivity', 0)

I've used the other diffusivity models too, is there any other way to do what i want?

Thanks

knutfrode commented 1 year ago

Could you share a minimalistic example that reproduces this problem?