PySDM

Pythonic particle-based warm-rain/aqueous-chemistry cloud microphysics package.
https://github.com/open-atmos/PySDM

Category: Atmosphere
Sub Category: Atmospheric Chemistry and Aerosol

Keywords

atmospheric-modelling atmospheric-physics cuda gpu gpu-computing monte-carlo-simulation numba nvrtc particle-system physics-simulation pint pypi-package python research simulation thrust

Keywords from Contributors

atmospheric-sciences cloud-microphysics advection advection-diffusion numerical-integration pde-solver aerosol-microphysics aerosol-science condensation particle-in-cell

Last synced: 1 minute ago
JSON representation

Repository metadata

Pythonic particle-based (super-droplet) cloud microphysics (and aqueous-chemistry) package with box, parcel & 1D/2D prescribed-flow examples in Python, Julia and Matlab

README.md

Python 3
LLVM
CUDA
Linux OK
macOS OK
Windows OK
Jupyter
Maintenance
OpenHub
status
DOI
Ask DeepWiki
EU Funding
PL Funding
US Funding

License: GPL v3

Github Actions Build Status
Coverage Status
PyPI version
API docs

PySDM is a package for simulating the dynamics of population of particles.
It is intended to serve as a building block for simulation systems modelling
fluid flows involving a dispersed phase,
with PySDM being responsible for representation of the dispersed phase.
Currently, the development is focused on atmospheric cloud physics
applications, in particular on modelling the dynamics of particles immersed in moist air
using the particle-based (a.k.a. super-droplet) approach
to represent aerosol/cloud/rain microphysics.
The package features a Pythonic high-performance implementation of the
Super-Droplet Method (SDM) Monte-Carlo algorithm for representing collisional growth
(Shima et al. 2009), hence the name.

PySDM documentation is maintained at: https://open-atmos.github.io/PySDM

There is a growing set of example Jupyter notebooks exemplifying how to perform
various types of calculations and simulations using PySDM.
Most of the example notebooks reproduce results and plot from literature, see below for
a list of examples and links to the notebooks (which can be either executed or viewed
"in the cloud").

There are also a growing set of tutorials, also in the form of Jupyter notebooks.
These tutorials are intended for teaching purposes and include short explanations of cloud microphysical
concepts paired with widgets for running interactive simulations using PySDM.
Each tutorial also comes with a set of questions at the end that can be used as homework problems.
Like the examples, these tutorials can be executed or viewed "in the cloud" making it an especially
easy way for students to get started.

PySDM has two alternative parallel number-crunching backends
available: multi-threaded CPU backend based on Numba
and GPU-resident backend built on top of ThrustRTC.
The Numba backend (aliased CPU) features multi-threaded parallelism for
multi-core CPUs, it uses the just-in-time compilation technique based on the LLVM infrastructure.
The ThrustRTC backend (aliased GPU) offers GPU-resident operation of PySDM
leveraging the SIMT
parallelisation model.
Using the GPU backend requires nVidia hardware and CUDA driver.

For an overview of PySDM features (and the preferred way to cite PySDM in papers), please refer to our JOSS papers:

PySDM includes an extension of the SDM scheme to represent collisional breakup described in de Jong, Mackay et al. 2023.
For a list of talks and other materials on PySDM as well as a list of published papers featuring PySDM simulations, see the project wiki.

Dependencies and Installation

PySDM dependencies are: Numpy, Numba, SciPy,
Pint, chempy,
pyevtk,
ThrustRTC and CURandRTC.

To install PySDM using pip, use: pip install PySDM
(or pip install git+https://github.com/open-atmos/PySDM.git to get updates
beyond the latest release).

Conda users may use pip as well, see the Installing non-conda packages section in the conda docs.

For development purposes, we suggest cloning the repository and installing it using pip -e.
Test-time dependencies can be installed with pip -e .[tests].

PySDM examples constitute the PySDM-examples package.
The examples have additional dependencies listed in PySDM_examples package pyproject.toml file.
Running the example Jupyter notebooks requires the PySDM_examples package to be installed.
The suggested install and launch steps are:

git clone https://github.com/open-atmos/PySDM.git
pip install -e PySDM
pip install -e PySDM/examples
jupyter-notebook PySDM/examples/PySDM_examples

Alternatively, one can also install the examples package from pypi.org by
using pip install PySDM-examples (note that this does not apply to notebooks itself,
only the supporting .py files).

Contributing, reporting issues, seeking support

Our technologicial stack:

Python 3
Numba
LLVM
CUDA
NumPy
pytest
Colab
Codecov
PyPI
GithubActions
Jupyter
PyCharm

Submitting new code to the project, please preferably use GitHub pull requests - it helps to keep record of code authorship,
track and archive the code review workflow and allows to benefit
from the continuous integration setup which automates execution of tests
with the newly added code.

Code contributions are assumed to imply transfer of copyright.
Should there be a need to make an exception, please indicate it when creating
a pull request or contributing code in any other way. In any case,
the license of the contributed code must be compatible with GPL v3.

Developing the code, we follow The Way of Python and
the KISS principle.
The codebase has greatly benefited from PyCharm code inspections
and Pylint, Black and isort
code analysis (which are all part of the CI workflows).

We also use pre-commit hooks.
In our case, the hooks modify files and re-format them.
The pre-commit hooks can be run locally, and then the resultant changes need to be staged before committing.
To set up the hooks locally, install pre-commit via pip install pre-commit and
set up the git hooks via pre-commit install (this needs to be done every time you clone the project).
To run all pre-commit hooks, run pre-commit run --all-files.
The .pre-commit-config.yaml file can be modified in case new hooks are to be added or
existing ones need to be altered.

Further hints addressed at PySDM developers are maintained in the open-atmos/python-dev-hints Wiki
and in PySDM HOWTOs.

Issues regarding any incorrect, unintuitive or undocumented bahaviour of
PySDM are best to be reported on the GitHub issue tracker.
Feature requests are recorded in the "Ideas..." PySDM wiki page.

We encourage to use the GitHub Discussions feature
(rather than the issue tracker) for seeking support in understanding, using and extending PySDM code.

We look forward to your contributions and feedback.

Licensing:

copyright: Jagiellonian University (2019-2023) & AGH University of Krakow (2023-...)
licence: GPL v3


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: about 7 hours ago

Total Commits: 3,325
Total Committers: 41
Avg Commits per committer: 81.098
Development Distribution Score (DDS): 0.399

Commits in past year: 137
Committers in past year: 10
Avg Commits per committer in past year: 13.7
Development Distribution Score (DDS) in past year: 0.606

Name Email Commits
Sylwester Arabas s****s@u****l 1998
prbartman p****n@g****m 616
edejong-caltech e****g@c****u 163
dependabot[bot] 4****] 113
claresinger c****r@c****u 77
AgnieszkaZaba 5****a 74
Michaeldz36 o****l@g****m 67
Oleksii Bulenok 6****k 62
Ben Mackay j****y@c****u 20
claresinger c****s@g****m 18
Emily K. de Jong e****g@l****r 18
Sajjad Azimi a****i@c****u 14
Sanky 7****e 12
Emily de Jong e****g@E****l 11
Aleksandra Strząbała 1****z 8
Tim Lüttmer 1****m 7
tehAgitto k****3@g****m 4
Paweł Magnuszewski 4****u 4
Emma Ware e****e@u****u 4
Emily de Jong e****g@E****n 4
edejong-caltech e****g@l****r 4
Alicja a****a@c****l 3
Sfonxu 8****u 3
Anna Jaruga a****a@c****u 2
Brady Bhalla 3****a 2
Kacper Mazur 1****k 2
The Codacy Badger b****r@c****m 1
edejong-caltech e****g@h****r 1
edejong-caltech e****g@h****r 1
Bartosz Piasecki m****r@g****m 1
and 11 more...

Committer domains:


Issue and Pull Request metadata

Last synced: about 7 hours ago

Total issues: 324
Total pull requests: 801
Average time to close issues: 11 months
Average time to close pull requests: 26 days
Total issue authors: 21
Total pull request authors: 33
Average comments per issue: 4.1
Average comments per pull request: 1.58
Merged pull request: 525
Bot issues: 0
Bot pull requests: 112

Past year issues: 20
Past year pull requests: 91
Past year average time to close issues: 5 months
Past year average time to close pull requests: 12 days
Past year issue authors: 4
Past year pull request authors: 11
Past year average comments per issue: 0.8
Past year average comments per pull request: 1.41
Past year merged pull request: 32
Past year bot issues: 0
Past year bot pull requests: 36

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/open-atmos/PySDM

Top Issue Authors

  • slayoo (229)
  • AgnieszkaZaba (31)
  • abulenok (13)
  • claresinger (10)
  • tluettm (10)
  • edejong-caltech (5)
  • emmacware (3)
  • jbarr444 (3)
  • TomMelt (2)
  • jtbuch (2)
  • bradybhalla (2)
  • piotrbartman (2)
  • bhiogade (2)
  • olastrz (2)
  • Bodzio-2 (2)

Top Pull Request Authors

  • slayoo (381)
  • AgnieszkaZaba (116)
  • dependabot[bot] (112)
  • bhiogade (35)
  • abulenok (19)
  • claresinger (19)
  • tluettm (17)
  • olastrz (17)
  • Sfonxu (15)
  • emmacware (10)
  • edejong-caltech (9)
  • pawelmagnu (8)
  • piotrbartman (5)
  • NeKo2903 (4)
  • SecondGlanceFromAlice (4)

Top Issue Labels

  • no-issue-activity (45)
  • breakup (24)
  • no-activity (23)
  • good first issue (12)
  • documentation (10)
  • GPU (10)
  • isotopes (9)
  • examples (8)
  • devops-tests (7)
  • condensation (6)
  • enhancement (5)
  • ice (4)
  • CI (4)
  • bug (3)
  • cleanup (3)
  • idea (3)
  • regression (2)
  • high-impact-for-LOC (2)
  • help wanted (1)
  • VTK (1)
  • macOS (1)
  • no-code (1)
  • Binder (1)
  • coalescence (1)
  • windows (1)
  • performance (1)
  • ventilation (1)
  • BSc-project (1)
  • HOWTOs (1)
  • ubuntu (1)

Top Pull Request Labels

  • dependencies (112)
  • python (65)
  • isotopes (20)
  • examples (15)
  • github_actions (13)
  • no-pr-activity (11)
  • ice (10)
  • CI (9)
  • do-not-close-without-a-new-test (5)
  • no-activity (4)
  • in-progress (4)
  • condensation (4)
  • bug (3)
  • priority-low (2)
  • VTK (2)
  • documentation (2)
  • help wanted (2)
  • breakup (2)
  • ventilation (2)
  • regression (2)
  • cleanup (2)
  • enhancement (1)
  • formulae (1)
  • priority-high (1)
  • backends (1)
  • coalescence (1)
  • box/parcel envs (1)
  • HOWTOs (1)

Package metadata

proxy.golang.org: github.com/open-atmos/pysdm

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/open-atmos/pysdm#section-documentation
  • Licenses: gpl-3.0
  • Latest release: v3.0.0-pre.37+incompatible (published about 2 months ago)
  • Last Synced: 2026-08-10T00:37:14.353Z (about 20 hours ago)
  • Versions: 36
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 5.302%
    • Average: 5.48%
    • Dependent repos count: 5.659%
proxy.golang.org: github.com/open-atmos/PySDM

  • Homepage:
  • Documentation: https://pkg.go.dev/github.com/open-atmos/PySDM#section-documentation
  • Licenses: gpl-3.0
  • Latest release: v3.0.0-pre.37+incompatible (published about 2 months ago)
  • Last Synced: 2026-08-10T00:37:15.412Z (about 20 hours ago)
  • Versions: 36
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Rankings:
    • Dependent packages count: 5.302%
    • Average: 5.48%
    • Dependent repos count: 5.659%
pypi.org: pysdm

Pythonic particle-based (super-droplet) warm-rain/aqueous-chemistry cloud microphysics package with box, parcel & 1D/2D prescribed-flow examples in Python, Julia and Matlab

  • Homepage:
  • Documentation: https://open-atmos.github.io/PySDM
  • Licenses: GPL-3.0-only
  • Latest release: 3.0.0rc37 (published about 2 months ago)
  • Last Synced: 2026-08-10T00:37:13.748Z (about 20 hours ago)
  • Versions: 182
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 923 Last month
  • Rankings:
    • Dependent packages count: 3.271%
    • Downloads: 6.056%
    • Forks count: 7.602%
    • Average: 9.813%
    • Stargazers count: 9.902%
    • Dependent repos count: 22.233%
  • Maintainers (2)
pypi.org: pysdm-examples

PySDM usage examples reproducing results from literature and depicting how to use PySDM from Python Jupyter notebooks

  • Homepage: https://github.com/open-atmos/PySDM
  • Documentation: https://open-atmos.github.io/PySDM/PySDM_examples
  • Licenses: GPL-3.0
  • Latest release: 3.0.0rc37 (published about 2 months ago)
  • Last Synced: 2026-08-10T00:37:13.656Z (about 20 hours ago)
  • Versions: 180
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 539 Last month
  • Rankings:
    • Dependent packages count: 10.108%
    • Forks count: 10.158%
    • Downloads: 12.887%
    • Average: 14.822%
    • Stargazers count: 19.377%
    • Dependent repos count: 21.581%
  • Maintainers (2)

Dependencies

.github/workflows/cancel.yml actions
  • styfle/cancel-workflow-action 0.9.1 composite
.github/workflows/stale.yml actions
  • actions/stale v3 composite
setup.py pypi
  • CURandRTC *
  • Pint *
  • ThrustRTC ==0.3.20
  • chempy *
  • numba *
  • numpy *
  • pyevtk *
  • scipy *
examples/pyproject.toml pypi
.binder/requirements.txt pypi
  • PySDM-examples *
examples/setup.py pypi
  • PyMPDATA *
  • PySDM *
  • ghapi *
  • ipywidgets *
  • joblib *
  • matplotlib *
  • open-atmos-jupyter-utils *
  • pystrict *
  • seaborn *
pyproject.toml pypi
.github/actions/env-setup/action.yml actions
  • ./.github/actions/set-pip-path-and-cache-key * composite
  • actions/cache v4 composite
  • actions/cache/restore v4 composite
  • actions/cache/save v4 composite
  • actions/checkout v4.1.6 composite
  • actions/setup-python v5.0.0 composite
.github/workflows/pdoc.yml actions
  • JamesIves/github-pages-deploy-action v4.8.0 composite
  • actions/checkout v4.1.6 composite
  • actions/setup-python v6.2.0 composite
.github/workflows/pypi.yml actions
  • actions/checkout v4.1.6 composite
  • actions/download-artifact v8 composite
  • actions/setup-python v6.2.0 composite
  • actions/upload-artifact v7 composite
  • pypa/gh-action-pypi-publish release/v1.14 composite
.github/workflows/urlcheck.yml actions
  • actions/checkout v4.1.6 composite
  • urlstechie/urlchecker-action master composite
.github/workflows/precommit.yml actions
  • actions/checkout v4.1.6 composite
  • actions/setup-python v6.2.0 composite
.github/workflows/tutorial_code.yml actions
  • actions/checkout v4.1.6 composite
  • actions/setup-python v6.2.0 composite
  • eine/tip master composite
  • julia-actions/setup-julia v3 composite
  • matlab-actions/run-command v3.1.1 composite
  • matlab-actions/setup-matlab v3.0.1 composite
.github/workflows/tests.yml actions
  • ./.github/actions/env-setup * composite
  • actions/checkout v4.1.6 composite
  • actions/upload-artifact v7 composite
  • codecov/codecov-action v6.0.1 composite
  • eine/tip master composite
  • pyvista/setup-headless-display-action v4 composite
.github/actions/set-pip-path-and-cache-key/action.yml actions

Score: 16.809681813763778