lt_toolbox.TrajFrame.compute_property_lof#
- TrajFrame.compute_property_lof(subvol: str, prop_in: str, prop_out: str, bin_breaks: list, alias: str | None = None, direction: str = '+1', group: str | None = None, append: bool = False) Self[source]#
Compute Lagrangian Overturning Function in discrete property-space.
The net volume transport distribution in the chosen property space is accumulated in specified direction.
- Parameters:
subvol (str) – Name of the variable storing water parcel volume transport.
prop_in (str) – Name of the inflow property variable to bin volume transports.
prop_out (str) – Name of the outflow property variable to bin volume transports.
bin_breaks (list) – List of bin edges used in the binning volume transports.
alias (str, default: None) – New name for Lagrangian overturning funtion in property-coordinates.
direction (str, default: '+1') – Direction of integration. Two options are available: to integrate from the smallest to largest bin use ‘+1’ or to integrate from the largest to smallest bin use ‘-1’.
group (str, default: None) – Name of variable to group according to unique values using group_by() method. A Lagrangian overturning function will be computed for each group member.
append (bool, default: False) – If set to True, the Lagrangian overturning function will be appended to the existing summary_data, otherwise summary_data will be replaced with a new DataSet.
- Returns:
TrajFrame is returned with Lagrangian overturning functions included in the summary_data where the mid-points of the specified bins are given as the coordinate dimension.
- Return type:
TrajFrame
Examples
Calculating the Lagrangian overturning function in potential density space for all trajectories grouped by the {start_date} column variable.
See Tooth et al. (2023) for further details on the definition of the Lagrangian overturning function in property-space and its application to quantifying along-stream water mass transformation.
>>> bin_sigma0 = np.arange(25, 28, 0.01).tolist() >>> trajectories.compute_property_lof(subvol='vol', prop_in='sigma0_in', prop_out='sigma0_out', bin_breaks=bin_sigma0, alias='LOF_sigma0', direction='+1', group='start_date')