radproc.heavyrain.duration_sum

radproc.heavyrain.duration_sum(inHDFFile, D, year_start, year_end, outHDFFile, complevel=9)

Calculate duration sum (Dauerstufe) of a defined time window D. The output time series will have the same frequency as the input data, but will contain the rolling sum of the defined time window with the label on the right, e.g. for D = 15 the time step at 10:15 contains the precipitation sum from 10:00 until 10:15 o’clock. Calculation can only be carried out for entire years since time windows between consecutive months are considered and included in calculations. Output data will be saved in a new HDF5 file with the same monthly structure as the input data. Consequently, the duration sum data can be loaded and processed with the same functions as the other precipitation data stored in HDF5.

Parameters:
inHDFFile : string
Path and name of the input HDF5 file containing precipitation data with a temporal resolution of 5 minutes.
D : integer
Duration (length of time window) in minutes. Value must be divisible by 5.
year_start : integer
First year for which duration sums are to be calculated.
year_end : integer
Last year for which duration sums are to be calculated.
outHDFFile : string
Path and name of the output HDF5 file. If the specified HDF5 file already exists, the new dataset will be appended; if the HDF5 file doesn’t exist, it will be created.
complevel : integer (optional, default: 9)
defines the level of compression for the output HDF5 file. complevel may range from 0 to 9, where 9 is the highest compression possible. Using a high compression level reduces data size significantly, but writing data to HDF5 takes more time and data import from HDF5 is slighly slower.
Returns:
No return value