comet-toolkit / obsarray

Measurement uncertainty handling in Python
GNU Lesser General Public License v3.0
7 stars 1 forks source link

configure flags to work with different flag_masks formats #11

Open mattgoalen opened 1 year ago

mattgoalen commented 1 year ago

Reading in Sentinel-3 quality flags netcdf with rioxarray, stores the flag_masks attribute as a np.ndarray which throws up an error when trying to set the flag masks in unpack_flag_attrs in obsarray\templater\dataset_util.py:

flag_mask = attrs["flag_masks"].split(",") if "flag_masks" in attrs else []
flag_mask = [int(m) for m in flag_mask] if flag_mask != [""] else []

AttributeError: 'numpy.ndarray' object has no attribute 'split'