Skip to main content

Introduction

pysdm logo

PySDM examples are engineered as Jupyter Python notebooks supported by auxiliary Python commons that constitute a separate PySDM-examples Python package which is also available at PyPI. The examples have additional dependencies listed in PySDM-examples package setup.py file. Running the example Jupyter notebooks requires the PySDM-examples package to be pip-installed. For installation instructions see project docs homepage. Note that the Jupyter notebooks themselves are not included in the package wheels, but are included in the source .tar.gz file on PyPI, and are conveninently browsable on GitHub. All notebooks feature header cells with badges enabling single-click execution on Google Colab and on mybinder.org. The examples package is also used in the PySDM test suite.

Example gallery

The examples are named referring to the journal paper they aim to reproduce simulations from (or sometimes just where the inspiration originated from). The list below groups all examples by the dimensionality and type of the employed modelling framework ("environment" in PySDM nomenclature, which can be: box, parcel, single-column, 2D prescribed flow), and by the set of physical processes simulated (condensation, collisional coagulation and breakup, drop freezing, isotopic fractionation, aqueous chemistry, seeding, ...).

2D kinematic environment (prescribed-flow) mimicking Sc deck

The 2D prescribed-flow framework used here can be traced back to the work of Kessler 1969 (section 3C). The setup employed in PySDM-examples, which mimics a stratiform cloud deck and features periodic horizontal boundary condition and vanishing flow at vertical boundaries, was introduced in Morrison and Grabowski (2007) and later adopted for particle-based simulations in Arabas et al. (2015). It uses a non-devergent single-eddy flow field resulting in an updraft-downdraft pair in the domain. The flow field advects two scalar fields in an Eulerian way: water vapour mixing ratio and dry-air potential temperature. In PySDM-examples, the Eulerian advection is handled using the PyMPDATA Numba-based implementation of the MPDATA numerical scheme of Smolarkiewicz (e.g., 2006). An animation depicting PySDM simulation capturing aerosol collisional processing by warm rain is shown below (see the Paraview hello-world HOWTO Jupyter notbook for code generating the simulation and visualisation):

Example notebooks:

  • PySDM_examples.featured.Arabas_et_al_2025: adaptation of the 2D kinematic setup for studying glaciation of the cloud deck by immersion freezing

1D kinematic environment (prescribed-flow, single-column)

The single-column PySDM environment is a reimplementation of the Met Office KiD framework introduced in Shipway & Hill 2012. The framework features a single Eulerian-transported field of water vapour mixing ratio (vertical profile of potential temperature is fixed). As in the 2D kinematic framework above, the Eulerian advection is handled by PyMPDATA.

Example notebooks:

  • PySDM_examples.featured.Shipway_and_Hill_2012: reproducing figures from the Shipway & Hill 2012 paper;
  • PySDM_examples.featured.deJong_Mackay_et_al_2023: reproducing figures from the de Jong et al. 2023 paper where the single-column framework was used to exemplify operation of the Monte-Carlo collisional breakup scheme in PySDM (scheme introduced in that paper).

0D parcel environment

The parcel framework implemented in PySDM uses a hydrostatic profile and adiabatic mass and energy conservation to drive evolution of thermodynamic state and microphysical properties of particles.

Example notebooks include:

  • condensation only
    • PySDM_examples.featured.Arabas_and_Shima_2017: monodisperse particle spectrum, activation/deactivation cycle
    • PySDM_examples.featured.Yang_et_al_2018: polydisperse particle spectrum, activation/deactivation cycles
    • PySDM_examples.featured.Abdul_Razzak_Ghan_2000: polydisperse activation, comparison against GCM parameterisation
    • PySDM_examples.featured.pyrcel_docs_testcase: polydisperse activation, mimicking example test case from Pyrcel documentation
    • PySDM_examples.featured.Lowe_et_al_2019: externally mixed polydisperse size spectrum with surface-active organics case
    • PySDM_examples.featured.Grabowski_and_Pawlowska_2023: polydisperse activation, focus on ripening
    • PySDM_examples.featured.Jensen_and_Nugent_2017: polydisperse activation featuring giant CCN
  • condensation and aqueous-chemistry
    • PySDM_examples.featured.Kreidenweis_et_al_2003: Hoppel gap simulation setup (i.e. depiction of evolution of aerosol mass spectrum from a monomodal to bimodal due to aqueous‐phase SO2 oxidation)
    • PySDM_examples.featured.Jaruga_and_Pawlowska_2018: exploration of numerical convergence using the above Hoppel-gap simulation setup
  • freezing

The parcel environment is also featured in the PySDM tutorials.

0D box environment

The box environment is void of any spatial or thermodynamic context, it constitutes the most basic framework.

Example notebooks include:

  • coalescence only:
    • PySDM_examples.featured.Shima_et_al_2009: using Golovin additive kernel for comparison against analytic solution, featuring interactive in-notebook interface for selecting simulation parameters
    • PySDM_examples.featured.Berry_1967: examples using geometric, hydrodynamic and electric-field collision kernels
  • coalescence and breakup:
    • PySDM_examples.featured.Bieli_et_al_2022: evolution of moments under collisional growth and breakage
    • PySDM_examples.featured.deJong_Mackay_et_al_2023: validation of the breakup scheme against analytical solutions from Srivastava 1982
  • immersion freezing only:
    • PySDM_examples.featured.Alpert_and_Knopf_2016: stochastic immersion freezing with monodisperse vs. lognormal immersed surface areas
    • PySDM_examples.featured.Arabas_et_al_2025: comparison of time-dependent and singular immersion freezing schemes

The box environment is also featured in the PySDM tutorials.

  • equilibrium isotopic fractionation formulae:
    • PySDM_examples.misc.Lamb_et_al_2017
    • PySDM_examples.misc.Bolot_et_al_2013
    • PySDM_examples.misc.Merlivat_and_Nief_1967
    • PySDM_examples.misc.Van_Hook_1968
  • Rayleigh fractionation:
    • PySDM_examples.featured.Pierchala_et_al_2022: reproducing model plots for a triple-isotope lab study, including kinetic fractionation
    • PySDM_examples.misc.Gonfiantini_1986: flat-surface evaporation at different humidities for D and 18O
  • isotopic relaxation timescale:
    • PySDM_examples.misc.Miyake_et_al_1968: incl. comparison of different ventilation parameterisations
    • PySDM_examples.misc.Bolin_1958
  • below-cloud kinetic fractionation:
    • PySDM_examples.misc.Gedzelman_and_Arnold_1994

examples depicting extraterrestrial clouds (formulae-only, no simulations yet)

  • Titan (methane clouds):
    • PySDM_examples.misc.Toon_et_al_1980

Metadata

Release files for pysdm-examples 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pysdm-examples 3.0.1
File Size Uploaded Provenance Actions
pysdm_examples-3.0.1.tar.gz 245.6 kB Without provenance Details for pysdm_examples-3.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pysdm-examples 3.0.1
File Interpreter ABI Platform Actions
pysdm_examples-3.0.1-py3-none-any.whl Python 3 none any Details for pysdm_examples-3.0.1-py3-none-any.whl

Total release size: 541.0 kB

Release files / pysdm_examples-3.0.1.tar.gz

Download URL pysdm_examples-3.0.1.tar.gz
Size 245.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6b0cd62b23f8eae9bd311a2c273d2962af8257f9e69161cba9709d9f0732d665
BLAKE2b-256 checksum
How to use checksums
3cf766acded346de14e5b3bb78dfe898f354351eab64de54249c6d0fb2089cff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Release files / pysdm_examples-3.0.1-py3-none-any.whl

Download URL pysdm_examples-3.0.1-py3-none-any.whl
Size 295.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28bdb2ba950aa148e04f6bf122ac1b04d397239298988e19deeb27b7268d5ece
BLAKE2b-256 checksum
How to use checksums
8e4b3ff4a6d7bf4805effe878cd0ef75deaa13a3a5542c67d6fc267d7bf2dd4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pysdm-examples 3.0.1

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.

Release history Release notifications | RSS feed

This release

3.0.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page