tomchor / Oceanostics.jl

Diagnostics for Oceananigans
https://tomchor.github.io/Oceanostics.jl/
MIT License
24 stars 8 forks source link

Pseudo dissipation with tuple closures #86

Open tomchor opened 1 year ago

tomchor commented 1 year ago

At the moment we can't get (pseudo)-dissipation when the model has a tuple closure.

I'm not sure if it's possible to get actual dissipation when the diffusivity isn't isotropic, but it should be straightforward to get pseudo-dissipation.

glwagner commented 1 year ago

We also can't get dissipation when the closure doesn't use an eddy diffusivity, right? So it's not possible to calculate diffusivity for any turbulence closure.

tomchor commented 1 year ago

We also can't get dissipation when the closure doesn't use an eddy diffusivity, right? So it's not possible to calculate diffusivity for any turbulence closure.

True. Although we could consider throwing a useful error in those cases?

I think we should at least support the common cases (like (VerticalDiffusivity(), HorizontalDiffusivity())) though, especially because it should be pretty straightforward.

glwagner commented 1 year ago

Agree, it makes sense to try to support any AbstractScalarDiffusivity since it's calculable and there's an interface. We can also support tuples of AbstractScalarDiffusivity I think, via https://github.com/CliMA/Oceananigans.jl/blob/ce5ba71449cf16b8737dca10997a6119dee4c665/src/TurbulenceClosures/abstract_scalar_diffusivity_closure.jl#L61-L62