Ejemplo n.º 1
0
def test_metres_sec(rainrate, interp_rainrate):
    """Test filling radar holes in units of m/s"""
    plugin = FillRadarHoles()
    rainrate.convert_units("m s-1")
    result = plugin(rainrate)
    expected = interp_rainrate / (3600.0 * 1000.0)
    check_fillradarholes(result, expected)
Ejemplo n.º 2
0
def test_wide_mask(rainrate):
    """Test filling radar holes with a widespread mask,
    interpolation should not be triggered in this case"""
    plugin = FillRadarHoles()
    rainrate.data[:11, :11] = np.nan
    rainrate.data.mask = np.where(np.isfinite(rainrate.data.data), False, True)
    result = plugin(rainrate)
    check_fillradarholes(result, rainrate.data.copy())
Ejemplo n.º 3
0
def process(cube: cli.inputcube):
    """ Fill in small "no data" holes in the radar composite

    Args:
        cube (iris.cube.Cube):
            Masked radar composite

    Returns:
        iris.cube.Cube
    """
    from improver.nowcasting.utilities import FillRadarHoles

    result = FillRadarHoles()(cube)
    return result
Ejemplo n.º 4
0
def test_mm_hour(rainrate, interp_rainrate):
    """Test filling radar holes in units of mm/h"""
    plugin = FillRadarHoles()
    result = plugin(rainrate)
    check_fillradarholes(result, interp_rainrate)