Approaches for setting horizontal diffusion
I see the configuration setting for horizontal diffusivity
o.set_config('drift:horizontal_diffusivity', horizontal_diffusivity) # m2/s
and the note
New config setting drift:horizontal_diffusivity, providing time-step independent diffusion, in contrast to drift:current_uncertainty and drift:wind_uncertainty
from https://github.com/OpenDrift/opendrift/blob/34fd858db1d7adbdffe0142ac898cca2fcf54051/history.rst#L290 so I have been planning to use the non-timestep-dependent diffusion figuring that was better. Plus it has the advantage of being able to come up with a semi-physically-based estimate for the horizontal diffusivity of the velocity not being captured in a model times the horizontal grid resolution.
However, now I am getting set up to do some oil simulations and I see it is hard-wired to have:
self._set_config_default('drift:current_uncertainty', 0.05)
self._set_config_default('drift:wind_uncertainty', 0.5)
in OpenOil initialization.
My questions are:
- Is there a reason to use those instead of
horizontal_diffusion(or perhaps they were just set up before the newer capability was available)? - Is there any general guidance you might have for when to use
horizontal_diffusionvscurrent_uncertaintyandwind_uncertainty? - Depending on what you say in the other questions, is it possible to override those defaults if desired?
Thank you.
Yes, current_uncertainty and wind_uncertainty is the legacy from early on (adding random perturbations to winds and currents with given standard deviations). It was first implemented because I thought it had a natural interpretation. In OpenOil the hardwired values remain, but they should be replaced with horizontal_diffusivity, to avoid the time step dependency.
However, the values used are anyway a bit hand-waving (the default uncertainties are randomly chosen and can be modified), so therefore it may not be strictly wrong to use the uncertainties (standard deviation perturbations). Also, one can also interpret the uncertainties differently ("ocean/atmospheric model error and bias") than diffusivity ("unresolved"), and it might make sense to use both mechanisms. Also, there is a plan to implement higher order diffusivity as a Markov chain, where particles have some "memory".
There was a interesting similar discussion in this thread: https://github.com/OpenDrift/opendrift/issues/1159
Maybe the contributors there (@nordam, @Boorhin, @ChrisBarker-NOAA and @oyvindbreivik), or @gauteh, @johannesro or @erikvansebille might have something interesting to add to the above comments?