def calculate_wave_height(outside_wave_height, max_surge):
    """
    Calculates the wave height. Waves are assumed to break at 0.45 the water level

    :param outside_wave_height: maximum wave height during event far of the coast [m]
    :param max_surge: maximum water level at the location where the wave height is calculated [m+MSL]

    :return wave_height: wave height at the location [m]
    """
    wave_height = min(outside_wave_height, 0.45*max_surge)
    return wave_height