pyspc.model.plathynes.unit_hydrograph
Modélisations hydrologiques - Projet PLATHYNES - Hydrogrammes unitaires
Module Attributes
Dictionnaire des fonctions de construction des hydrogrammes unitaires |
Functions
|
Hydrogramme unitaire selon Berthet (2010). |
|
Hydrogramme unitaire selon Le Moine - PUISSANCE. |
|
Hydrogramme unitaire de forme géométrique RECTANGLE. |
|
Hydrogramme unitaire de forme géométrique TRIANGLE. |
|
Construire un hydrogramme unitaire. |
|
Tracer un hydrogramme unitaire. |
- pyspc.model.plathynes.unit_hydrograph.FBN(index, alpha=1, kappa=1)[source]
Hydrogramme unitaire selon Berthet (2010).
- Paramètres:
index (list, pandas.Index) – Indices temporels sur lesquels il faut déterminer l’hydrogramme
alpha (float) – Paramètre alpha (forme). Défaut: 1
kappa (float) – Paramètre kappa (mode). Défaut: 1
- Renvoie:
df – Hydrogramme unitaire
- Type renvoyé:
pandas.DataFrame
Notes
Equation 1.3.1 de Note_besoinMOHYS_V4.odt
Exemples
>>> from pyspc.model.plathynes import unit_hydrograph as uh >>> index = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] >>> alpha = 1.5 >>> kappa = 0.3 >>> df = uh.FBN(index, alpha, kappa) >>> df FBN 1 0.066394 2 0.118480 3 0.137048 4 0.135565 5 0.122396 6 0.104168 7 0.085180 8 0.067690 9 0.052580 10 0.039958 11 0.029564 12 0.020973 13 0.013644 14 0.006360
- pyspc.model.plathynes.unit_hydrograph.FPU(index, alpha=1)[source]
Hydrogramme unitaire selon Le Moine - PUISSANCE.
- Paramètres:
index (list, pandas.Index) – Indices temporels sur lesquels il faut déterminer l’hydrogramme
alpha (float) – Paramètre alpha (forme). Strictement positif. Défaut: 1
- Renvoie:
df – Hydrogramme unitaire
- Type renvoyé:
pandas.DataFrame
Notes
Equation 1.3.4 de Note_besoinMOHYS_V4.odt
Exemples
>>> from pyspc.model.plathynes import unit_hydrograph as uh >>> index = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] >>> alpha = 5 >>> df = uh.FPU(index, alpha) >>> df FPU 1 0.000149 2 0.002380 3 0.012049 4 0.038079 5 0.092967 6 0.192777 7 0.357143 8 0.192777 9 0.092967 10 0.038079 11 0.012049 12 0.002380 13 0.000149 14 0.000000
- pyspc.model.plathynes.unit_hydrograph.RE1(index)[source]
Hydrogramme unitaire de forme géométrique RECTANGLE.
- Paramètres:
index (list, pandas.Index) – Indices temporels sur lesquels il faut déterminer l’hydrogramme
- Renvoie:
df – Hydrogramme unitaire
- Type renvoyé:
pandas.DataFrame
Notes
Equation 1.3.2 de Note_besoinMOHYS_V4.odt
Voir aussi
scipy.stats.uniformExemples
>>> from pyspc.model.plathynes import unit_hydrograph as uh >>> index = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] >>> df = uh.RE1(index) >>> df RE1 1 0.071429 2 0.071429 3 0.071429 4 0.071429 5 0.071429 6 0.071429 7 0.071429 8 0.071429 9 0.071429 10 0.071429 11 0.071429 12 0.071429 13 0.071429 14 0.071429
- pyspc.model.plathynes.unit_hydrograph.TG1(index, d=0)[source]
Hydrogramme unitaire de forme géométrique TRIANGLE.
- Paramètres:
index (list, pandas.Index) – Indices temporels sur lesquels il faut déterminer l’hydrogramme
d (int) – Mode du triangle (positionnement du maximum). Défaut: 0
- Renvoie:
df – Hydrogramme unitaire
- Type renvoyé:
pandas.DataFrame
Notes
Equation 1.3.3 de Note_besoinMOHYS_V4.odt
Voir aussi
scipy.stats.triangExemples
>>> from pyspc.model.plathynes import unit_hydrograph as uh >>> index = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14] >>> df = uh.TG1(index) >>> df TG1 1 0.020408 2 0.040816 3 0.061224 4 0.081633 5 0.102041 6 0.122449 7 0.142857 8 0.122449 9 0.102041 10 0.081633 11 0.061224 12 0.040816 13 0.020408 14 0.000000
>>> df = uh.TG1(index, d=0) >>> df TG1 1 0.020408 2 0.040816 3 0.061224 4 0.081633 5 0.102041 6 0.122449 7 0.142857 8 0.122449 9 0.102041 10 0.081633 11 0.061224 12 0.040816 13 0.020408 14 0.000000
>>> df = uh.TG1(index, d=-4) >>> df TG1 1 0.047619 2 0.095238 3 0.142857 4 0.129870 5 0.116883 6 0.103896 7 0.090909 8 0.077922 9 0.064935 10 0.051948 11 0.038961 12 0.025974 13 0.012987 14 0.000000
- pyspc.model.plathynes.unit_hydrograph.UH_DICT = {'FBN': <function FBN>, 'FPU': <function FPU>, 'RE1': <function RE1>, 'TG1': <function TG1>}
Dictionnaire des fonctions de construction des hydrogrammes unitaires
- pyspc.model.plathynes.unit_hydrograph.build(ts=60, tb=60, c=0, params=None)[source]
Construire un hydrogramme unitaire.
- Paramètres:
ts (int) – Pas de temps de calcul, en min.
tb (int) – Durée de l’hydrogramme unitaire en min.
c (int) – Position du centre de l’hydrogramme unitaire, en min. Défaut: 0. L’hydrogramme est alors centré en 0.
params (dict) – Formulations demandées et leurs paramètres - clé : str - valeurs : list
- Renvoie:
df – Hydrogrammes unitaires
- Type renvoyé:
pandas.DataFrame
Voir aussi
Exemples
>>> from pyspc.model.plathynes import unit_hydrograph as uh >>> ts = 60 >>> tb = 840 >>> c = 0 >>> params = { ... 'FBN': [1.5, 0.3], ... 'FPU': [5], ... 'RE1': [], ... 'TG1': [-4], ... }
CAS CENTRE (c == 0)
>>> df = uh.build(ts=ts, tb=tb, c=c, params=params) >>> df FBN FPU RE1 TG1 -6 0.066394 0.000149 0.071429 0.047619 -5 0.118480 0.002380 0.071429 0.095238 -4 0.137048 0.012049 0.071429 0.142857 -3 0.135565 0.038079 0.071429 0.129870 -2 0.122396 0.092967 0.071429 0.116883 -1 0.104168 0.192777 0.071429 0.103896 0 0.085180 0.357143 0.071429 0.090909 1 0.067690 0.192777 0.071429 0.077922 2 0.052580 0.092967 0.071429 0.064935 3 0.039958 0.038079 0.071429 0.051948 4 0.029564 0.012049 0.071429 0.038961 5 0.020973 0.002380 0.071429 0.025974 6 0.013644 0.000149 0.071429 0.012987 7 0.006360 0.000000 0.071429 0.000000
CAS DECENTRE (c != 0)
>>> c = -120 >>> df = uh.build(ts=ts, tb=tb, c=c, params=params) >>> df FBN FPU RE1 TG1 -8 0.066394 0.000149 0.071429 0.047619 -7 0.118480 0.002380 0.071429 0.095238 -6 0.137048 0.012049 0.071429 0.142857 -5 0.135565 0.038079 0.071429 0.129870 -4 0.122396 0.092967 0.071429 0.116883 -3 0.104168 0.192777 0.071429 0.103896 -2 0.085180 0.357143 0.071429 0.090909 -1 0.067690 0.192777 0.071429 0.077922 0 0.052580 0.092967 0.071429 0.064935 1 0.039958 0.038079 0.071429 0.051948 2 0.029564 0.012049 0.071429 0.038961 3 0.020973 0.002380 0.071429 0.025974 4 0.013644 0.000149 0.071429 0.012987 5 0.006360 0.000000 0.071429 0.000000
- pyspc.model.plathynes.unit_hydrograph.plot(df, subplots=False, filename='unit_hydrograph.png')[source]
Tracer un hydrogramme unitaire.
- Paramètres:
df (pandas.DataFrame) – Hydrogrammes unitaires
subplots (bool) – 1 sous figure par hydrogramme unitaire (True) ou les regrouper (False)
filename (str) – Fichier à écrire
- Renvoie:
filename – Fichier à écrire
- Type renvoyé:
str
Voir aussi
Exemples