Single-file SciPy-based CCN activation model
Project description
☁️ Single-file SciPy-based CCN activation model
📌 overview
- ∫ integration using SciPy interface to LSODA ODE solver
- 📝 ODE system based on Arabas & Shima 2017 (extended to polydisperse aerosol size spectrum) capable of resolving aerosol activation, deactivation, drop growth, evaporation and ripening
- ⌨ single-function interface allowing to modify all constants, and returning a tuple of: concentration of activated droplets (at STP) & maximal supersaturation
- 📈 mulit-modal lognormal spectrum specification (with concentration interpretted as at STP)
- ⚖️ implemeted using Pint dimensional analysis (physical units consistency checks) enabled for unit tests only
- 🔗 SciPy, NumPy and Pint are the only dependencies
- 🚀 subsecond execution times for common parameter settings
💻 notes for users
To install the package, try: pip install git+https://github.com/open-atmos-krk/ccnact.git
Using from Python:
from ccnact import parcel
help(parcel)
n_act, s_max = 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: pip install -e .[dev]; pytest ccnact.py
To set-up pre-commit: pip install pre-commit; pre-commit install
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ccnact-0.0.2.tar.gz.
File metadata
- Download URL: ccnact-0.0.2.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9ea5570fa146ffb2772b1a5b2812fdbf43815ee671a6472eeec0e7ff8cde0594
|
|
| MD5 |
1c0f388b7f1fe3b3543f8504b3fa19b8
|
|
| BLAKE2b-256 |
263adf07ff67f85247ba03e968c149599e95a044d199ce7b99016741880d33e1
|
File details
Details for the file ccnact-0.0.2-py3-none-any.whl.
File metadata
- Download URL: ccnact-0.0.2-py3-none-any.whl
- Upload date:
- Size: 20.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8afaa9e0cb980c95407d66c8a3105b0230492ebf569b576697102ab9cc13459e
|
|
| MD5 |
ff5ec507596abe4427158a706879a7cb
|
|
| BLAKE2b-256 |
c683029ebb913e764b0f60ceaea6fc0ca7804ea8dee6e515dfb47c21459fdb25
|