Skip to content

Add CARMA coagulation, growth, and nucleation#513

Merged
mattldawson merged 2 commits intomainfrom
develop-477-coagulation-growth-nucleation
Jul 29, 2025
Merged

Add CARMA coagulation, growth, and nucleation#513
mattldawson merged 2 commits intomainfrom
develop-477-coagulation-growth-nucleation

Conversation

@mattldawson
Copy link
Copy Markdown
Collaborator

Adds the ability to include coagulation, growth, and nucleation in CARMA to the MUSICA C and Python APIs.

closes #477
closes #478
closes #480

@mattldawson mattldawson requested review from K20shores and Copilot July 29, 2025 17:46
@github-actions
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for coagulation, growth, and nucleation processes to the CARMA aerosol model in both the C++ and Python APIs. These additions enable more comprehensive modeling of particle physics within CARMA simulations.

  • Introduces new configuration structures for coagulation, growth, and nucleation processes
  • Adds enumerations for particle collection and nucleation algorithms
  • Updates the API interfaces to handle the new process configurations

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/test/unit/carma/carma_c_api.cpp Adds test configuration for coagulation, growth, and nucleation processes
src/carma/interface.F90 Implements Fortran interface handling for the new process configurations
src/carma/carma_parameters.F90 Defines Fortran data structures for process configuration parameters
src/carma/carma.cpp Implements C++ API conversion between parameter structures
musica/carma.py Adds Python classes and enumerations for the new process configurations
musica/carma.cpp Implements Python bindings for the new configuration structures
include/musica/carma/carma_c_interface.hpp Defines C-compatible structures for the new configurations
include/musica/carma/carma.hpp Defines C++ structures and enumerations for the new configurations
Comments suppressed due to low confidence (1)

musica/carma.py:456

  • The type annotation uses a class name instead of an integer type hint. Since the algorithm field expects an integer value based on the enumeration constants, the type annotation should be 'int' instead of 'ParticleNucleationAlgorithm'.
                 algorithm: ParticleNucleationAlgorithm = ParticleNucleationAlgorithm.NONE,

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jul 29, 2025

Codecov Report

❌ Patch coverage is 91.74312% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.72%. Comparing base (8ed03d9) to head (ebc23b9).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/carma/interface.F90 71.87% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #513      +/-   ##
==========================================
+ Coverage   84.55%   84.72%   +0.17%     
==========================================
  Files          50       50              
  Lines        5032     5134     +102     
==========================================
+ Hits         4255     4350      +95     
- Misses        777      784       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mattldawson mattldawson merged commit 1f71c07 into main Jul 29, 2025
71 checks passed
@mattldawson mattldawson deleted the develop-477-coagulation-growth-nucleation branch July 29, 2025 18:28
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.

Wrap CARMA_AddNucleation function Wrap CARMA_AddGrowth function Wrap CARMA_AddCoagulation function

4 participants