CliMA / LESbrary.jl

📚Generating Oceananigans large eddy simulation (LES) data for calibrating parameterizations
MIT License
28 stars 10 forks source link

Use horizontal averages to compute Richardson number profile #113

Closed ali-ramadhan closed 3 years ago

ali-ramadhan commented 3 years ago

Resolves #112

glwagner commented 3 years ago

Do we need to launch a 3D kernel for this? I think this is a 1D quantity, eg the ratio between the gradient of the horizontally-averaged buoyancy, and the horizontally averaged shear squared.

The local, 3D Richardson number is also a useful quantity; it's just different from the horizontally-averaged Richardson number that often enters into our parameterizations. Both are useful.

ali-ramadhan commented 3 years ago

Hmmm, I guess it will launch a 3D kernel and repeat the same computation for each column. Is there an easy way to launch a 1D kernel?

If not we could merge this PR since the output will now be closer to what is expected without introducing any slowdowns. We would save some computations by launching a 1D kernel but with 50+ diagnostics already being computed I suspect the effect of this one 3D kernel is not large.

The local, 3D Richardson number is also a useful quantity; it's just different from the horizontally-averaged Richardson number that often enters into our parameterizations. Both are useful.

True that both are useful, but sounds like you don't want to output spatial averages of the local Richardson number? 3D and slice outputs could output the (unaveraged) local Richard number while averages could output the "coarse-grained" Richardson number?

glwagner commented 3 years ago

I think for this to do the right thing we have to keep the background fields as is but set model.velocities and model.tracers to zero somehow?

glwagner commented 3 years ago

Oh nevermind, I see how it works in Oceanostics. This might work.

glwagner commented 3 years ago

It probably would be nice to raise an issue about this if we do merge it so that we don't forget that it's something we still have to fix.

ali-ramadhan commented 3 years ago

I opened a new issue to track this and added a comment to the script.