Abstract. Glacial changes play a key role both from a socio-economical and political, and scientific point of view. The identification and the understanding of the nature of these changes still poses fundamental challenges for climate, glacier and water research. Many studies aim to identify the climatic drivers behind the observed glacial changes using distributed surface mass and energy balance models. Distributed surface mass balance models, which translate the meteorological conditions on glaciers into local melting rates, thus offer the possibility to attribute and detect glacier mass and volume responses to changes in the climatic forcings. A well calibrated model is a suitable test-bed for sensitivity, detection and attribution analyses for many scientific applications and often serves as a tool for quantifying the inherent uncertainties. Here we present the open-source coupled snowpack and ice surface energy and mass balance model in Python COSIPY, which provides a lean, flexible and user-friendly framework for modelling distributed snow and glacier mass changes. The model has a modular structure so that the exchange of routines or parameterizations of physical processes is possible with little effort for the user. The model has a modular structure so that the exchange of routines or parameterizations of physical processes is possible with little effort for the user. The framework consists of a computational kernel, which forms the runtime environment and takes care of the initialization, the input-output routines, the parallelization as well as the grid and data structures. This structure offers maximum flexibility without having to worry about the internal numerical flow. The adaptive sub-surface scheme allows an efficient and fast calculation of the otherwise computationally demanding fundamental equations. The surface energy-balance scheme uses established standard parameterizations for radiation as well as for the energy exchange between atmosphere and surface. The schemes are coupled by solving both surface energy balance and subsurface fluxes iteratively in such that consistent surface skin temperature is returned at the interface. COSIPY uses a one-dimensional approach limited to the vertical fluxes of energy and matter but neglects any lateral processes. Accordingly, the model can be easily set up in parallel computational environments for calculating both energy balance and climatic surface mass balance of glacier surfaces based on flexible horizontal grids and with varying temporal resolution. The model is made available on a freely accessible site and can be used for non-profit purposes. Scientists are encouraged to actively participate in the extension and improvement of the model code.