Crandore Hub

sarp.snowprofile.pyface

'python' Modules from Snowpack and Avalanche Research

The development of post-processing functionality for simulated snow profiles by the snow and avalanche community is often done in 'python'. This package aims to make some of these tools accessible to 'R' users. Currently integrated modules contain functions to calculate dry snow layer instabilities in support of avalache hazard assessments following the publications of Richter, Schweizer, Rotach, and Van Herwijnen (2019) <doi:10.5194/tc-13-3353-2019>, and Mayer, Van Herwijnen, Techel, and Schweizer (2022) <doi:10.5194/tc-2022-34>.

README

# Package installation on a HPC cluster with python managed by pip

While the python installation and management through `reticulate` is per default managed via Miniconda,
high performance computing facilities (such as Compute Canada cluster 'cedar') ask users not to
install Miniconda, but use `pip` and standard virtual python environments instead.
In this case, users need to manually create a virtual environment that satisfies the python
dependencies of this R package (i.e., listed in the DESCRIPTION file).

A suitable environment `py-snowpack` can be created on cedar as follows:

```
module load python/3.7
module load scipy-stack/2021a  # contains numpy, pandas, etc
virtualenv --no-download py-snowpack  # creates the virtual environment 'py-snowpack' in $HOME directory
source py-snowpack/bin/activate  # activates environment
pip install --no-index --upgrade pip
pip install joblib --no-index
pip install scikit-learn==0.22.1 --no-index  # specific version!
deactivate
```

To use this specific virtual environment in your R session and by this R package,
the requirements to activating the environment need to be called in a job (bash) script,

```
module load python/3.7
module load scipy-stack/2021a 
```

and the following line should be included in your R script to direct `reticulate` to your environment 

```
library(sarp.snowprofile.pyface)
reticulate::use_virtualenv("~/py-snowpack")  # use the path to the virtual environment installed above
```

Versions across snapshots

VersionRepositoryFileSize
0.4.3 rolling linux/jammy R-4.5 sarp.snowprofile.pyface_0.4.3.tar.gz 748.5 KiB
0.4.3 rolling linux/noble R-4.5 sarp.snowprofile.pyface_0.4.3.tar.gz 748.4 KiB
0.4.3 rolling source/ R- sarp.snowprofile.pyface_0.4.3.tar.gz 738.6 KiB
0.4.3 latest linux/jammy R-4.5 sarp.snowprofile.pyface_0.4.3.tar.gz 748.5 KiB
0.4.3 latest linux/noble R-4.5 sarp.snowprofile.pyface_0.4.3.tar.gz 748.4 KiB
0.4.3 latest source/ R- sarp.snowprofile.pyface_0.4.3.tar.gz 738.6 KiB
0.4.3 2026-04-26 source/ R- sarp.snowprofile.pyface_0.4.3.tar.gz 738.6 KiB
0.4.3 2026-04-23 source/ R- sarp.snowprofile.pyface_0.4.3.tar.gz 738.6 KiB
0.4.3 2026-04-09 windows/windows R-4.5 sarp.snowprofile.pyface_0.4.3.zip 756.8 KiB
0.1.3 2025-04-20 source/ R- sarp.snowprofile.pyface_0.1.3.tar.gz 413.1 KiB

Dependencies (latest)

Depends

Imports