Skip to content

Commit

Permalink
wmf.Basin.GetGeo_Parameters: Se le agregan los parametros de total de…
Browse files Browse the repository at this point in the history
… canales y densidad de drenaje
  • Loading branch information
the-beatle committed Feb 13, 2018
1 parent 63aba1d commit 5a1828c
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions wmf/wmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -970,15 +970,18 @@ def GetGeo_Parameters(self,rutaParamASC=None,plotTc=False,
#Obtiene los parametros
Perim = self.Polygon.shape[1]*cu.dxp/1000.
Area=(self.ncells*cu.dxp**2)/1e6
Lcau=ppal[1,-1]/1000.0
TotalCauces = self.CellCauce*self.CellLong
TotalCauces = TotalCauces.sum() / 1000. #[km]
Densidad = TotalCauces / Area #[km/km2]
Lcau=ppal[1,-1]/1000.0
Scau=np.polyfit(ppal[1,::-1],ppal[0],1)[0]*100
Scue=slope.mean()*100
Hmin=Elev[-1]; Hmax=Elev[puntto]; Hmean=Elev.mean()
HCmax=Elev[punto]
x,y = cu.basin_coordxy(self.structure,self.ncells)
CentXY = [np.median(x),np.median(y)]
#Genera un diccionario con las propiedades de la cuenca
self.GeoParameters={'Area[km2]': Area,
self.GeoParameters={'Area[km2]': Area,
'Pend_Cauce [%]':Scau,
'Long_Cau [km]': Lcau,
'Pend_Cuenca [%]': Scue,
Expand All @@ -988,7 +991,9 @@ def GetGeo_Parameters(self,rutaParamASC=None,plotTc=False,
'Hmean_[m]':Hmean,
'H Cauce_Max [m]':HCmax,
'Centro_[X]': CentXY[0],
'Centro_[Y]': CentXY[1]}
'Centro_[Y]': CentXY[1],
'Long_tot_cauces[km]': TotalCauces,
'Densidad_drenaje[km/km2]': Densidad}
if GetPerim:
self.GeoParameters.update({'Perimetro[km]':Perim})
#Calcula los tiempos de concentracion
Expand Down Expand Up @@ -3743,7 +3748,7 @@ def set_Control(self,coordXY,ids,tipo = 'Q'):


def set_sediments(self,var,VarName, wi = [0.036, 2.2e-4, 8.6e-7],
diametro = [0.35, 0.016, 0.001]):
diametro = [0.35, 0.016, 0.001], G = 9.8):
'Descripcion: Alojas las variables requeridas para la ejecucion\n'\
' del modelo de sedimentos.\n'\
'\n'\
Expand Down Expand Up @@ -3800,6 +3805,7 @@ def set_sediments(self,var,VarName, wi = [0.036, 2.2e-4, 8.6e-7],
#Variables de diametro y velocidad de caida
models.wi = wi
models.diametro = diametro
models.g = G

def set_Slides(self,var,VarName):
'Descripcion: Alojas las variables requeridas para la ejecucion\n'\
Expand Down

0 comments on commit 5a1828c

Please sign in to comment.