Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Approaches for setting horizontal diffusion #1206

Open
kthyng opened this issue Dec 18, 2023 · 1 comment
Open

Approaches for setting horizontal diffusion #1206

kthyng opened this issue Dec 18, 2023 · 1 comment

Comments

@kthyng
Copy link
Contributor

kthyng commented Dec 18, 2023

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

* New config setting ``drift:horizontal_diffusivity``, providing time-step independent diffusion, in contrast to ``drift:current_uncertainty`` and ``drift:wind_uncertainty``
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:

  1. Is there a reason to use those instead of horizontal_diffusion (or perhaps they were just set up before the newer capability was available)?
  2. Is there any general guidance you might have for when to use horizontal_diffusion vs current_uncertainty and wind_uncertainty?
  3. Depending on what you say in the other questions, is it possible to override those defaults if desired?

Thank you.

@knutfrode
Copy link
Collaborator

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: #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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants