A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

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 particle-simulation condensation particle-in-cell aerosol-microphysics aerosol-science cloud-microphysics smoluchowski measur animals

Last synced: about 17 hours ago
JSON representation

Repository metadata

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

README.md

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

License: GPL v3

Github Actions Build Status
Appveyor 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. Dependencies of PySDM are available at the following conda channels:

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 setup.py 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: 6 days ago

Total Commits: 3,124
Total Committers: 35
Avg Commits per committer: 89.257
Development Distribution Score (DDS): 0.383

Commits in past year: 152
Committers in past year: 12
Avg Commits per committer in past year: 12.667
Development Distribution Score (DDS) in past year: 0.375

Name Email Commits
Sylwester Arabas s****s@u****l 1928
prbartman p****n@g****m 616
edejong-caltech e****g@c****u 163
claresinger c****r@c****u 77
Michaeldz36 o****l@g****m 67
Oleksii Bulenok 6****k 62
dependabot[bot] 4****] 51
AgnieszkaZaba 5****a 31
Ben Mackay j****y@c****u 20
Emily K. de Jong e****g@l****r 18
claresinger c****s@g****m 18
Sajjad Azimi a****i@c****u 14
Sanky 7****e 12
Emily de Jong e****g@E****l 11
tehAgitto k****3@g****m 4
Paweł Magnuszewski 4****u 4
Emily de Jong e****g@E****n 4
edejong-caltech e****g@l****r 4
olastrz 1****z 2
Anna Jaruga a****a@c****u 2
Brady Bhalla 3****a 2
AgnieszkaMakulska 8****a 1
Boris Ivanov b****v@o****m 1
edejong-caltech e****g@h****r 1
edejong-caltech e****g@h****r 1
Bartosz Piasecki m****r@g****m 1
Jatan Buch j****5@c****u 1
Kaitlyn Loftus 5****s 1
Michael Olesik 4****6 1
NeKo2903 9****3 1
and 5 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 279
Total pull requests: 423
Average time to close issues: 12 months
Average time to close pull requests: 27 days
Total issue authors: 19
Total pull request authors: 25
Average comments per issue: 5.1
Average comments per pull request: 1.54
Merged pull request: 298
Bot issues: 0
Bot pull requests: 45

Past year issues: 77
Past year pull requests: 207
Past year average time to close issues: about 1 month
Past year average time to close pull requests: 10 days
Past year issue authors: 9
Past year pull request authors: 14
Past year average comments per issue: 1.86
Past year average comments per pull request: 1.68
Past year merged pull request: 149
Past year bot issues: 0
Past year bot pull requests: 21

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

Top Issue Authors

  • slayoo (211)
  • abulenok (15)
  • AgnieszkaZaba (14)
  • claresinger (10)
  • edejong-caltech (5)
  • jtbuch (3)
  • tluettm (3)
  • jbarr444 (3)
  • TomMelt (2)
  • bhiogade (2)
  • piotrbartman (2)
  • bradybhalla (2)
  • mikhailmints (1)
  • kaitlyn-loftus (1)
  • jbarr44 (1)

Top Pull Request Authors

  • slayoo (225)
  • AgnieszkaZaba (48)
  • dependabot[bot] (45)
  • bhiogade (23)
  • abulenok (19)
  • claresinger (12)
  • edejong-caltech (8)
  • Sfonxu (7)
  • tluettm (6)
  • olastrz (5)
  • pawelmagnu (5)
  • piotrbartman (3)
  • NeKo2903 (2)
  • pb475 (2)
  • bradybhalla (2)

Top Issue Labels

  • no-issue-activity (33)
  • breakup (26)
  • GPU (19)
  • documentation (13)
  • good first issue (12)
  • condensation (10)
  • examples (10)
  • cleanup (8)
  • devops-tests (7)
  • no-activity (7)
  • enhancement (5)
  • CI (4)
  • VTK (3)
  • idea (2)
  • isotopes (2)
  • dependencies (2)
  • bug (2)
  • high-impact-for-LOC (2)
  • test-improvement (2)
  • help wanted (2)
  • performance (1)
  • BSc-project (1)
  • regression (1)
  • macOS (1)
  • ventilation (1)
  • HOWTOs (1)
  • ubuntu (1)
  • windows (1)
  • Binder (1)
  • ice (1)

Top Pull Request Labels

  • dependencies (45)
  • python (15)
  • isotopes (9)
  • examples (7)
  • no-activity (6)
  • no-pr-activity (5)
  • ice (4)
  • do-not-close-without-a-new-test (4)
  • bug (2)
  • CI (2)
  • breakup (2)
  • documentation (1)
  • VTK (1)
  • regression (1)
  • github_actions (1)
  • cleanup (1)
  • help wanted (1)
  • ventilation (1)

Package metadata

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
  • Latest release: 2.117 (published 2 days ago)
  • Last Synced: 2025-04-25T13:35:10.697Z (1 day ago)
  • Versions: 133
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 6,183 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: 2.117 (published 2 days ago)
  • Last Synced: 2025-04-25T13:35:10.120Z (1 day ago)
  • Versions: 131
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 7,024 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/joss.yml actions
  • actions/checkout v2 composite
  • actions/upload-artifact v1 composite
  • docker://openjournals/paperdraft latest composite
.github/workflows/joss_paper.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 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
.github/workflows/readme_snippets.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v1 composite
  • eine/tip master composite
  • julia-actions/setup-julia v1 composite
  • matlab-actions/run-command v0 composite
  • matlab-actions/setup-matlab v0 composite
.github/workflows/tests+artifacts+pypi.yml actions
  • JamesIves/github-pages-deploy-action 4.1.1 composite
  • actions/checkout v2 composite
  • actions/checkout master composite
  • actions/setup-python v1 composite
  • actions/setup-python master composite
  • actions/setup-python v2 composite
  • codecov/codecov-action v2 composite
  • notiz-dev/github-action-json-property release composite
  • pypa/gh-action-pypi-publish unstable/v1 composite
.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

Score: 18.545487058544822