pelagos_py.steps.processing.interpolate_data#

class pelagos_py.steps.processing.interpolate_data.InterpolateVariables(name, parameters=None, diagnostics=False, context=None)[source]#

Bases: pelagos_py.steps.base_step.BaseStep, pelagos_py.utils.qc_handling.QCHandlingMixin

A processing step for interpolating data.

Fills gaps in each listed variable by linear interpolation in time. Samples flagged with one of the variable’s listed flags, and NaN samples, are gaps; filled samples are flagged 8 (interpolated). Values before the first or after the last real value are not filled. Meant for the coordinates (LATITUDE, LONGITUDE): measured variables are left on their own rows, and DEPTH_ADJUSTED is filled by Derive CTD. See Position and Time Processing.

Parameters:
  • variables (dict) – Variable name -> list of QC flags whose samples are treated as gaps.

  • max_interp_time (float, optional) – Largest gap (minutes between the surrounding real values) that is filled. 0/False/"off" fills gaps of any size. Default 5.0.

Examples

Example config usage:

- name: "Interpolate Data"
  parameters:
    variables:  # per variable, the QC flags treated as gaps to fill
      LATITUDE: [3, 4, 9]
      LONGITUDE: [3, 4, 9]
    max_interp_time: 5.0
  diagnostics: false

Filled samples are flagged 8 (interpolated).