Skip to content

Update MOSAIC_v2 for coupling to PartMC - #1

Draft
jcurtis2 wants to merge 14 commits into
mosaic_partmcfrom
partmc-library
Draft

jcurtis2 wants to merge 14 commits into
mosaic_partmcfrom
partmc-library

Conversation

@jcurtis2

@jcurtis2 jcurtis2 commented Jun 8, 2026 •

Copy link
Copy Markdown
Member
  • Removed incorrectly added files in compile directory from git tracking.
  • Created Dockerfile and simple github workflow for building MOSAIC_v2 and running simple MOSAIC case
  • Removed unneeded sectional code to avoid PartMC-MOSAIC seg faults
  • Generalized build process to build for GNU compilers rather than only PGI
    • Likewise, change to cpu_time as its more general

@jcurtis2 jcurtis2 self-assigned this Jun 8, 2026
jcurtis2 and others added 8 commits June 8, 2026 10:37
The gfortran flags had no optimisation level, so the library was built
at -O0. In a PartMC urban-plume run with 10,000 particles this made
MOSAIC about 3x slower than with -O2.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Several routines that are called once per bin declared local work arrays
dimensioned by nbin_a_max while using only element ibin. gfortran
heap-allocates these on every call, which is costly when each PartMC
particle is a bin.

- ASTEM_flux_soa: size df_gas_o, flux_o, phi_volatile_o as (.., ibin:ibin)
- aerosol_phase_state, calculate_kelvin: DpmV, kelvin, volume_a are scalars
- MESA_PTC, MESA_convergence_criterion: mass_dry_salt is a scalar

No change in results.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Compile with -O2 and avoid per-bin work-array allocation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants