Return the critical local water depth.
191302
def height_water_critical(FlowRate, Width):
    """"""
    #Checking input validity
    ut.check_range([FlowRate, ">0", "Flow rate"], [Width, ">0", "Width"])
    return (FlowRate / (Width * np.sqrt(gravity.magnitude))) ** (2/3)
471992
def local(self):
        
        assert self.name in CFG["container"]["images"].value
        tmp_dir = local.path(str(CFG["tmp_dir"]))
        target_dir = tmp_dir / self.name

        if not target_dir.exists() or not is_valid(self, target_dir):
            unpack(self, target_dir)

        return target_dir
1362222
def get_locals(cls, session):
        
        return cls.find(session,
                        where=(cls.local == True,))
442090
def _get_single_depth(self, multi_index):
        '''
        
        '''
        single_depth = 0
        for subind in multi_index:
            if is_slice_or_dim_range(subind):
                break
            single_depth += 1
        return single_depth
217048
private int depth() {
        int i = 0;
        for (TreeString p = this; p != null; p = p.parent) {
            i++;
        }
        return i;
    }
1033011
def get_gos_d0d1(self):
        """"""
        return set([o.id for d in [0, 1] for o in self.gosubdag.rcntobj.depth2goobjs.get(d)])
449164
def get_dimension(self):
        """"""
        if self.strokes > 0:
            if self.pixel_env > 0:
                return (2 + (1 + 2*self.pixel_env)**2) \
                    * self.strokes * self.points_per_stroke
            else:
                return 2*self.strokes * self.points_per_stroke
        else:
            if self.pen_down:
                return 3*self.points_per_stroke
            else:
                return 2*self.points_per_stroke
1201350
def vel_horizontal(HeightWaterCritical):
    """"""
    #Checking input validity
    ut.check_range([HeightWaterCritical, ">0", "Critical height of water"])
    return np.sqrt(gravity.magnitude * HeightWaterCritical)
877992
def area_pipe_min(self):
        """"""
        return (self.safety_factor * self.q / self.vel_critical).to(u.cm**2)
355009
def re_general(Vel, Area, PerimWetted, Nu):
    """"""
    #Checking input validity - inputs not checked here are checked by
    #functions this function calls.
    ut.check_range([Vel, ">=0", "Velocity"], [Nu, ">0", "Nu"])
    return 4 * radius_hydraulic_general(Area, PerimWetted).magnitude * Vel / Nu
210438
def get_top_edge_depth(self):
        
        top_edge = self.mesh[0:1]
        if top_edge.depths is None:
            return 0
        else:
            return numpy.min(top_edge.depths)
195683
def intersect(self, **kwargs):
        
        end_point = kwargs.pop('end_point')
        depth = self.get_depth(location=end_point)
        # Bathymetry and a particle's depth are both negative down
        if depth < 0 and depth > end_point.depth:
            inter = True
        else:
            inter = False
        return inter
945146
public function getFillOpacitySettings(): float
    {
	    return (float)$this->_scopeConfig->getValue(self::FILL_OPACITY_CONFIG_PATH, ScopeInterface::SCOPE_STORE);
    }
875173
def mtr_tr_dense_local(sz):
  """"""
  hparams = mtr_tr_dense(sz)
  hparams.decoder_layers = ["local_self_att", "enc_att", "drd"] * 6
  hparams.local_attention_radius = 32
  return hparams
752854
def get_float_value(self, section, option, default=0.0):
        """"""
        try:
            return self.parser.getfloat(section, option)
        except NoOptionError:
            return float(default)
1274973
def __hover(self, **kwargs):
        
        end_point = kwargs.pop('end_point')
        # The location argument here should be the point that intersected the bathymetry,
        # not the end_point that is "through" the bathymetry.
        depth = self.get_depth(location=end_point)
        return Location4D(latitude=end_point.latitude, longitude=end_point.longitude, depth=(depth + 1.))
806630
def thresholds(self):
        """"""
        return numpy.array(
            sorted(self._key2float(key) for key in self._coefs), dtype=float)