def METHOD_NAME(self, water_depth):
    """
    Return weighting factor for transport.
    If there is no tidal range, then the weight factor is 1 if at or
    below sea level, and 0 if above it. If there is a tidal range, then
    a tanh function is used to weight transport across mean sea level, so
    that there is some degree of transport for water depths within the
    tidal range (less above, more below). The nature of the tanh function
    is such that the transport is about 95% of its maximum value at a depth
    of 1.5x the mean tidal range, and 5% of its maximum value at a height
    of 1.5x the mean tidal range above mean sea level.
    Parameters
    ----------
    water_depth : float array
        Depth of water relative to mean sea level (m) (can be negative)
    Returns
    -------
    df : float array
        Weight factor ranging from 0 to 1.
    """
    if self._tidal_range > 0.0:
        df = (np.tanh(self._inverse_tidal_range * water_depth) + 1.0) / 2.0
    else:
        df = 1.0 * (water_depth >= 0.0)
    return df