act.qc.CleanDataset.clean_cf_qc#

CleanDataset.clean_cf_qc(variables=None, sep='__', **kwargs)[source]#

Method to convert the CF standard for QC attributes to match internal format expected in the Dataset. CF does not allow string attribute arrays, even though netCDF4 does allow string attribute arrays. The quality control variables uses and expects lists for flag_meaning, flag_assessments.

Parameters:
  • variables (str or list of str or None) – Data variable names to convert. If set to None will check all variables.

  • sep (str or None) – Separater to use for splitting individual test meanings. Since the CF attribute in the netCDF file must be a string and is separated by a space character, individual test meanings are connected with a character. Default for ACT writing to file is double underscore to preserve underscores in variable or attribute names.

  • kwargs (dict) – Additional keyword argumnts not used. This is to allow calling multiple methods from one method without causing unexpected keyword errors.

Examples

ds = act.io.arm.read_arm_netcdf(files)
ds.clean.clean_cf_qc(variables='temp_mean')
ds = act.io.arm.read_arm_netcdf(files, cleanup_qc=True)