Skip to content

pnnl/part2pop

Repository files navigation

part2pop

CI codecov

A unified analysis framework for standardizing aerosol populations from models, observations, and parameterizations.

part2pop is a lightweight Python library that provides a standardized representation of aerosol particles and populations. By translating model-derived, observation-constrained, and parameterized population descriptions into a common particle-population interface, particle-level process models and diagnostics can be applied consistently across data sources. Its modular, registry-based architecture supports extensible population builders, reusable analyses, and AI-assisted development workflows.

Features

  • Standardized aerosol representation via AerosolSpecies, Particle, and ParticlePopulation
  • Species registry with density, hygroscopicity (kappa), molar mass, and surface tension
  • Population builders for monodisperse, lognormal, sampled, observation-based, and model-derived populations
  • Optical-property builders supporting homogeneous spheres, core-shell particles, and fractal aggregates
  • Freezing-property builders for immersion-freezing metrics
  • Analysis utilities for size distributions, hygroscopic growth, CCN activation, and bulk moments
  • Visualization tools for size distributions, optical coefficients, and freezing curves

Optional external packages (e.g., PyMieScatt, pyBCabs, netCDF4) are used when available.

Installation

pip install part2pop

Quick start

from part2pop.population.builder import build_population

config = {
    "type": "monodisperse",
    "N": [1.0e8],
    "D": [0.2e-6],
    "aero_spec_names": [["SO4", "BC"]],
    "aero_spec_fracs": [[0.7, 0.3]],
    "D_is_wet": False,
}

pop = build_population(config)

print(pop.get_Ntot())
print([species.name for species in pop.species])

For end-to-end analysis and plotting workflows, see the notebooks in examples/.

See the contribution guidelines for contribution and support information.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages