def validate_maximum_water_depth(cls, value):
    """Return 0.0 for waterdepth in case of invalid values.

    Invalid values are:
    - everything lower than 0.01m (including -9999, -inf)
    - everything above 50m as it's unrealistic (including inf)
    """
    # in the case that the value is a "100.0" we won't catch it
    if isinstance(value, (float, int)):
        if value < 0.01:
            value = 0.0

        elif value > 50.0:
            value = 0.0

    return value