juseg / hyoga

Paleoglacier modelling framework
https://hyoga.io
GNU General Public License v3.0
8 stars 0 forks source link

Consider an alternative approach to masking #9

Closed juseg closed 1 year ago

juseg commented 3 years ago

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:

A few more tasks before closing this issue.