OpenDrift / opendrift

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

Possibility of refloating only some stranded drifters? #1192

Open kthyng opened 10 months ago

kthyng commented 10 months ago

Hi! From what I can tell, you can have drifters either strand on the coastline and then stay there, or strand and then move when the relevant physics are amenable to moving. Is there a concept in OpenDrift of partial refloating such that not all drifters would move when the currents are amenable? A reference for this is the GNOME technical doc: https://response.restoration.noaa.gov/sites/default/files/GNOME_Tech_Doc.pdf pg 15 under "Refloating":

Half-life is a parameter which empirically describes the adhesiveness of the oil to the shoreline. It is a function of substrate porosity, the presence or absence of vegetation, the inherent stickiness of the oil, and other physical properties and processes of the environment as well. These different parameters have been lumped together in a single parameter, “half-life.” This is the number of hours in which half of the oil on a given shoreline is expected to be removed if (1) there is an offshore wind or diffusive transport and (2) sea level is at the same level, or higher, than the level of the oil when it was beached. This parameter, along with the other environmental data, allows refloating of oil after it has impacted a given shoreline. The refloat half-life is one hour by default; if the value is higher the oil will stick to the shoreline longer (as for a marsh), while for very small values the oil refloats immediately (as for riprap). In theory the half-life could be set to different values along different segments of the shoreline depending on the beach type, but we have not found it necessary to have this degree of refinement in the refloat value

and there is an equation given.

If not currently available, I would be curious how difficult this might be for me to add. Thank you!

knutfrode commented 10 months ago

Hi, Yes, currently the stranding in OpenDrift is simply binary, either immediate stranding/deactivation, or "wait at shore" until there is offshore drift component ("previous"). Something more sophisticated has been on the TODO-list for a long time, but not yet implemented.

Here is the method that handles interaction with coastline: https://github.com/OpenDrift/opendrift/blob/master/opendrift/models/basemodel/__init__.py#L647

I think it should be fairly straightforward to implement another concept, e.g. using "half-life": 1) A new item/name (e.g. "half-life") has to be added to the config options: https://github.com/OpenDrift/opendrift/blob/master/opendrift/models/basemodel/__init__.py#L310 2) If some new particle properties are needed (e.g. "coastline_half_life"), these should be added as a new "element property/variable": https://github.com/OpenDrift/opendrift/blob/master/opendrift/elements/elements.py#L51 If this should be the same for all elements, it could also be a config setting. 3) The actual algorithm should be added to the interact_with_coastline method.

The main challenge would be to ensure that this does not interfere with existing modules and readers. You are welcome to give it a go, and I can help later if it would be relevant to incorporate it as a permanent feature - but then some thorough (unit)testing is needed to avoid inducing undesired side-effects for other users.

kthyng commented 10 months ago

@knutfrode Ok thank you, I'll probably be in touch about this over time!