easysnowdata.processing.contract.apply_variables#

easysnowdata.processing.contract.apply_variables(ds: Dataset, variables: Iterable[Any], *, mask: bool | None = None) Dataset[source]#

Apply the catalog Variable definitions present in ds.

Categorical variables get their CF flag attrs and keep the sentinel (rio.nodata set); continuous variables are NaN-masked with the encoded nodata preserved. mask=False skips the NaN masking (the raw product); mask=True also NaN-masks categorical variables.