mixsea.shearstrain.strain_polynomial_fits

mixsea.shearstrain.strain_polynomial_fits(depth, t, SP, lon, lat, depth_bin, window_size)[source]

Calculate strain with a smooth \(N^2\) profile from polynomial fits to windowed data.

This version outputs polyfit and strain for the whole window as opposed to just half the window centered.

Parameters:
  • depth (array-like) – CTD depth [m]

  • t (array-like) – CTD in-situ temperature [ITS-90, degrees C]

  • SP (array-like) – CTD practical salinity [psu]

  • lon (array-like or float) – Longitude

  • lat (array-like or float) – Latitude

  • depth_bin (float) – Window centers

  • window_size (float) – Window size

Returns:

List with results in a dict for each depth segment. The dict has the following entries:

  • "segz": Segment depth vector (array-like).

  • "depth_bin": Segment center depth (float).

  • "N2": Segment buoyancy frequency squared (array-like).

  • "N2smooth": Segment polynomial fit to buoyancy frequency squared (array-like).

  • "N2mean": Segment mean buoyancy frequency squared (float).

  • "strain": Segment strain (array-like).

Return type:

list