def height_water_critical(FlowRate, Width):
    """Return the critical local water depth."""
    #Checking input validity
    ut.check_range([FlowRate, ">0", "Flow rate"], [Width, ">0", "Width"])
    return (FlowRate / (Width * np.sqrt(gravity.magnitude))) ** (2/3)
Return the critical local water depth.