Probability calculation using Bos Levenbach fomular
Happy New Year !
Regarding to the remaining works last year, I am in the stage of calculating the return periods.
Assuming that data is arranged in this format (AVAILABLE HERE For Reservoir 1):
sortData =
2000: Jan 1| Jan 2 | Jan 3 .... Dec 31
2001: A1 | A2 | A3 ..... A4
....
2999: An | An+1 | An+2 .... An+n
To calculate return period we need to :
- (1) sort data in ascending:
ascending<- apply(sortData,2,function(x) x[order(x)])
- (2) rank data
rank <- apply(ascending, 2, function(x) dense_rank(x)) # 'dense_rank' to force the rank begin with 1
- (3) calculate frequency using Hazen formular.
FreHazen <- (rank - 0.5)/LENGHT_OF_DATA
- (4) calculate return period
RePeriod <- 1/FreHazen
My issue falls on step (3) about LENGTH_OF_DATA. Assume data contains of 1000 years, what is lengh of data among the size of data (1000) and return period (i.e. 5,10 ...100)? In addition, if we follow these steps, we are unable to find exactly number of return period in step (4).
In our case, return periods are known. If we donate return period before step (1), then LENGTH_OF_DATA = number of Return Period:
Return_P <- 100 #return period
ascedReturn_P <- sortData[1:Return_P, ]
ascending<- apply(ascedReturn_P ,2,function(x) x[order(x)])
rank <- apply(ascending, 2, function(x) dense_rank(x)) # dense_rank to begin with 1
FreHazen <- (rank - 0.5)/Return_P
Following the above steps, we have Frequency (FreHazen) for each day across 100 years. My question is how to find the extreme event from this frequency dataset for a range of 100 years?.
Are these steps wrong? Any suggestions would be great.