Skip to content

Commit

Permalink
Added test for smooth radar mask
Browse files Browse the repository at this point in the history
  • Loading branch information
sidekock committed Jul 18, 2024
1 parent dd39358 commit 3e65131
Showing 1 changed file with 30 additions and 21 deletions.
51 changes: 30 additions & 21 deletions pysteps/tests/test_blending_steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,39 @@


steps_arg_values = [
(1, 3, 4, 8, None, None, False, "spn", True, 4, False, False),
(1, 3, 4, 8, "obs", None, False, "spn", True, 4, False, False),
(1, 3, 4, 8, "incremental", None, False, "spn", True, 4, False, False),
(1, 3, 4, 8, None, "mean", False, "spn", True, 4, False, False),
(1, 3, 4, 8, None, "cdf", False, "spn", True, 4, False, False),
(1, 3, 4, 8, "incremental", "cdf", False, "spn", True, 4, False, False),
(1, 3, 4, 6, "incremental", "cdf", False, "bps", True, 4, False, False),
(1, 3, 4, 6, "incremental", "cdf", False, "bps", False, 4, False, False),
(1, 3, 4, 9, "incremental", "cdf", False, "spn", True, 4, False, False),
(2, 3, 10, 8, "incremental", "cdf", False, "spn", True, 10, False, False),
(5, 3, 5, 8, "incremental", "cdf", False, "spn", True, 5, False, False),
(1, 10, 1, 8, "incremental", "cdf", False, "spn", True, 1, False, False),
(2, 3, 2, 8, "incremental", "cdf", True, "spn", True, 2, False, False),
(1, 3, 6, 8, None, None, False, "spn", True, 6, False, False),
(1, 3, 4, 8, None, None, False, "spn", True, 4, False, False, 0),
(1, 3, 4, 8, "obs", None, False, "spn", True, 4, False, False, 0),
(1, 3, 4, 8, "incremental", None, False, "spn", True, 4, False, False, 0),
(1, 3, 4, 8, None, "mean", False, "spn", True, 4, False, False, 0),
(1, 3, 4, 8, None, "cdf", False, "spn", True, 4, False, False, 0),
(1, 3, 4, 8, "incremental", "cdf", False, "spn", True, 4, False, False, 0),
(1, 3, 4, 6, "incremental", "cdf", False, "bps", True, 4, False, False, 0),
(1, 3, 4, 6, "incremental", "cdf", False, "bps", False, 4, False, False, 0),
(1, 3, 4, 9, "incremental", "cdf", False, "spn", True, 4, False, False, 0),
(2, 3, 10, 8, "incremental", "cdf", False, "spn", True, 10, False, False, 0),
(5, 3, 5, 8, "incremental", "cdf", False, "spn", True, 5, False, False, 0),
(1, 10, 1, 8, "incremental", "cdf", False, "spn", True, 1, False, False, 0),
(2, 3, 2, 8, "incremental", "cdf", True, "spn", True, 2, False, False, 0),
(1, 3, 6, 8, None, None, False, "spn", True, 6, False, False, 0),
# Test the case where the radar image contains no rain.
(1, 3, 6, 8, None, None, False, "spn", True, 6, True, False),
(5, 3, 5, 6, "incremental", "cdf", False, "spn", False, 5, True, False),
(1, 3, 6, 8, None, None, False, "spn", True, 6, True, False, 0),
(5, 3, 5, 6, "incremental", "cdf", False, "spn", False, 5, True, False, 0),
# Test the case where the NWP fields contain no rain.
(1, 3, 6, 8, None, None, False, "spn", True, 6, False, True),
(5, 3, 5, 6, "incremental", "cdf", False, "spn", False, 5, False, True),
(1, 3, 6, 8, None, None, False, "spn", True, 6, False, True, 0),
(5, 3, 5, 6, "incremental", "cdf", False, "spn", False, 5, False, True, 0),
# Test the case where both the radar image and the NWP fields contain no rain.
(1, 3, 6, 8, None, None, False, "spn", True, 6, True, True),
(5, 3, 5, 6, "incremental", "cdf", False, "spn", False, 5, True, True),
(5, 3, 5, 6, "obs", "mean", True, "spn", True, 5, True, True),
(1, 3, 6, 8, None, None, False, "spn", True, 6, True, True, 0),
(5, 3, 5, 6, "incremental", "cdf", False, "spn", False, 5, True, True, 0),
(5, 3, 5, 6, "obs", "mean", True, "spn", True, 5, True, True, 0),
# Test for smooth radar mask
(1, 3, 6, 8, None, None, False, "spn", True, 6, False, False, 80),
(5, 3, 5, 6, "incremental", "cdf", False, "spn", False, 5, False, False, 80),
(5, 3, 5, 6, "obs", "mean", False, "spn", False, 5, False, False, 80),
(1, 3, 6, 8, None, None, False, "spn", True, 6, False, True, 80),
(5, 3, 5, 6, "incremental", "cdf", False, "spn", False, 5, True, False, 80),
(5, 3, 5, 6, "obs", "mean", False, "spn", False, 5, True, True, 80),
]

steps_arg_names = (
"n_models",
"n_timesteps",
Expand All @@ -46,6 +54,7 @@
"expected_n_ens_members",
"zero_radar",
"zero_nwp",
"smooth_radar_mask_range",
)


Expand Down

0 comments on commit 3e65131

Please sign in to comment.