def test_no_fill_if_conditions_not_met(self): """Test it doesn't fill in NaN if the heighest wet bulb integral value is less than the threshold.""" plugin = FallingSnowLevel() expected = np.array([[1.0, 1.0, 2.0], [1.0, np.nan, 2.0], [1.0, 2.0, 2.0]]) plugin.fill_in_high_snow_falling_levels(self.snow_level_data, self.orog, self.highest_wb_int, self.highest_height) self.assertArrayEqual(self.snow_level_data, expected)
def test_basic(self): """Test fills in missing data with orography + highest height""" plugin = FallingSnowLevel() self.highest_wb_int[1, 1] = 100.0 expected = np.array([[1.0, 1.0, 2.0], [1.0, 301.0, 2.0], [1.0, 2.0, 2.0]]) plugin.fill_in_high_snow_falling_levels(self.snow_level_data, self.orog, self.highest_wb_int, self.highest_height) self.assertArrayEqual(self.snow_level_data, expected)