Currently masking is achieved using xarray.DataArray.where (in hyoga.hyoga.HyogaDataset.where). Because it uses nans, one drawback with this approach is that there is no "turning back" masked values into non-masked values. This is an issue at least for hyoga.hyoga.HyogaDataset.interp, which needs to refine the mask. An alternative or perhaps complementary masking method would be to use a separate variable (standard name land_ice_area_fraction) and to make sure plotting methods use this variable if it is present (see commit message in 4120b79375edff8cd073a486d619f9a7c6d276e2). Example method names:
[x] Add hyoga.hyoga.HyogaDataset.assign_icemask.
[x] Add hyoga.hyoga.HyogaDataset.where_icemask.
[x] Plotting methods will use ~the latter~ xarray.DataArray.where.
Currently masking is achieved using
xarray.DataArray.where
(inhyoga.hyoga.HyogaDataset.where
). Because it uses nans, one drawback with this approach is that there is no "turning back" masked values into non-masked values. This is an issue at least forhyoga.hyoga.HyogaDataset.interp
, which needs to refine the mask. An alternative or perhaps complementary masking method would be to use a separate variable (standard nameland_ice_area_fraction
) and to make sure plotting methods use this variable if it is present (see commit message in 4120b79375edff8cd073a486d619f9a7c6d276e2). Example method names:hyoga.hyoga.HyogaDataset.assign_icemask
.hyoga.hyoga.HyogaDataset.where_icemask
.xarray.DataArray.where
.A few more tasks before closing this issue.
hyoga.hyoga.HyogaDataset.assign
.interp
method.