SoftwareX (Feb 2024)

PyPartMC: A Pythonic interface to a particle-resolved, Monte Carlo aerosol simulation framework

  • Zachary D’Aquino,
  • Sylwester Arabas,
  • Jeffrey H. Curtis,
  • Akshunna Vaishnav,
  • Nicole Riemer,
  • Matthew West

Journal volume & issue
Vol. 25
p. 101613

Abstract

Read online

PyPartMC is a Pythonic interface to PartMC, a stochastic, particle-resolved aerosol model implemented in Fortran. Both PyPartMC and PartMC are free, libre, and open-source. PyPartMC reduces the number of steps and mitigates the effort necessary to install and utilize the resources of PartMC. Without PyPartMC, setting up PartMC requires: working with UNIX shell, providing Fortran and C libraries, and performing standard Fortran and C source code configuration, compilation and linking. This can be challenging for those less experienced with computational research or those intending to use PartMC in environments where provision of UNIX tools is less straightforward (e.g., on Windows). PyPartMC offers a single-step installation/upgrade process of PartMC and all dependencies through the pip Python package manager on Linux, macOS, and Windows. This allows streamlined access to the unmodified and versioned Fortran internals of the PartMC codebase from both Python and other interoperable environments (e.g., Julia through PyCall). In particular, PyPartMC can be set up to handle the time-stepping loop for PartMC simulations making it possible to couple PartMC with other Python-interoperable packages, for either online diagnostics or additional simulation logic. Altogether, users of PyPartMC can setup, run, process and visualize output of PartMC simulations using a single general-purpose programming language.

Keywords