pyrcel
A 0D, adiabatic cloud parcel model for studying aerosol activation.
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: zenodo.org -
✓Committers with academic emails
2 of 5 committers (40.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.2%) to scientific vocabulary
Keywords from Contributors
Repository
A 0D, adiabatic cloud parcel model for studying aerosol activation.
Basic Info
Statistics
- Stars: 27
- Watchers: 3
- Forks: 25
- Open Issues: 12
- Releases: 8
Metadata Files
README.md
pyrcel: cloud parcel model

This is an implementation of a simple, adiabatic cloud parcel model for use in aerosol-cloud interaction studies. Rothenberg and Wang (2016) discuss the model in detail and its improvements and changes over Nenes et al (2001):
- Implementation of κ-Köhler theory for condensation physics (Petters and Kreidenweis, 2007)
- Extension of model to handle arbitrary sectional representations of aerosol populations, based on user-controlled empirical or parameterized size distributions
- Improved, modular numerical framework for integrating the model, including bindings
to several different stiff integrators:
- ~~
lsoda- scipy ODEINT wrapper~~ - ~~
vode, lsode*, lsoda*- ODEPACK via odespy~~ cvode- SUNDIALS via Assimulo
- ~~
among other details. It also includes a library of droplet activation routines and scripts/notebooks for evaluating those schemes against equivalent calculations done with the parcel model.
[!WARNING] As of version 1.3, we no longer support any ODE solver backends other than
cvode. All publications using this model have used this backend, so users shouldn't expect any inconsistencies with historical results. A future version is planned to add a new suite of ODE solvers from the diffrax toolkit.
Updated code can be found the project github repository. If you'd like to use this code or have any questions about it, please contact the author. In particular, if you use this code for research purposes, be sure to carefully read through the model and ensure that you have tweaked/configured it for your purposes (i.e., modifying the accomodation coefficient); other derived quantities).
Detailed documentation is available, including a scientific description, installation details, and a basic example which produces a figure like the plot at the top of this page.
Quick Start
As of February, 2025, we provide an ultra simple way to run pyrcel without any installation
or setup using pixi.
pixi is an all-in-one package management tool that makes handling complex environment
setup and dependencies extremely easy.
Clone or download this repo, then cd into the top-level folder from a terminal. From there, execute:
shell
$ pixi run run_parcel examples/simple.yml
This will automatically prepare an environment with all of pyrcel's dependencies installed,
and then run an example model setup.
The first time the model runs, it may take a few second after invoking the script; this is
normal, and is just a side-effect of numba caching and pre-compiling some of the functions
used to drive the parcel model simulation.
[!NOTE] We provide
pixienvironments for Linux, MacOS (both Intel and Apple Silicon) and Windows, but we have never tried to run the model on a Windows computer so your mileage may vary. Contact the authors if you have any questions and we can try to support your use case.
Installation
To get started with using pyrcel, complete the following steps:
- Set up a new Python environment; we recommend using mambaforge:
shell
$ mamba create -n pyrcel_quick_start python=3.11
- Activate the new Python environment and install the model and its dependencies. If you install the published version from PyPi (recommended), then you also need to install Assimulo using the Mamba package manager - but no other manual dependency installation is necessary:
shell
$ mamba activate pyrcel_quick_start
$ pip install pyrcel
$ mamba install -c conda-forge assimulo
- Run a test simulation using the CLI tool and a sample YAML file from pyrcel/examples/*.yml (you may want to clone the repository or download them locally):
shell
$ run_parcel simple.yml
- Visualize the output NetCDF (should be in the directory you ran the CLI tool, at output/simple.nc)
That's it! You should be able to import pyrcel into any script or program running in the
environment you created.
Requirements
Required
Additionally, the following packages are used for better numerics (ODE solving)
The easiest way to satisfy the basic requirements for building and running the model is to use the Anaconda scientific Python distribution. Alternatively, a miniconda environment is provided to quickly set-up and get running the model. Assimulo's dependency on the SUNDIALS library makes it a little bit tougher to install in an automated fashion, so it has not been included in the automatic setup provided here; you should refer to Assimulo's documentation for more information on its installation process. Note that many components of the model and package can be used without Assimulo.
Development
http://github.com/darothen/pyrcel
Please fork this repository if you intend to develop the model further so that the code's provenance can be maintained.
License / Usage
All scientific code should be licensed. This code is released under the New BSD (3-clause) license.
You are free to use this code however you would like. If you use this for any scientific work resulting in a publication or citation, please cite our original publication detailing the model, and let the authors know:
@article {
author = "Daniel Rothenberg and Chien Wang",
title = "Metamodeling of Droplet Activation for Global Climate Models",
journal = "Journal of the Atmospheric Sciences",
year = "2016",
publisher = "American Meteorological Society",
address = "Boston MA, USA",
volume = "73",
number = "3",
doi = "10.1175/JAS-D-15-0223.1",
pages= "1255 - 1272",
url = "https://journals.ametsoc.org/view/journals/atsc/73/3/jas-d-15-0223.1.xml"
}
Owner
- Name: Daniel Rothenberg
- Login: darothen
- Kind: user
- Location: Frederick, CO
- Company: Waymo
- Website: http://www.danielrothenberg.com
- Twitter: danrothenberg
- Repositories: 72
- Profile: https://github.com/darothen
Tech Lead @ Waymo | Weather/Climate Scientist | Pythonista | ex-Chief Scientist @ ClimaCell/Tomorrow.io | Formerly Postdoc Associate @ MIT EAPS/IDSS/CGCS
GitHub Events
Total
- Issues event: 2
- Watch event: 3
- Issue comment event: 1
- Push event: 7
- Pull request review event: 1
- Fork event: 3
- Create event: 1
Last Year
- Issues event: 2
- Watch event: 3
- Issue comment event: 1
- Push event: 7
- Pull request review event: 1
- Fork event: 3
- Create event: 1
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Daniel Rothenberg | d****n@m****u | 358 |
| darothen | d****l@d****m | 37 |
| dependabot[bot] | 4****] | 1 |
| Milos Lompar | l****m@m****u | 1 |
| Marco Wurth | m****h@k****u | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 13
- Total pull requests: 9
- Average time to close issues: 8 months
- Average time to close pull requests: about 1 month
- Total issue authors: 5
- Total pull request authors: 4
- Average comments per issue: 0.85
- Average comments per pull request: 0.56
- Merged pull requests: 5
- Bot issues: 0
- Bot pull requests: 3
Past Year
- Issues: 1
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 0.0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- darothen (9)
- Tianning-Zhao (1)
- feifeiya8 (1)
- marcowurth (1)
- slayoo (1)
Pull Request Authors
- darothen (5)
- dependabot[bot] (3)
- lompar (1)
- marcowurth (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 4,682 last-month
-
Total dependent packages: 1
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 13
- Total maintainers: 1
proxy.golang.org: github.com/darothen/pyrcel
- Documentation: https://pkg.go.dev/github.com/darothen/pyrcel#section-documentation
- License: bsd-3-clause
-
Latest release: v1.3.3
published about 1 year ago
Rankings
pypi.org: pyrcel
pyrcel: 0D adiabatic cloud parcel model
- Documentation: https://pyrcel.readthedocs.io/en/latest/
- License: Copyright (c) Daniel Rothenberg, 2012-2019 All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the {organization} nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
Latest release: 1.3.2
published over 2 years ago
Rankings
Maintainers (1)
Dependencies
- Assimulo ==3.0
- numba ==0.45.1
- numpy ==1.17.0
- pandas ==0.25.1
- scipy ==1.3.1
- xarray ==0.12.3
- ipython *
- numba <0.57
- numpy <1.25
- numpydoc *
- pandas *
- pyyaml *
- scipy <1.11
- setuptools *
- sphinx *
- sphinx_rtd_theme *
- xarray *
- numba *
- numpy *
- pandas *
- pyyaml *
- scipy *
- setuptools *
- setuptools-scm *
- xarray *
- assimulo
- ipython
- numba
- numpy
- numpydoc
- pandas
- python 3.7
- pyyaml
- scipy
- sphinx
- sphinx_rtd_theme
- xarray