Module Reference

Main module

This module provides the main user interface to the deltaSNOW model with the swe_delatsnow() function.

swe_deltasnow(data[, rho_max, rho_null, ...])

Calculate snow water equivalent from a snow depth timeseries with the DeltaSNOW model.

Utils

This module contains utility functions for missing value handling and daterange continuity validation.

continuous_timedeltas(dr)

Check for continuity on dates

continuous_timedeltas_in_nonzero_chunks(dr, ...)

Check that every non-zero HS chunk has continuous dates and same resolution.

fill_small_gaps(Hobs, dates, max_gap_length)

Interpolate small gaps in Hobs.

get_nonzero_chunk_idxs(Hobs)

Return start and stop indices of consecutive nonzero chunks in Hobs.

get_small_gap_idxs(Hobs, dates, max_gap_length)

Create a boolean mask for valid small gaps.

get_zeropadded_gap_idxs(Hobs, ...)

Get indices of Nan data-gaps in Hobs that are surrounded or followed by zeros.

Core module

Core of the DeltaSNOW model. This module provides the public function deltasnow_snowpack_evolution() which implements the algorithm of the deltaSNOW model with numba but does not validate input data. Users are discouraged to use this function and should rather use the pydeltasnow.main.swe_deltasnow() function instead.

Significant parts of the code in this module are based on the work of Manuel Theurl: https://github.com/manueltheurl/snow_to_swe

deltasnow_snowpack_evolution(Hobs, rho_max, ...)

This is the main loop in the delta snow model.