Skip to content

Commit

Permalink
create filter to mask out glaciers in snow depth
Browse files Browse the repository at this point in the history
  • Loading branch information
NRaoult committed Nov 8, 2024
1 parent 4de03a5 commit 5bf8c9e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/anemoi/transform/filters/glacier_mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def mask_glaciers(snow_depth, glacier_mask):
return snow_depth


@filter_registry.register("snow_depth_masked")
@filter_registry.register("glacier_mask")
class SnowDepthMasked(SimpleFilter):
"""A filter to mask about glacier in snow depth."""

Expand All @@ -30,7 +30,7 @@ def __init__(
snow_depth="sd",
snow_depth_masked="sd_masked",
):
self.glacier_mask = ekd.from_source("file", glacier_mask)[0].to_numpy()
self.glacier_mask = ekd.from_source("file", glacier_mask)[0].to_numpy().bool()
self.snow_depth = snow_depth
self.snow_depth_masked = snow_depth_masked

Expand Down

0 comments on commit 5bf8c9e

Please sign in to comment.