☁️ KISS SciPy-based CCN activation model
📌 overview
ccnact is a simple, yet complete, adiabatic/hydrostatic air-parcel framework employing
moving-sectional/particle-resolved aerosol-cloud microphysics, featuring:
- 🧮 integration using SciPy's interface to LSODA stiff ODE solver
- 📝 ODE system based on Arabas & Shima 2017 (extended to polydisperse aerosol size spectrum)
- 🏁 κ-Köhler wet radii equilibration of input dry-size spectrum with SciPy's elementwise root finder
- 🌪️ capability of resolving aerosol activation, deactivation, drop growth, evaporation and ripening
- 📈 mulit-modal lognormal (using SciPy's stats routines) spectrum specification (concentration at STP)
- 🔌 portable across platforms and architectures (CI on Linux, macOS & Windows, on Intel & ARM CPUs)
- ⚙️ single-function interface allowing to modify every single constant, and returning a tuple of:
- concentration of activated droplets (at STP)
- relative humidity (saturation) along the ascent (1D array)
- wet radii for all sections/particles (2D array)
- time values (1D array)
- 🧩 effective interfacing options for Matlab, IDL, Julia, etc
- ⚖️ unit-aware implemetation using Pint (dimensional analysis enabled for tests only)
- 🚀 subsecond execution times for common parameter settings
- 🔗 KISS design: depends on SciPy, NumPy & Pint only; single ~500 LOC file (physics + setup + tests)
The last five points were the key motivating factors for the development - the project originated from a search for a simple, lightweight (in dependencies) and fast CCN activation air-parcel model with concise code, automated testing and no hardcoded constants.
💡 example notebooks
- exploring dependence of activatied fraction and maximal supersaturation on updraft velocity:
- plotting the raw state of the model (saturation and wet radii profiles):
💻 notes for users
To install the package, try: pip install ccnact
Using from Python:
from ccnact import parcel
help(parcel)
n_act, rh, r_w, time = parcel(...)
Interfacing from Matlab (using the built-in Python bridge):
ccnact = py.importlib.import_module('ccnact');
ccnact.parcel(pyargs(...
'MAC', 1,...
'n_bins', int32(100),...
'p', 101300,...
'T', 300,...
'RH', .99,...
'dt', 1,...
'nt', int32(100),...
'w', 2,...
'sigma', 0.072,...
'kappa', py.tuple({1}),...
'meanr', py.tuple({3e-8}),...
'gstdv', py.tuple({1.5}),...
'n_tot', py.tuple({1e9})...
))
⚙ notes for developers
To execute the tests after checking out from git: pip install -e .[dev]; pytest ccnact.py
To set-up pre-commit: pip install pre-commit; pre-commit install
Metadata
Release files for ccnact 0.0.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ccnact-0.0.9.tar.gz | 48.4 kB | Without provenance | Details for ccnact-0.0.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ccnact-0.0.9-py3-none-any.whl | Python 3 | none | any | Details for ccnact-0.0.9-py3-none-any.whl |
Total release size: 70.4 kB
Release files / ccnact-0.0.9.tar.gz
| Download URL | ccnact-0.0.9.tar.gz |
|---|---|
| Size | 48.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b64b7ef636ddc26919ddeae64a5d160db623f2ec50042775c1cad02ab189c1a3
|
|
BLAKE2b-256 checksum How to use checksums |
9bbf8bfe48bfec7c7d0f2ad66e896739fdb1d234016f51d751ab412bb61a90ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / ccnact-0.0.9-py3-none-any.whl
| Download URL | ccnact-0.0.9-py3-none-any.whl |
|---|---|
| Size | 22.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc41dd162fca69a1350ddb7b8486115d1004d011e118dc7f5bda7e1b6ea4db5b
|
|
BLAKE2b-256 checksum How to use checksums |
6efed28e5a5d7c728b117373b72fb725267b0411a56fcf4201a0b3904ae9cc9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for ccnact 0.0.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.