Skip to content

Commit

Permalink
missing return
Browse files Browse the repository at this point in the history
  • Loading branch information
anaprietonem committed Jan 20, 2025
1 parent 734334c commit 5e93998
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/anemoi/transform/filters/rodeo-opera-mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def clip_opera(tp, quality):
tp[tp >= MAX_TP] = MAX_TP
quality[quality >= MAX_QI] = MAX_QI

return tp, quality


def mask_opera(tp, quality, mask):
print("✅✅", quality)
Expand All @@ -45,7 +47,6 @@ def mask_opera(tp, quality, mask):

return tp


@filter_registry.register("rodeo_opera_preprocessing")
class RodeoOperaPreProcessing(SimpleFilter):
"""A filter to select only good quality data i nrodeo opera data."""
Expand Down Expand Up @@ -82,7 +83,7 @@ def forward_transform(self, tp, quality, mask):
tp_masked = mask_opera(tp=tp.to_numpy(), quality=quality.to_numpy(), mask=mask.to_numpy())

# 2nd - apply clipping
tp_cleaned = clip_opera(tp=tp_masked.to_numpy(), quality=quality.to_numpy())
tp_cleaned,quality = clip_opera(tp=tp_masked, quality=quality.to_numpy())

yield self.new_field_from_numpy(tp_cleaned, template=tp, param=self.tp_cleaned)

Expand Down

0 comments on commit 5e93998

Please sign in to comment.