Oceananigans.jl
Oceananigans.jl copied to clipboard
`Field` Stokes shear and tendency with `UniformStokesDrift`
This PR provides a convenience constructor for building UniformStokesDrift with four Fields for the Stokes shear and tendency, rather than functions. It also adds kernel functions for the field case, so users now have the choice between functions of (z, t), Fields, or nothing.
This is useful when calculating the Stokes profile is a relatively expensive or involved computation (eg, involving integration over a spectrum of waves). This permits two optimizations:
- Stationary Stokes shear profiles can be precomputed.
- Time-dependent Stokes shear profiles and Stokes tendencies can be computed in a
Callback. This saves computation time for 3D runs because the Stokes profiles are 1D.
co-authored with @qingli411
TODO:
- [x] add a test
Thanks @navidcy for the help with this one!
What happened here? All tests were OK and one day disaster happened...
Damn, I thought we were about to merge too
Damn, I thought we were about to merge too
It stops at CATKEVerticalDiffusivity...
🤞
I'm really confused with this one...
me too
Should we close this PR? If no, could someone resolve the conflicts/
I can resolve because it should be easy.
@glwagner should we try again for this PR?