Professional Documents
Culture Documents
Course-work-and-data-analysis (/github/bikasbhattarai/Course-work-and-data-analysis/tree/master)
/ Hydrology-Course (/github/bikasbhattarai/Course-work-and-data-analysis/tree/master/Hydrology-Course)
/
GEO4310_2015 (/github/bikasbhattarai/Course-work-and-data-analysis/tree/master/Hydrology-Course/GEO4310_2015)
/
EX5 (/github/bikasbhattarai/Course-work-and-data-analysis/tree/master/Hydrology-Course/GEO4310_2015/EX5)
In [1]:
%%html
<style>
table {float:left}
</style>
Date: 2015/10/05
Question 1:
Vägverket (the Swedish Road Administration) plans to build a new bridge and they ask you to provide some
information about the frequency and magnitude of the discharges in the river. Of course, you are a very
careful consultant, so you are going to apply different statistical methods. Yearly peak flows can be found
in the file Qyearly.dat.
A) Graphic method:
(i) Compute the empirical probability for a certain flow to be exceeded, P(X>=xm), using the Weibull equation
m
P (X >= xm) = ...................(1)
n+1
(ii) plot P (X > x m ) against Q max on the normal probability paper and fit a linear line by hand.
i) Normal distribution
https://nbviewer.jupyter.org/github/bikasbhattarai/Course-work-and-data-analysis/blob/master/Hydrology-Course/GEO4310_201… 1/9
9/26/2020 Jupyter Notebook Viewer
1) transform the data into lognormal and find mean and standard deviation
2) apply the formula on page62. in the compendium (2013).
Use
¯
Q T = Q + K T . SQ .........................(2)
KT (for normal distribution and Pearson distribution) can be obtained from tables, for Extreme value type I
(Gumbel) distribution the equation is
√6 T
KT = KT = {0.5772 + ln [ln ( )]} .................(3)
π T −1
Solution:
In [1]:
%matplotlib inline
import scipy
import numpy as np
import pandas as pd
from scipy import stats
from scipy.stats import pearson3
from __future__ import division
Out[1]:
In [3]:
scipy.stats.norm.ppf(0.01)
Out[3]:
-2.3263478740408408
https://nbviewer.jupyter.org/github/bikasbhattarai/Course-work-and-data-analysis/blob/master/Hydrology-Course/GEO4310_201… 2/9
9/26/2020 Jupyter Notebook Viewer
In [3]:
# Plot P(X>= xm) against Qmax on normal probability paper and fit a linear line.
from scipy import stats
import matplotlib.pyplot as plt
Qmax = ams['sorted']
prob = ams['Weibull_prob']
1B: Solution:
We will calculate the magnitude of a flood with a 100 year return period (T = 100 by using the normal distribution.
The mean discharge for the data period ( is 66. 3 m³/s with a standard deviation (s) of 21.3 m³ /s.
In [4]:
mean = (np.mean(ams['Q(m3/s)']))
print 'Mean :%.2f' % mean
std = (np.std(ams['Q(m3/s)']))
Mean :66.25
Standard deviation :21.00
So,
¯
Q = 66.3m³/s
SQ = 21m³/s
1
P (Q > Q T ) = = 0.01
100
z = KT = scipy.stats.norm.ppf(0.99)
¯
Q T =100 = Q + K T SQ
https://nbviewer.jupyter.org/github/bikasbhattarai/Course-work-and-data-analysis/blob/master/Hydrology-Course/GEO4310_201… 3/9
9/26/2020 Jupyter Notebook Viewer
In [5]:
Qt = mean + (scipy.stats.norm.ppf(0.99)*std)
print '100 year flood in normal distribution = %.2f' % Qt
In [6]:
ams_lognorm['lognorm'] = np.log(ams_lognorm['sorted'])
ams_lognorm ['Rank'] = range(1,N+1,1)
Out[6]:
In [7]:
mean_lognorm = (np.mean(ams_lognorm['lognorm']))
print 'Mean_lognorm : %.2f' % mean_lognorm
std_lognorm = (np.std(ams_lognorm['lognorm']))
Mean_lognorm : 4.13
Standard deviation_lognorm : 0.37
In [8]:
Qt = mean_lognorm + (scipy.stats.norm.ppf(0.99)*std_lognorm)
print '100 year flood in lognormal distribution : %.2f' % Qt
In [9]:
(np.exp(5)).round(2)
Out[9]:
148.41
https://nbviewer.jupyter.org/github/bikasbhattarai/Course-work-and-data-analysis/blob/master/Hydrology-Course/GEO4310_201… 4/9
9/26/2020 Jupyter Notebook Viewer
Conclusion: So the probability for 100 years flood in lognormal distribution is 148.41 m³/sec.
√6 T
KT = − {0.5772 + ln [ln ( )]}
π T −1
In [10]:
K_T = 3.137
std = 20.9990427275
mean= 66.2513513514
In [11]:
#So,
Q_T = (mean +std *K_T).round(1)
print Q_T
132.1
Conclusion: So the probability for 100 years flood in Gumble distribution is 132.2 m³/sec.
here, mean = λ
standard deviation = β
coefficient of skewness = ε
2 1 3 2 2 3 4 1 5
then KT = K T = z + (z − 1)k +
3
(z − 6z)k − (z − 1)k + zk +
3
k
ε
where, k =
6
2
2.516+0.8029w+0.01033w
z = w −
1+1.4328w+0.1893w2 +0.00131w3
1/2
1
w = [ln ( )]
2
p
1
P = = 0.01
T
https://nbviewer.jupyter.org/github/bikasbhattarai/Course-work-and-data-analysis/blob/master/Hydrology-Course/GEO4310_201… 5/9
9/26/2020 Jupyter Notebook Viewer
In [12]:
skewness = scipy.stats.skew(ams['sorted'])
k = skewness/6
w = (np.log(1/((0.01)**2))**0.5 )
z = w-((2.516+0.8029*w+0.01033*w**2)/(1+1.4328*w+0.1893*w**2 +0.00131*w**3))
K_T = z+(z**2-1)*k + (1/3)*(z**3 - 6*z)*k**2 - (z**2-1)*k**3 +z*k**4 +(1/3)*k**5
112.64
Conclusion: So the probability for 100 years flood in Pearson III distribution is 112.64 m³/sec.
In [13]:
mean_lognorm = (np.mean(ams_lognorm['lognorm']))
print 'Mean_lognorm : %.2f' % mean_lognorm
std_lognorm = (np.std(ams_lognorm['lognorm']))
Mean_lognorm : 4.13
Standard deviation_lognorm : 0.37
In [14]:
skewness = scipy.stats.skew(ams_lognorm['lognorm'])
k = skewness/6
w = (np.log(1/((0.01)**2))**0.5 )
z = w-((2.516+0.8029*w+0.01033*w**2)/(1+1.4328*w+0.1893*w**2 +0.00131*w**3))
K_T = z+(z**2-1)*k + (1/3)*(z**3 - 6*z)*k**2 - (z**2-1)*k**3 +z*k**4 +(1/3)*k**5
4.73
In [15]:
(np.exp(4.73)).round(2)
Out[15]:
113.3
Conclusion: So the probability for 100 years flood in Log-Pearson III distribution is 113.3 m³/sec.
In summary: From the table below it is clear that the probability for 100 year flood is higher in Lognormal
distribution while the Lower in Pearsom III distibution.
Distribution discharge(m³/s)
https://nbviewer.jupyter.org/github/bikasbhattarai/Course-work-and-data-analysis/blob/master/Hydrology-Course/GEO4310_201… 6/9
9/26/2020 Jupyter Notebook Viewer
Distribution discharge(m³/s)
Normal 115.10
Log-Normal 148.41
Gumbel 132.1
2) Calculate the probability that the annual peak flood is larger than 80 m³/s for any given year (assume
normal distribution)
A hundred year flood has the probability of exceedance (Q > Q T ) = 0.01 and P (Q < Q T ) = 0.99
¯
X T −X
from the normal distribution table: KT =
std
80−66.25
P (Q > 80m³/s) = P Q >
20.99
From the normal distribution table probability we got the probability of P (Z > 0.655) = 0.7437
Hence, the probability that the annual peak flood is larger than 80 m³/s for any given year is 26%.
3) In order to be 90% sure that a design flood is not exceeded in a 50 year period (design life), what shall be
the design return period?
The exceedence probability for a certain return period (T) with n value is given by the following equation:
1 n
Pe = 1 − [1 − (
T
)] ...............(4)
1
T = −
1
(1−Pe ) n −1
In this situation the Pe is 0.1, i.e the probability of exceedence is 1-P (no exceedence) = 1-0.9 = 0.1. The n is 50
years.
1
T = −
1
(1−0.1) 50 −1
In [16]:
T= (-1/((1-0.1)**(1/50)-1))
print ('T : %.2f' % T)
T : 475.06
4) Calculate the magnitude of the flow that with a probability of 0.9 is not exceeded in 5 years. (assume
normal distribution)
https://nbviewer.jupyter.org/github/bikasbhattarai/Course-work-and-data-analysis/blob/master/Hydrology-Course/GEO4310_201… 7/9
9/26/2020 Jupyter Notebook Viewer
Using the equation 4 from the problem 3: T can be calculated as shown below:
In [17]:
T= (-1/((1-0.1)**(1/5)-1))
print ('T : %.1f' % T)
T : 48.0
1 1
The return period (T) is 48 year. The probability is given by P =
T
=
48
= 0.0208
In [18]:
z = np.abs(scipy.stats.norm.ppf(0.0208))
# QT can be calculated by using the equation :
# mean+Kt*standard deviation which is given in equation 2
QT = (mean + z*std).round(2)
print QT
109.04
Conclusion: The magnitude of the flow that with a probability of 0.9 is not exceeded in 5 years is calculated to be
109. 04 m³/s
5)
A return period, also known as a recurrence interval is an estimate of the likelihood of an event to occur. It is a
statistical measurement typically based on historic data denoting the average recurrence interval over an extended
period of time. The return period wil be expressed in the same units as the sampling interval. For example, if we are
analyzing the annual peak floods then the return period will be in years. Some of the plotting position formulae
which are commonly used in hydrology are given below. In all these formula P [X ⩽ x m ]
California formula:
n
Exceedence probability =1 − P (x m ) =
m
m
Return period = T =
n
Hazen's formula,
m−0.5 2m−1
1 − P (x m ) = =
n 2n
2n
Return period = T = − 1
2m
Weibull's formula
m
1 − P (x m ) =
n+1
n+1
Return period = T =
m
https://nbviewer.jupyter.org/github/bikasbhattarai/Course-work-and-data-analysis/blob/master/Hydrology-Course/GEO4310_201… 8/9
9/26/2020 Jupyter Notebook Viewer
b) In a small brook, we have estimated that the discharge 5 m³/s corresponds to the flow that is exceeded
with a return period of 10 years. What is the probability that this value is not exceeded five years in a
row?
Solution:
1
P (Q > q) = = 0.1
10
5 5
so, Q(Q < q) = [0.99] = 0.95
Hence the probability that the discharge is not exceeded in five years in that small broke is o.95.
c) For a different river, the relationship between the duration of periods without precipitation, t (days) and
the lowest low-flow is given by this equation, Qt = 25.0 exp(−t/20) [m3 /s], (the recession of the flow) t
is a stochastic variable that can be described with a Gumbel F (t) = exp(−exp(−a(t − u)))with the
parameters u = 18 and a = 0.150. What is the probability that Qt reaches a lower value than 10 m3 /s?
Here, Qt = 25 exp(−t/20)
Replace Qt with 10
10 = 25 exp(−t/20)
−t
exp = 10/25
20
t
= log(10/25)
−20
Solve for t
10
t = −20 ⋅ log
25
t = 18.3
Conclusion: Hence the probability that the Qt reaches a lower value than 10 m³/s is 0.385.
In [ ]:
https://nbviewer.jupyter.org/github/bikasbhattarai/Course-work-and-data-analysis/blob/master/Hydrology-Course/GEO4310_201… 9/9