Skip to main content

Single-file SciPy-based CCN activation model

Project description

☁️ KISS SciPy-based CCN activation model

PyPI version

📌 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
  • 🔗 KISS desing: SciPy, NumPy and Pint are the only dependencies, model+tests wrapped into a single (and short) .py file
  • 🚀 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

ccnact-0.0.3.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ccnact-0.0.3-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

Details for the file ccnact-0.0.3.tar.gz.

File metadata

  • Download URL: ccnact-0.0.3.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ccnact-0.0.3.tar.gz
Algorithm Hash digest
SHA256 1c16d063df19c145c5906401a1e6feb2bb59a3f768b556c564519a3590c3eb02
MD5 f59df94d3e44a1f4e5512ca76fbc3b9f
BLAKE2b-256 ae171e3af08561caee17760b4e0fc6d18a6c8c33792258057ec64bb5a31d3c97

See more details on using hashes here.

File details

Details for the file ccnact-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: ccnact-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 20.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ccnact-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6981f40b2312e3d4d99b1fe945eaae64ab49d0395fb9516cd8b83c1094634d18
MD5 a07990cfb00d28321d1bac4e6eeb72ca
BLAKE2b-256 ba6a159e1360af49a2fafec1d79b3374ccec9d02d9c419fed5bcee2d78f92b04

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page