nctoolkit.DataSet.vertical_integration

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

Calculate the vertically integrated sum over the water column This calculates the sum of the variable multiplied by the cell thickness

Parameters
  • thickness (str or Dataset) – 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].

Examples

If you wanted to sum of values across all vertical levels of every variable in a dataset, you would do this:

>>> ds.vertical_sum()