New developments in PySDM and PySDM-examples v2

New developments in PySDM and PySDM-examples v2: collisional breakup, immersion freezing, dry aerosol initialization, and adaptive time-stepping - Published in JOSS (2023)

https://github.com/open-atmos/pysdm

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 8 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org, zenodo.org
  • Committers with academic emails
    8 of 37 committers (21.6%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

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

advection advection-diffusion numerical-integration pde-solver ode graph-generation mesh pypi initial-value-problem

Scientific Fields

Mathematics Computer Science - 84% confidence
Chemistry Physical Sciences - 83% confidence
Last synced: 4 months ago · JSON representation

Repository

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

Basic Info
Statistics
  • Stars: 79
  • Watchers: 5
  • Forks: 47
  • Open Issues: 215
  • Releases: 168
Topics
atmospheric-modelling atmospheric-physics cuda gpu gpu-computing monte-carlo-simulation numba nvrtc particle-system physics-simulation pint pypi-package python research simulation thrust
Created over 6 years ago · Last pushed 4 months ago
Metadata Files
Readme License Zenodo

README.md

pysdm logo

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 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: - Bartman et al. 2022 (PySDM v1). - de Jong, Singer et al. 2023 (PySDM v2).

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 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

  • Name: open-atmos
  • Login: open-atmos
  • Kind: organization

JOSS Publication

New developments in PySDM and PySDM-examples v2: collisional breakup, immersion freezing, dry aerosol initialization, and adaptive time-stepping
Published
April 19, 2023
Volume 8, Issue 84, Page 4968
Authors
Emily K. de Jong ORCID
Department of Mechanical and Civil Engineering, California Institute of Technology, Pasadena, CA, United States of America
Clare E. Singer ORCID
Department of Environmental Science and Engineering, California Institute of Technology, Pasadena, CA, United States of America
Sajjad Azimi ORCID
Department of Environmental Science and Engineering, California Institute of Technology, Pasadena, CA, United States of America
Piotr Bartman ORCID
Faculty of Mathematics and Computer Science, Jagiellonian University, Kraków, Poland
Oleksii Bulenok ORCID
Faculty of Mathematics and Computer Science, Jagiellonian University, Kraków, Poland
Kacper Derlatka ORCID
Faculty of Mathematics and Computer Science, Jagiellonian University, Kraków, Poland
Isabella Dula
Department of Environmental Science and Engineering, California Institute of Technology, Pasadena, CA, United States of America
Anna Jaruga ORCID
Department of Environmental Science and Engineering, California Institute of Technology, Pasadena, CA, United States of America
J. Ben Mackay ORCID
Department of Environmental Science and Engineering, California Institute of Technology, Pasadena, CA, United States of America, Scripps Institution of Oceanography, San Diego, CA, United States of America
Ryan X. Ward ORCID
Department of Environmental Science and Engineering, California Institute of Technology, Pasadena, CA, United States of America
Sylwester Arabas ORCID
Faculty of Mathematics and Computer Science, Jagiellonian University, Kraków, Poland, Department of Atmospheric Sciences, University of Illinois at Urbana-Champaign, Urbana, IL, United States of America
Editor
David Hagan ORCID
Tags
physics-simulation monte-carlo-simulation atmospheric-modeling particle-system atmospheric-physics

GitHub Events

Total
  • Create event: 157
  • Commit comment event: 3
  • Release event: 52
  • Delete event: 96
  • Member event: 3
  • Pull request event: 318
  • Fork event: 15
  • Issues event: 137
  • Watch event: 17
  • Issue comment event: 474
  • Push event: 297
  • Gollum event: 2
  • Pull request review comment event: 178
  • Pull request review event: 235
Last Year
  • Create event: 157
  • Commit comment event: 3
  • Release event: 52
  • Delete event: 96
  • Member event: 3
  • Pull request event: 318
  • Fork event: 15
  • Issues event: 137
  • Watch event: 17
  • Issue comment event: 474
  • Push event: 297
  • Gollum event: 2
  • Pull request review comment event: 178
  • Pull request review event: 235

Committers

Last synced: 4 months ago

All Time
  • Total Commits: 3,191
  • Total Committers: 37
  • Avg Commits per committer: 86.243
  • Development Distribution Score (DDS): 0.386
Past Year
  • Commits: 168
  • Committers: 12
  • Avg Commits per committer: 14.0
  • Development Distribution Score (DDS): 0.506
Top Committers
Name Email Commits
Sylwester Arabas s****s@u****l 1,960
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****] 59
AgnieszkaZaba 5****a 48
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 5
tehAgitto k****3@g****m 4
Tim Lüttmer 1****m 4
Paweł Magnuszewski 4****u 4
Emily de Jong e****g@E****n 4
edejong-caltech e****g@l****r 4
Sfonxu 8****u 3
Brady Bhalla 3****a 2
Anna Jaruga a****a@c****u 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
Emma Ware e****e@u****u 1
Jatan Buch j****5@c****u 1
and 7 more...

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 304
  • Total pull requests: 720
  • Average time to close issues: 12 months
  • Average time to close pull requests: 26 days
  • Total issue authors: 20
  • Total pull request authors: 30
  • Average comments per issue: 4.29
  • Average comments per pull request: 1.58
  • Merged pull requests: 496
  • Bot issues: 0
  • Bot pull requests: 77
Past Year
  • Issues: 107
  • Pull requests: 375
  • Average time to close issues: 18 days
  • Average time to close pull requests: 11 days
  • Issue authors: 9
  • Pull request authors: 17
  • Average comments per issue: 0.7
  • Average comments per pull request: 1.55
  • Merged pull requests: 248
  • Bot issues: 0
  • Bot pull requests: 43
Top Authors
Issue Authors
  • slayoo (217)
  • AgnieszkaZaba (26)
  • abulenok (13)
  • claresinger (10)
  • tluettm (9)
  • edejong-caltech (5)
  • emmacware (3)
  • jbarr444 (3)
  • TomMelt (2)
  • jtbuch (2)
  • bradybhalla (2)
  • piotrbartman (2)
  • bhiogade (2)
  • olastrz (2)
  • jb-mackay (1)
Pull Request Authors
  • slayoo (361)
  • AgnieszkaZaba (106)
  • dependabot[bot] (77)
  • bhiogade (35)
  • claresinger (19)
  • abulenok (19)
  • tluettm (16)
  • Sfonxu (15)
  • olastrz (14)
  • edejong-caltech (9)
  • pawelmagnu (8)
  • emmacware (6)
  • piotrbartman (5)
  • NeKo2903 (4)
  • jtbuch (4)
Top Labels
Issue Labels
no-issue-activity (45) breakup (24) good first issue (11) documentation (10) GPU (9) no-activity (8) isotopes (7) devops-tests (6) examples (6) condensation (5) enhancement (4) ice (4) CI (4) cleanup (3) bug (3) regression (2) high-impact-for-LOC (2) help wanted (1) VTK (1) HOWTOs (1) ubuntu (1) windows (1) ventilation (1) idea (1) macOS (1) Binder (1) performance (1) BSc-project (1)
Pull Request Labels
dependencies (77) python (41) isotopes (16) examples (12) no-pr-activity (11) ice (7) CI (7) do-not-close-without-a-new-test (5) condensation (4) no-activity (3) bug (3) ventilation (2) cleanup (2) VTK (2) documentation (2) regression (2) github_actions (2) help wanted (2) breakup (2) priority-low (1) enhancement (1)

Packages

  • Total packages: 4
  • Total downloads:
    • pypi 7,420 last-month
  • Total dependent packages: 1
    (may contain duplicates)
  • Total dependent repositories: 2
    (may contain duplicates)
  • Total versions: 320
  • Total maintainers: 2
proxy.golang.org: github.com/open-atmos/pysdm
  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.3%
Average: 5.5%
Dependent repos count: 5.7%
Last synced: 4 months ago
proxy.golang.org: github.com/open-atmos/PySDM
  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.3%
Average: 5.5%
Dependent repos count: 5.7%
Last synced: 4 months ago
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

  • Versions: 154
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 2,373 Last month
Rankings
Dependent packages count: 3.3%
Downloads: 6.1%
Forks count: 7.6%
Average: 9.8%
Stargazers count: 9.9%
Dependent repos count: 22.2%
Maintainers (2)
Last synced: 4 months ago
pypi.org: pysdm-examples

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

  • Versions: 152
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 5,047 Last month
Rankings
Dependent packages count: 10.1%
Forks count: 10.2%
Downloads: 12.9%
Average: 14.8%
Stargazers count: 19.4%
Dependent repos count: 21.6%
Maintainers (2)
Last synced: 4 months ago

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 master composite
  • actions/checkout v2 composite
  • actions/setup-python master composite
  • actions/setup-python v1 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