![]() |
mHM
The mesoscale Hydrological Model
|
Module with calculations for several hydrological signatures. More...
Functions/Subroutines | |
| real(dp) function, dimension(size(lags, 1)), public | autocorrelation (data, lags, mask) |
| Autocorrelation of a given data series. | |
| real(dp) function, dimension(size(quantiles, 1)), public | flowdurationcurve (data, quantiles, mask, concavity_index, mid_segment_slope, mhigh_segment_volume, high_segment_volume, low_segment_volume) |
| Flow duration curves. | |
| subroutine, public | limb_densities (data, mask, rld, dld) |
| Calculates limb densities. | |
| real(dp) function | maximummonthlyflow (data, mask, yr_start, mo_start, dy_start) |
| Maximum of average flows per months. | |
| subroutine, public | moments (data, mask, mean_data, stddev_data, median_data, max_data, mean_log, stddev_log, median_log, max_log) |
| Moments of data and log-transformed data, e.g. | |
| real(dp) function, dimension(size(quantiles, 1)), public | peakdistribution (data, quantiles, mask, slope_peak_distribution) |
| Calculates the peak distribution. | |
| real(dp) function, public | runoffratio (data, domain_area, mask, precip_series, precip_sum, log_data) |
| Runoff ratio (accumulated daily discharge [mm/d] / accumulated daily precipitation [mm/d]). | |
| real(dp) function, public | zeroflowratio (data, mask) |
| Ratio of zero values to total number of data points. | |
Module with calculations for several hydrological signatures.
This module contains calculations for hydrological signatures.
It contains:
COPYING and COPYING.LESSER provided with this software. The complete GNU license text can also be found at http://www.gnu.org/licenses/.| real(dp) function, dimension(size(lags, 1)), public mo_mrm_signatures::autocorrelation | ( | real(dp), dimension(:), intent(in) | data, |
| integer(i4), dimension(:), intent(in) | lags, | ||
| logical, dimension(size(data, 1)), intent(in), optional | mask ) |
Autocorrelation of a given data series.
Calculates the autocorrelation of a data series at given lags. An optional argument for masking data points can be given. The function is basically a wrapper of the function autocorr from the module mo_corr. An optional mask of data points can be specified. ADDITIONAL INFORMATION Used as hydrologic signature with lag 1 in Euser, T., Winsemius, H. C., Hrachowitz, M., Fenicia, F., Uhlenbrook, S., & Savenije, H. H. G. (2013). A framework to assess the realism of model structures using hydrological signatures. Hydrology and Earth System Sciences, 17(5), 1893-1912. doi:10.5194/hess-17-1893-2013
| [in] | real(dp), dimension(:) :: data | Array of data |
| [in] | integer(i4), dimension(:) :: lags | Array of lags where autocorrelation is requested |
| [in] | logical, dimension(size(data, 1)), optional :: mask | Mask for data points givenWorks only with 1d double precision input data. |
Definition at line 72 of file mo_mrm_signatures.f90.
References autocorrelation().
Referenced by autocorrelation().
| real(dp) function, dimension(size(quantiles, 1)), public mo_mrm_signatures::flowdurationcurve | ( | real(dp), dimension(:), intent(in) | data, |
| real(dp), dimension(:), intent(in) | quantiles, | ||
| logical, dimension(:), intent(in), optional | mask, | ||
| real(dp), intent(out), optional | concavity_index, | ||
| real(dp), intent(out), optional | mid_segment_slope, | ||
| real(dp), intent(out), optional | mhigh_segment_volume, | ||
| real(dp), intent(out), optional | high_segment_volume, | ||
| real(dp), intent(out), optional | low_segment_volume ) |
Flow duration curves.
Calculates the flow duration curves for a given data vector. The Flow duration curve at a certain quantile x is the data point p where x% of the data points are above the value p. Hence the function percentile of the module mo_percentile is used. But percentile is determining the point p where x% of the data points are below that value. Therfore, the given quantiles are transformed by (1.0-quantile) to get the percentiles of exceedance probabilities. Optionally, the concavity index CI can be calculated [Zhang2014]. CI is defined by
\[ CI = \frac{q_{10\%}-q_{99\%}}{q_{1\%}-q_{99\%}} \]
where \( q_{x} \) is the data point where x% of the data points are above that value. Hence, exceedance probabilities are used. Optionally, the FDC mid-segment slope \(FDC_{MSS}\) as used by Shafii et. al (2014) can be returned. The \(FDC_{MSS}\) is defined as
\[ FDC_{MSS} = \log(q_{m_1})-\log(q_{m_2}) \]
where \( m_1 \) and \( m_2 \) are the lowest and highest flow exceedance probabilities within the midsegment of FDC. The settings \(m_1=0.2\) and \(0.7\) are used by Shafii et. al (2014) and are implemented like that. Optionally, the FDC medium high-segment volume \(FDC_{MHSV}\) as used by Shafii et. al (2014) can be returned. The \(FDC_{MHSV}\) is defined as
\[ FDC_{MHSV} = \sum_{h=1}^{H} q_h \]
where \( h=1,2,...,H \) are flow indeces located within the high-flow segment (exceedance probabilities lower than \(m_1\)). \(H\) is the index of the maximum flow. The settings \(m_1=0.2\) is used here to be consistent with the definitions of the low-segment (0.7-1.0) and the mid-segment (0.2-0.7). Optionally, the FDC high-segment volume \(FDC_{HSV}\) as used by Shafii et. al (2014) can be returned. The \(FDC_{HSV}\) is defined as
\[ FDC_{HSV} = \sum_{h=1}^{H} q_h \]
where \( h=1,2,...,H \) are flow indeces located within the high-flow segment (exceedance probabilities lower than \(m_1\)). \(H\) is the index of the maximum flow. The settings \(m_1=0.02\) is used by Shafii et. al (2014) and is implemented like that. Optionally, the FDC low-segment volume \(FDC_{LSV}\) as used by Shafii et. al (2014) can be returned. The \(FDC_{LSV}\) is defined as
\[ FDC_{LSV} = -\sum_{l=1}^{L} (\log(q_l) - \log(q_L)) \]
where \( l=1,2,...,L \) are flow indeces located within the low-flow segment (exceedance probabilities larger than \(m_1\)). \(L\) is the index of the minimum flow. The settings \(m_1=0.7\) is used by Shafii et. al (2014) and is implemented like that. An optional mask of data points can be specified. ADDITIONAL INFORMATION Thresholds in mid_segment_slope, mhigh_segment_volume, high_segment_volume, low_segment_volume are hard coded. FDC is used as hydrologic signature (quantiles not specified) in Euser, T., Winsemius, H. C., Hrachowitz, M., Fenicia, F., Uhlenbrook, S., & Savenije, H. H. G. (2013). A framework to assess the realism of model structures using hydrological signatures. Hydrology and Earth System Sciences, 17(5), 1893-1912. doi:10.5194/hess-17-1893-2013 Concavity Index used as hydrologic signature in Zhang, Y., Vaze, J., Chiew, F. H. S., Teng, J., & Li, M. (2014). Predicting hydrological signatures in ungauged catchments using spatial interpolation, index model, and rainfall-runoff modelling. Journal of Hydrology, 517(C), 936-948. doi:10.1016/j.jhydrol.2014.06.032 Concavity index is defined using exceedance probabilities by Sauquet, E., & Catalogne, C. (2011). Comparison of catchment grouping methods for flow duration curve estimation at ungauged sites in France. Hydrology and Earth System Sciences, 15(8), 2421-2435. doi:10.5194/hess-15-2421-2011 mid_segment_slope, high_segment_volume, low_segment_volume used as hydrologic signature in Shafii, M., & Tolson, B. A. (2015). Optimizing hydrological consistency by incorporating hydrological signatures into model calibration objectives. Water Resources Research, 51(5), 3796-3814. doi:10.1002/2014WR016520
| [in] | real(dp), dimension(:) :: data | data series |
| [in] | real(dp), dimension(:) :: quantiles | Percentages of exceedance (x-axis of FDC) |
| [in] | logical, dimension(:), optional :: mask | mask of data array |
| [out] | real(dp), optional :: concavity_index | concavity index as defined by Sauquet et al. (2011) |
| [out] | real(dp), optional :: mid_segment_slope | mid-segment slope as defined by Shafii et al. (2014) |
| [out] | real(dp), optional :: mhigh_segment_volume | medium high-segment volume |
| [out] | real(dp), optional :: high_segment_volume | high-segment volume as defined by Shafii et al. (2014) |
| [out] | real(dp), optional :: low_segment_volume | low-segment volume as defined by Shafii et al. (2014) |
Definition at line 202 of file mo_mrm_signatures.f90.
References flowdurationcurve().
Referenced by flowdurationcurve(), and mo_mrm_objective_function_runoff::multi_objective_ae_fdc_lsv_nse_djf().
| subroutine, public mo_mrm_signatures::limb_densities | ( | real(dp), dimension(:), intent(in) | data, |
| logical, dimension(size(data, 1)), intent(in), optional | mask, | ||
| real(dp), intent(out), optional | rld, | ||
| real(dp), intent(out), optional | dld ) |
Calculates limb densities.
Calculates rising and declinging limb densities. The peaks of the given series are first determined by looking for points where preceding and subsequent datapoint are lower. Second, the number of datapoints with rising values (nrise) and declining values (ndecline) are counted basically by comparing neighbors. The duration the data increase (nrise) divided by the number of peaks (npeaks) gives the rising limb density RLD
\[ RLD=t_{rise}/n_{peak} \]
whereas the duration the data decrease (ndecline) divided by the number of peaks (npeaks) gives the declining limb density DLD
\[ DLD=t_{fall}/n_{peak}. \]
An optional mask of data points can be specified. ADDITIONAL INFORMATION Rising limb density used as hydrologic signature in Euser, T., Winsemius, H. C., Hrachowitz, M., Fenicia, F., Uhlenbrook, S., & Savenije, H. H. G. (2013). A framework to assess the realism of model structures using hydrological signatures. Hydrology and Earth System Sciences, 17(5), 1893-1912. doi:10.5194/hess-17-1893-2013
| [in] | real(dp), dimension(:) :: data | data series |
| [in] | logical, dimension(size(data, 1)), optional :: mask | mask for data series |
| [out] | real(dp), optional :: RLD | rising limb density |
| [out] | real(dp), optional :: DLD | declining limb density |
Definition at line 342 of file mo_mrm_signatures.f90.
| real(dp) function mo_mrm_signatures::maximummonthlyflow | ( | real(dp), dimension(:), intent(in) | data, |
| logical, dimension(size(data, 1)), intent(in), optional | mask, | ||
| integer(i4), intent(in), optional | yr_start, | ||
| integer(i4), intent(in), optional | mo_start, | ||
| integer(i4), intent(in), optional | dy_start ) |
Maximum of average flows per months.
Maximum of average flow per month is defined as
\[ max_{monthly flow} = Max( F(i), i=1,..12 ) \]
where $f F(i) $\f is the average flow of month i. ADDITIONAL INFORMATION used as hydrologic signature in Shafii, M., & Tolson, B. A. (2015). Optimizing hydrological consistency by incorporating hydrological signatures into model calibration objectives. Water Resources Research, 51(5), 3796-3814. doi:10.1002/2014WR016520
| [in] | real(dp), dimension(:) :: data | array of data |
| [in] | logical, dimension(size(data, 1)), optional :: mask | mask for data points given |
| [in] | integer(i4), optional :: yr_start | year of date of first data point given |
| [in] | integer(i4), optional :: mo_start | month of date of first data point given (default: 1) |
| [in] | integer(i4), optional :: dy_start | month of date of first data point given (default: 1) |
Definition at line 511 of file mo_mrm_signatures.f90.
References maximummonthlyflow().
Referenced by maximummonthlyflow().
| subroutine, public mo_mrm_signatures::moments | ( | real(dp), dimension(:), intent(in) | data, |
| logical, dimension(size(data, 1)), intent(in), optional | mask, | ||
| real(dp), intent(out), optional | mean_data, | ||
| real(dp), intent(out), optional | stddev_data, | ||
| real(dp), intent(out), optional | median_data, | ||
| real(dp), intent(out), optional | max_data, | ||
| real(dp), intent(out), optional | mean_log, | ||
| real(dp), intent(out), optional | stddev_log, | ||
| real(dp), intent(out), optional | median_log, | ||
| real(dp), intent(out), optional | max_log ) |
Moments of data and log-transformed data, e.g.
mean and standard deviation.
Returns several moments of data series given, i.e.
| [in] | real(dp), dimension(:) :: data | array of data |
| [in] | logical, dimension(size(data, 1)), optional :: mask | mask for data points given |
| [out] | real(dp), optional :: mean_data | mean of data |
| [out] | real(dp), optional :: stddev_data | standard deviation of data |
| [out] | real(dp), optional :: median_data | median of data |
| [out] | real(dp), optional :: max_data | maximum/ peak of data |
| [out] | real(dp), optional :: mean_log | mean of log-transformed data |
| [out] | real(dp), optional :: stddev_log | standard deviation of log-transformed data |
| [out] | real(dp), optional :: median_log | median of log-transformed data |
| [out] | real(dp), optional :: max_log | maximum/ peak of log-transformed dataWorks only with 1d double precision input data. |
Definition at line 654 of file mo_mrm_signatures.f90.
| real(dp) function, dimension(size(quantiles, 1)), public mo_mrm_signatures::peakdistribution | ( | real(dp), dimension(:), intent(in) | data, |
| real(dp), dimension(:), intent(in) | quantiles, | ||
| logical, dimension(size(data, 1)), intent(in), optional | mask, | ||
| real(dp), intent(out), optional | slope_peak_distribution ) |
Calculates the peak distribution.
First, the peaks of the time series given are identified. For the peak distribution only this subset of data points are considered. Second, the peak distribution at the quantiles given is calculated. Calculates the peak distribution at the quantiles given using mo_percentile. Since the exceedance probabilities are usually used in hydrology the function percentile is used with (1.0-quantiles). Optionally, the slope of the peak distribution between 10th and 50th percentile, i.e.
\[ slope = \frac{\mathrm{peak\_{data}}_{0.1}-\mathrm{peak\_{data}}_{0.5}}{0.9-0.5} \]
can be returned. An optional mask for the data points can be given. ADDITIONAL INFORMATION slope_peak_distribution used as hydrologic signature in Euser, T., Winsemius, H. C., Hrachowitz, M., Fenicia, F., Uhlenbrook, S., & Savenije, H. H. G. (2013). A framework to assess the realism of model structures using hydrological signatures. Hydrology and Earth System Sciences, 17(5), 1893-1912. doi:10.5194/hess-17-1893-2013
| [in] | real(dp), dimension(:) :: data | data array |
| [in] | real(dp), dimension(:) :: quantiles | requested quantiles for distribution |
| [in] | logical, dimension(size(data, 1)), optional :: mask | mask of data array |
| [out] | real(dp), optional :: slope_peak_distribution | slope of the Peak distribution between10th and 50th percentile |
Definition at line 780 of file mo_mrm_signatures.f90.
References peakdistribution().
Referenced by peakdistribution().
| real(dp) function, public mo_mrm_signatures::runoffratio | ( | real(dp), dimension(:), intent(in) | data, |
| real(dp), intent(in) | domain_area, | ||
| logical, dimension(size(data, 1)), intent(in), optional | mask, | ||
| real(dp), dimension(size(data, 1)), intent(in), optional | precip_series, | ||
| real(dp), intent(in), optional | precip_sum, | ||
| logical, intent(in), optional | log_data ) |
Runoff ratio (accumulated daily discharge [mm/d] / accumulated daily precipitation [mm/d]).
The runoff ratio is defined as
\[ runoff_ratio = \frac{\sum_{t=1}^{N} q_t}{\sum_{t=1}^{N} p_t}\]
where \(p_t\) and \(q_t\) are precipitation and discharge, respectively. Therefore, precipitation over the entire domain is required and both discharge and precipitation have to be converted to the same units [mm/d]. Input discharge is given in [m**3/s] as this is mHM default while precipitation has to be given in [mm/km**2 / day]. Either "precip_sum" or "precip_series" has to be specified. If "precip_series" is used the optional mask is also applied to precipitation values. The "precip_sum" is the accumulated "precip_series". Optionally, a mask for the data (=discharge) can be given. If optional "log_data" is set to .true. the runoff ratio will be calculated as
\[ runoff\_ratio = \frac{\sum_{t=1}^{N} \log(q_t)}{\sum_{t=1}^{N} p_t}\]
where \(p_t\) and \(q_t\) are precipitation and discharge, respectively. ADDITIONAL INFORMATION
| [in] | real(dp), dimension(:) :: data | array of data [m**3/s] |
| [in] | real(dp) :: domain_area | area of domain [km**2] |
| [in] | logical, dimension(size(data, 1)), optional :: mask | mask for data points given |
| [in] | real(dp), dimension(size(data, 1)), optional :: precip_series | daily precipitation values [mm/km**2 / day] |
| [in] | real(dp), optional :: precip_sum | sum of daily precip. values of whole period[mm/km**2 / day] |
| [in] | logical, optional :: log_data | ratio using logarithmic dataWorks only with 1d double precision input data. |
Definition at line 917 of file mo_mrm_signatures.f90.
References runoffratio().
Referenced by runoffratio().
| real(dp) function, public mo_mrm_signatures::zeroflowratio | ( | real(dp), dimension(:), intent(in) | data, |
| logical, dimension(size(data, 1)), intent(in), optional | mask ) |
Ratio of zero values to total number of data points.
An optional mask of data points can be specified. ADDITIONAL INFORMATION
| [in] | real(dp), dimension(:) :: data | array of data |
| [in] | logical, dimension(size(data, 1)), optional :: mask | mask for data points givenWorks only with 1d double precision input data. |
Definition at line 1033 of file mo_mrm_signatures.f90.
References zeroflowratio().
Referenced by zeroflowratio().