DataSet.vertical_integration(thickness=None, depth_range=None, fixed=None)

vertical_integration: Calculate the vertically integrated sum over the water column.

This calculates the sum of the variable multiplied by the cell thickness

  • thickness (str or Dataset) – This must be supplied when vertical levels vary spatially. One of: a variable, in the dataset, which contains the variable thicknesses; a .nc file which contains the thicknesses; or a Dataset that contains the thicknesses. Note: the .nc file or DataSet must only contain one variable.

  • depth_range (list) – Set a depth range if desired. Should be of the form [min_depth, max_depth].

  • fixed (bool) – Define whether the vertical levels are the same in all spatial locations. Set to True if they are, e.g. you have z-levels. If you have the likes of sigma-coordinates, set this to True.


If you wanted to integrate values across all vertical levels of every variable in a dataset that has spatially fixed vertical levels, you would do this:

>>> ds.vertical_integration(fixed = True)