Oceananigans.jl icon indicating copy to clipboard operation
Oceananigans.jl copied to clipboard

`Field` Stokes shear and tendency with `UniformStokesDrift`

Open glwagner opened this issue 3 years ago • 10 comments

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:

  1. Stationary Stokes shear profiles can be precomputed.
  2. 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

glwagner avatar Mar 08 '22 02:03 glwagner

Thanks @navidcy for the help with this one!

glwagner avatar Mar 08 '22 22:03 glwagner

What happened here? All tests were OK and one day disaster happened...

navidcy avatar Mar 15 '22 05:03 navidcy

Damn, I thought we were about to merge too

glwagner avatar Mar 16 '22 01:03 glwagner

Damn, I thought we were about to merge too

It stops at CATKEVerticalDiffusivity...

navidcy avatar Mar 16 '22 05:03 navidcy

🤞

glwagner avatar Apr 20 '22 04:04 glwagner

I'm really confused with this one...

navidcy avatar Apr 20 '22 10:04 navidcy

me too

glwagner avatar Apr 20 '22 18:04 glwagner

Should we close this PR? If no, could someone resolve the conflicts/

navidcy avatar Jul 01 '23 10:07 navidcy

I can resolve because it should be easy.

glwagner avatar Jul 05 '23 16:07 glwagner

@glwagner should we try again for this PR?

navidcy avatar Jan 12 '24 06:01 navidcy