QCFilter.add_test(var_name, index=None, test_number=None, test_meaning=None, test_assessment='Bad', flag_value=False, recycle=False)[source]

Method to add a new test/filter to a quality control variable.

  • var_name (str) – data variable name

  • index (int, bool, list of int or bool, numpy array, tuple of numpy arrays, None) – Indexes into quality control array to set the test bit. If not set or set to None will not set the test on any element of the quality control variable but will still add the test to the flag_masks, flag_meanings and flag_assessments attributes.

  • test_number (int) – Test number to use. If keyword is not set will use first available test bit/test number.

  • test_meaning (str) – String describing the test. Will be added to flag_meanings variable attribute.

  • test_assessment (str) – String describing the test assessment. If not set will use “Bad” as the string to append to flag_assessments. Will update to be capitalized.

  • flag_value (boolean) – Switch to use flag_values integer quality control.

  • recyle (boolean) – Option to use number less than next highest test if available. For example tests 1, 2, 4, 5 are set. Set to true the next test chosen will be 3, else will be 6.


test_dict (dict) – A dictionary containing information added to the QC variable.


result = ds.qcfilter.add_test(var_name, test_meaning='Birds!')