CliMA / LESbrary.jl

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

Diagnostics for the turbulent kinetic energy budget #26

Closed glwagner closed 4 years ago

glwagner commented 4 years ago

This PR adds diagnostics for calculating the turbulent kinetic energy budget. The main interface is

LESBrary.TurbulenceStatistics.turbulent_kinetic_energy_budget(model)

which returns a dictionary of horizontally-AveragedFields that calculate the turbulent kinetic energy, buoyancy flux, shear production, dissipation, advective flux, and pressure flux. Currently the functions for calculating flux divergences do not compile on the GPU but this can be done in post-process.

An illustration of how to use these diagnostics is given in examples/langmuir_turbulence.jl which is an adapted and expanded version of Oceananiganas' example.

cc @qingli411 @adelinehillier