QCFilter.add_persistence_test(var_name, window=10, test_limit=0.0001, min_periods=1, center=True, test_meaning=None, test_assessment='Bad', test_number=None, flag_value=False, prepend_text=None)

Method to perform a persistence test over 1-D data..

  • var_name (str) – Data variable name.

  • window (int) – Optional number of data samples to use in the calculation of standard deviation to test for consistent data.

  • test_limit (float) – Optional test limit to use where the standard deviation less than will trigger the test.

  • min_periods (int) – Optional number of minimum values to use in the moving window. Setting to 1 so this correctly handles NaNs.

  • center (boolean) – Optional where within the moving window to report the standard deviation values. Used in the .rolling.std() calculation with xarray.

  • test_meaning (str) – The optional text description to add to flag_meanings describing the test. Will add a default if not set.

  • test_assessment (str) – Optional single word describing the assessment of the test. Will set a default if not set.

  • test_number (int) – Optional test number to use. If not set will ues next available test number.

  • flag_value (boolean) – Indicates that the tests are stored as integers not bit packed values in quality control variable.

  • prepend_text (str) – Optional text to prepend to the test meaning. Example is indicate what institution added the test.


test_info (tuple) – A tuple containing test information including var_name, qc variable name, test_number, test_meaning, test_assessment