  Vertical mixing parameterizations in ocean models are formulated on the basis
of the physical principles that govern turbulent mixing. However, many
parameterizations include ad hoc components that are not well constrained by
theory or data. One such component is the eddy diffusivity model, where
vertical turbulent fluxes of a quantity are parameterized from a variable eddy
diffusion coefficient and the mean vertical gradient of the quantity. In this
work, we improve a parameterization of vertical mixing in the ocean surface
boundary layer by enhancing its eddy diffusivity model using data-driven
methods, specifically neural networks. The neural networks are designed to take
extrinsic and intrinsic forcing parameters as input to predict the eddy
diffusivity profile and are trained using output data from a second moment
closure turbulent mixing scheme. The modified vertical mixing scheme predicts
the eddy diffusivity profile through online inference of neural networks and
maintains the conservation principles of the standard ocean model equations,
which is particularly important for its targeted use in climate simulations. We
describe the development and stable implementation of neural networks in an
ocean general circulation model and demonstrate that the enhanced scheme
outperforms its predecessor by reducing biases in the mixed-layer depth and
upper ocean stratification. Our results demonstrate the potential for
data-driven physics-aware parameterizations to improve global climate models.
