Skip to main content

KISS 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 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.4.tar.gz (21.8 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.4-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ccnact-0.0.4.tar.gz
  • Upload date:
  • Size: 21.8 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.4.tar.gz
Algorithm Hash digest
SHA256 33a0b312d8f1fcd06bca441c2cb9f9c7c1378f28e73b95f9612e244a17f19751
MD5 a719701ad7e97d80fd1e62a26e68b2c3
BLAKE2b-256 b68095ef5d93485a876a00e28eede0d27e42be4eb7275614a3b886ecd627185d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ccnact-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 20.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cbd34d48fa3f3d7fa709ad590ad436a4316cb66700d85cfc0157c3256a0727c8
MD5 3055cfd0befa9a76f98e10cc85f37780
BLAKE2b-256 00ad81635eb2f921491e901fb81a2971825384dc7079d1995f0e9dd7f0a54b76

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