polaris.tasks.ocean.mixed_layer_eddies.diagnostics.compute_fk11_stream_function

polaris.tasks.ocean.mixed_layer_eddies.diagnostics.compute_fk11_stream_function(config, ds_mesh, ds, edges, mld, n2_top, mle_section, model, ml_index=None)[source]

Evaluate the stream function of the Fox-Kemper et al. (2011) parameterization on edges from model output, as the models discretize it. Given each model’s mixed-layer depth and buoyancy frequency, the mixed-layer means of the buoyancy gradient and the buoyancy frequency are thickness-weighted means over layer interfaces, from the surface to the top of the first layer whose midpoint is below the mixed-layer depth.

Parameters:
  • config (polaris.config.PolarisConfigParser) – Config options

  • ds_mesh (xarray.Dataset) – The horizontal mesh

  • ds (xarray.Dataset) – Model output at one time

  • edges (numpy.ndarray) – Zero-based indices of the edges to evaluate the stream function on

  • mld (xarray.DataArray) – The model’s mixed-layer depth (m) on cells

  • n2_top (xarray.DataArray) – The model’s buoyancy frequency squared (s-2) at the top of each layer on cells, with dimension nVertLevels or nVertLevelsP1

  • mle_section (str) – The config section with the parameterization’s settings

  • model ({'omega', 'mpas-ocean'}) – The model, which sets four details: Omega measures the mixed-layer depth from the sea surface and MPAS-Ocean from z = 0; the mixed-layer depth on edges is the minimum of the two cells’ in Omega and the mean in MPAS-Ocean; Omega takes the gradient of specific volume and MPAS-Ocean that of density; and MPAS-Ocean uses the gradient at the second interface for the top half-layer

  • ml_index (numpy.ndarray, optional) – The model’s zero-based index on cells of the first layer whose midpoint is below the mixed-layer depth. By default, it is found from mld, which is ambiguous where the model clamps the mixed-layer depth to a layer midpoint and the output layer depths come from a different stage of a time step

Returns:

psi (numpy.ndarray) – The stream function (m3 s-1 per m along the edge’s normal direction, i.e. m2 s-1) at layer interfaces, with shape (len(edges), nVertLevels + 1)