Python implementation of the deltaSNOW model by Winkler et al. 2021:
Winkler, M., Schellander, H., and Gruber, S.: Snow water equivalents exclusively from snow depths and their temporal changes: the DeltaSNOW model, Hydrol. Earth Syst. Sci., 25, 1165-1187, 10.5194/hess-25-1165-2021, 2021.
The original implementation is included within the nixmass R package of Winkler et al 2021. Differences of this version to the original R version are the following:
The model accepts breaks in the date series if a break is sourrounded by zeros. Additionally, breaks in the date series can be accepted if surrounded by NaNs. See below for more information. This behaviour can be useful for measurement series that are not continued in summer.
The user can specify how to deal with missing values in a measurement series. There are three parameters that control NaN handling:
ignore_zeropadded_gaps
ignore_zerofollowed_gaps
interpolate_small_gaps
Note that the runtime efficiency of the model will decrease when one or several of these options are turnded on.
Accepts as input data only a pd.Series with pd.DatetimeIndex and no dataframe.
The time resolution (timestep in R implementation) will be automatically sniffed from the DatetimeIndex of the input series.
The user can specify the input and output units of the HS and SWE measurement series, respectively.
A pd.Series with the dates as pd.DatetimeIndex is returned.
The core of this code is mainly based on the work of Manuel Theurl, this version makes use of the numba just-in-time compiler for performance optimization.
The package is tested on python versions 3.7, 3.8 and 3.9. Higher python versions
might work too but are not tested. pydeltasnow
depends on the following packages:
Install pydeltasnow
and its dependencies by runnig:
pip install pydeltasnow
For examples on how to use the package, please have a look at the documentation of this project.