Commit d9bfe2c7 authored by Niklas Selke's avatar Niklas Selke
Browse files

Added a check if the 'drmdmax1h' statistic is given together with a 'monthly' sampling.

parent 133660a2
......@@ -93,9 +93,15 @@ def calculate_statistics(
``metadata`` argument
:param station_climatic_zone: station's climatic zone, used if
missing in the ``metadata`` argument
:raises ValueError: raised if there is any problem with any of the
given user inputs
"""
sampling_method = check_sampling(sampling)
stats_list = check_statistics(statistics)
if "drmdmax1h" in stats_list and sampling_method == "monthly":
raise ValueError("The drmdmax1h statistic cannot be evaluated with"
" monthly sampling")
data_frame = check_data(data, datetimes, values)
metadata_tuple = check_metadata(metadata, station_lat, station_lon,
station_climatic_zone)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment