PyMPDATA v1
PyMPDATA v1: Numba-accelerated implementation of MPDATA with examples in Python, Julia and Matlab - Published in JOSS (2022)
Science Score: 59.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 2 DOI reference(s) in README -
✓Academic publication links
Links to: joss.theoj.org, zenodo.org -
✓Committers with academic emails
1 of 18 committers (5.6%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (7.1%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Numba-accelerated Pythonic implementation of MPDATA with examples in Python, Julia, Rust and Matlab
Basic Info
- Host: GitHub
- Owner: open-atmos
- License: gpl-3.0
- Language: Python
- Default Branch: main
- Homepage: https://open-atmos.github.io/PyMPDATA/
- Size: 35.1 MB
Statistics
- Stars: 30
- Watchers: 2
- Forks: 22
- Open Issues: 45
- Releases: 59
Topics
Metadata Files
README.md
PyMPDATA
PyMPDATA is a high-performance Numba-accelerated Pythonic implementation of the MPDATA algorithm of Smolarkiewicz et al. used in geophysical fluid dynamics and beyond for numerically solving generalised convection-diffusion PDEs in 1D, 2D and 3D structured meshes with coordinate transformations.
In short, PyMPDATA numerically solves the following equation:
$$ \partial_t (G \psi) + \nabla \cdot (Gu \psi) + \mu \Delta (G \psi) = 0 $$
where scalar field $\psi$ is referred to as the advectee, vector field u is referred to as advector, and the G factor corresponds to optional coordinate transformation. The inclusion of the Fickian diffusion term is optional and is realised through modification of the advective velocity field with MPDATA handling both the advection and diffusion (for discussion see, e.g. Smolarkiewicz and Margolin 1998, sec. 3.5, par. 4).
PyMPDATA documentation is generated via pdoc.
A [PyMPDATA] and [numba-mpi] coupler sandbox called PyMPDATA-MPI
depicts how numba-mpi can be used
to enable distributed memory parallelism in PyMPDATA.applications, and provide a validation of the implementation
and its performance.
Dependencies and installation
To install PyMPDATA, one may use: pip install PyMPDATA (or
pip install git+https://github.com/open-atmos/PyMPDATA.git to get updates beyond the latest release).
PyMPDATA depends on NumPy and Numba.
Running the tests shipped with the package requires additional packages that are installed
if pip is invoked with: pip install PyMPDATA[tests].
Examples (Jupyter notebooks reproducing results from literature):
PyMPDATA examples are bundled with PyMPDATA and located in the examples subfolder.
They constitute a separate PyMPDATA_examples Python package which is also available at PyPI.
The examples have additional dependencies listed in PyMPDATA_examples package setup.py file.
Running the examples requires the PyMPDATA_examples package to be installed.
Since the examples package includes Jupyter notebooks (and their execution requires write access), the suggested install and launch steps are:
git clone https://github.com/open-atmos/PyMPDATA-examples.git
cd PyMPDATA-examples
pip install -e .
jupyter-notebook
Alternatively, one can also install the examples package from pypi.org by using pip install PyMPDATA-examples.
Package structure and API:
The key classes constituting the PyMPDATA interface are summarised below.
Options class
The Options class
groups both algorithm variant options as well as some implementation-related
flags.
Arakawa-C grid layer
In PyMPDATA, the solution domain is assumed to extend from the
first cell's boundary to the last cell's boundary (thus the
first scalar field value is at $[\Delta x/2, \Delta y/2]$.
The ScalarField
and VectorField classes implement the
Arakawa-C staggered grid logic.
Boundary conditions
Boundary conditions are implemented as classes defined in
BoundaryCondition.
Stepper
The logic of the MPDATA iterative solver is represented
in PyMPDATA by the Stepper class.
Solver
Instances of the Solver class are used to control
the integration and access solution data. During instantiation,
additional memory required by the solver is
allocated according to the options provided.
Contributing, reporting issues, seeking support
Submitting new code to the project, please preferably use GitHub pull requests (or the PyMPDATA-examples PR site if working on examples) - 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.
As of now, the copyright to the entire PyMPDATA codebase is with the Jagiellonian University (2019-2023) and AGH University of Krakow (2023 onwards) - work places of the main maintainer. 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 code analysis (Pylint checks are part of the CI workflows).
Issues regarding any incorrect, unintuitive or undocumented bahaviour of PyMPDATA are best to be reported on the GitHub issue tracker. Feature requests are recorded in the "Ideas..." PyMPDATA wiki page.
We encourage to use the GitHub Discussions feature (rather than the issue tracker) for seeking support in understanding, using and extending PyMPDATA code.
Please use the PyMPDATA issue-tracking and dicsussion infrastructure for PyMPDATA-examples as well.
We look forward to your contributions and feedback.
Credits:
Development of PyMPDATA was supported by the EU through a grant of the Foundation for Polish Science (POIR.04.04.00-00-5E1C/18) and by the Polish National Science Centre (grant no. 2020/39/D/ST10/01220)
copyright: Jagiellonian University (2019-2023) & AGH University of Krakow (2023 onwards)
licence: GPL v3
Owner
- Name: open-atmos
- Login: open-atmos
- Kind: organization
- Repositories: 8
- Profile: https://github.com/open-atmos
GitHub Events
Total
- Fork event: 3
- Create event: 89
- Commit comment event: 2
- Release event: 21
- Issues event: 46
- Watch event: 6
- Delete event: 80
- Member event: 2
- Issue comment event: 181
- Push event: 154
- Pull request review comment event: 36
- Pull request event: 198
- Pull request review event: 72
Last Year
- Fork event: 3
- Create event: 89
- Commit comment event: 2
- Release event: 21
- Issues event: 46
- Watch event: 6
- Delete event: 80
- Member event: 2
- Issue comment event: 181
- Push event: 154
- Pull request review comment event: 36
- Pull request event: 198
- Pull request review event: 72
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Sylwester Arabas | s****s@u****l | 817 |
| Michael | o****l@g****m | 165 |
| prbartman | p****n@g****m | 46 |
| Paweł Magnuszewski | 4****u | 17 |
| Maciej Manna | m****a@g****m | 15 |
| Kacper Derlatka | 5****r | 11 |
| Michael Olesik | 4****6 | 9 |
| Sfonxu | 8****u | 9 |
| AgnieszkaZaba | 5****a | 8 |
| dependabot[bot] | 4****] | 4 |
| kruci-no | j****b@g****m | 3 |
| Arfon Smith | a****n | 2 |
| NeKo2903 | 9****3 | 2 |
| Caastlefox | 1****x | 1 |
| Konrad Pawlik | 7****1 | 1 |
| Sanky | 7****e | 1 |
| The Codacy Badger | b****r@c****m | 1 |
| Wojciech Neuman | 6****n | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 78
- Total pull requests: 330
- Average time to close issues: about 1 year
- Average time to close pull requests: 11 days
- Total issue authors: 9
- Total pull request authors: 16
- Average comments per issue: 3.88
- Average comments per pull request: 1.16
- Merged pull requests: 191
- Bot issues: 0
- Bot pull requests: 96
Past Year
- Issues: 36
- Pull requests: 210
- Average time to close issues: 15 days
- Average time to close pull requests: 10 days
- Issue authors: 5
- Pull request authors: 10
- Average comments per issue: 0.39
- Average comments per pull request: 1.27
- Merged pull requests: 93
- Bot issues: 0
- Bot pull requests: 87
Top Authors
Issue Authors
- slayoo (62)
- Delcior (6)
- Sfonxu (4)
- AgnieszkaZaba (3)
- sajjadazimi (1)
- pawelmagnu (1)
- NeKo2903 (1)
- dmikushin (1)
- Tosiekdev (1)
Pull Request Authors
- slayoo (175)
- dependabot[bot] (96)
- pawelmagnu (40)
- Sfonxu (17)
- AgnieszkaZaba (17)
- Delcior (12)
- NeKo2903 (4)
- Caastlefox (3)
- WojciechNeuman (3)
- bhiogade (2)
- yoctoyotta1024 (2)
- arfon (2)
- Kojec1 (2)
- arekpaterak (2)
- piotrbartman (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 13,947 last-month
-
Total dependent packages: 1
(may contain duplicates) -
Total dependent repositories: 2
(may contain duplicates) - Total versions: 108
- Total maintainers: 3
pypi.org: pympdata
Numba-accelerated Pythonic implementation of MPDATA with examples in Python, Julia, Rust and Matlab
- Documentation: https://open-atmos.github.io/PyMPDATA
- License: GPL-3.0
-
Latest release: 1.6.1
published 8 months ago
Rankings
Maintainers (3)
pypi.org: pympdata-examples
PyMPDATA usage examples reproducing results from literature and depicting how to use PyMPDATA in Python from Jupyter notebooks
- Documentation: https://open-atmos.github.io/PyMPDATA
- License: GPL-3.0
-
Latest release: 1.6.1
published 8 months ago
Rankings
Maintainers (3)
Dependencies
- numba *
- numpy *
- pystrict *
- actions/checkout v2 composite
- actions/upload-artifact v1 composite
- docker://openjournals/paperdraft latest composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- julia-actions/setup-julia v1 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- matlab-actions/run-command v0 composite
- matlab-actions/setup-matlab v0 composite
- actions/checkout v2 composite
- actions/setup-python v1 composite
- eine/tip master composite
- actions/stale v3 composite
- 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 v3 composite
- notiz-dev/github-action-json-property release composite
- pypa/gh-action-pypi-publish unstable/v1 composite
- PyMPDATA-examples *
- PyMPDATA *
- ipywidgets *
- joblib *
- matplotlib *
- open-atmos-jupyter-utils *
- pint *
- pystrict *
- scipy *
- sympy *