Observed since 20 Oct, 20:48 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
3D aerosol particle modeling and optical property computation
Aerosol3D is a Python toolkit for modeling the 3D geometry and optical properties of atmospheric aerosol particles. It provides a unified pipeline from geometric construction to Discrete Dipole Approximation (DDA) optical computation.
AerosolOpticsData container with auto-computed Legendre moments and NetCDF I/ORequires Python >= 3.10.
pip install Aerosol3D
For development:
git clone https://github.com/openEarthModelling/Aerosol3D.git
cd Aerosol3D
pip install -e ".[dev]"
pip install pyjuliafrom Aerosol3D import (
AerosolParticle, create_sphere, MixingState,
preset_material, save_screenshot, solve_optics, SimulationConfig
)
# Create a black carbon sphere
soot = preset_material("black_carbon")
particle = AerosolParticle(
name="bc_sphere",
mixing_state=MixingState.INTERNAL,
unit="nm",
)
particle.add_mesh("core", create_sphere((0, 0, 0), 50.0), soot)
# 3D visualization
save_screenshot(particle, "sphere.png", colors={"core": "black"})
# Optical computation (Mie or DDA)
config = SimulationConfig(wavelength=550.0, source="solar")
result = solve_optics(particle, config, solver="MIE")
print(f"Extinction efficiency: {result.qext}")
Export multi-wavelength results and visualize:
from Aerosol3D.optics import from_optical_results
results = [solve_optics(particle, SimulationConfig(wavelength=w), solver="MIE")
for w in [450, 550, 650]]
data = from_optical_results(results, n_legendre=32)
data.to_netcdf("optics.nc")
See the examples/ directory for complete workflows including fractal aggregates, coated particles, and DDA-Mie comparison pipelines.
| Example | Description |
|---|---|
black_carbon_sphere.py | Bare BC sphere with DDA optics |
black_carbon_fractal.py | Fractal aggregate via pyFracAggregate with full pipeline |
coated_fractal_aggregate.py | Coated fractal aggregate comparing four Mie approximations (volume-weighted, MG, Bruggeman, core-shell) |
validate_mie_vs_dda.py | Multi-precision DDA vs Mie validation with LDR convergence analysis |
dda_mie_pyradtran_pipeline/ | 3-stage DDA/Mie optics + DISORT radiative transfer pipeline |
AerosolParticle — Particle container with multiple meshes/materialsMixingState — Internal / external mixing stateMaterial — Refractive index and densityFractalAggregate — Fractal aggregate geometrycreate_sphere(center, radius)create_ellipsoid(center, radii)create_cube(center, size)apply_distance_coating(particle, thickness, material)apply_potential_coating(particle, thickness, material)apply_ccm_coating(particle, thickness, material)apply_cam_coating(particle, thickness, material)solve_optics(particle, config, solver="DDA"|"MIE"|"MIE_CORESHELL", orientational_average=False, n_dirs=50, n_jobs=32, show_progress=True) — Optical solver dispatch with LDR polarizability (DDA) and optional parallel orientation averagingSimulationConfig(wavelength, source, precision="medium") — Simulation parameters; precision controls DDA dipole spacing (low/medium/high/ultra)AerosolOpticsData / from_optical_results(results, n_legendre) — Multi-wavelength optical property containercompute_legendre_moments(phase_function, theta) — Legendre expansion of scattering phase functionvolume_weighted(volumes, refractive_indices) — Linear volume-weighted mixingmaxwell_garnett(volumes, refractive_indices) — Maxwell-Garnett mixing rulebruggeman(volumes, refractive_indices) — Bruggeman symmetric mixing rulesolve_mie_coreshell(particle, config) — Core-shell Mie solver for coated spheresParticle.coreshell_geometry — Compute core-shell geometry from particle compositionplot_spectral_properties(data) — Extinction/scattering/absorption spectraplot_phase_function(data) — Phase function P11 vs scattering angleplot_optical_comparison(data1, data2) — Side-by-side comparison of two datasetsplot_phase_function_comparison(data1, data2) — Phase function comparison with relative differenceplot_legendre_convergence(data) — Legendre moment convergence diagnosticssave_screenshot(particle, path)save_rotation_video(particle, path)save_vtp(particle, path) / save_voxel(particle, path)# Run tests
pytest
# Run tests with coverage
pytest --cov=Aerosol3D --cov-report=term-missing
MIT License. See LICENSE for details.
DDA optical computation is powered by CEMD.jl via a Python-Julia bridge.
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.9.0 | 5 Jun 2026 | 20 |
This describes our collected data; it is not a security assessment.
Shared repository data · GitHub
Observed since 20 Oct, 20:48 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:ae49f8554d3862814b5fac557d23384a0e891d1c0b60850b9f85f94c5def329a