FlagAccessor.__setitem__

FlagAccessor.__setitem__#

FlagAccessor.__setitem__(flag_var_name: str, flag_def: DataArray | Variable | Tuple[List[str], dict])[source]#

Adds defined flag variable to dataset

Parameters:
  • flag_var_name – flag variable name

  • flag_def – either xarray DataArray/Variable, or definition through tuple as (dims, attrs). dims is a list of variable dimension names, and attrs is a dictionary of variable attributes. attrs should include an element flag_meanings which is a list defining the flag variable flags.