Conversation
|
📄 Documentation for this branch is available at: https://ncar.github.io/musica/branch/develop-add-carma/ |
There was a problem hiding this comment.
Pull Request Overview
This PR integrates the CARMA aerosol model into MUSICA’s C, C++, and Python interfaces, enabling users to query the CARMA version via all APIs.
- Adds Fortran-to-C interface routines for CARMA version retrieval and matching free functions
- Implements C API and C++
CARMA::GetVersion(), Python bindings, and unit tests - Updates CMake, packaging, CI, and documentation to conditionally build and expose CARMA
Reviewed Changes
Copilot reviewed 45 out of 45 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/tuvx/tuvx.cpp | Updated InternalFreeTuvxVersion call to include version_length |
| src/tuvx/interface.F90 | Adjusted TUVX interface to null-terminate strings and free memory |
| src/carma/interface.F90 | Added Fortran interface routines for CARMA version retrieval |
| src/carma/carma_c_interface.cpp | Implemented C API GetCarmaVersion and matching free calls |
| src/carma/carma.cpp | Added CARMA::GetVersion() method |
| src/CMakeLists.txt | Integrated CARMA sources into the main build |
| src/packaging/CMakeLists.txt | Installed CARMA target alongside MUSICA exports |
| spack/packages/musica/package.py | Introduced +carma variant and dependencies |
| musica/carma.py | Exposed musica.carma.version and CARMA class |
| musica/carma.cpp | Added PyBind11 binding for CARMA version |
| musica/backend.py | Added carma_available() check |
| musica/init.py | Exported CARMA in the public API |
| CMakeLists.txt | Added MUSICA_ENABLE_CARMA option and enabled Fortran when needed |
| .github/workflows/ubuntu.yml | Updated CI matrix to include CARMA build flag |
| README.md | Documented CARMA component in project overview |
Comments suppressed due to low confidence (3)
musica/binding_common.cpp:20
- [nitpick] The submodule description refers to a photolysis calculator (TUVX). Please update it to correctly describe CARMA as the aerosol model.
py::module_ carma = m.def_submodule("_carma", "Wrapper classes for CARMA photolysis calculator");
.github/workflows/ubuntu.yml:26
- The CI matrix never enables CARMA. Add at least one combination with
carma: ONto exercise the CARMA backend in CI.
- {micm: ON, tuvx: OFF, carma: OFF, python: ON}
include/musica/carma/carma_c_interface.hpp:17
- [nitpick] Document that the caller is responsible for freeing the returned pointer (e.g., using
delete[]) or provide a matchingFreeCarmaVersionfunction for C consumers.
char* GetCarmaVersion();
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #418 +/- ##
==========================================
- Coverage 86.62% 83.63% -2.99%
==========================================
Files 44 48 +4
Lines 3894 4093 +199
==========================================
+ Hits 3373 3423 +50
- Misses 521 670 +149 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This PR adds CARMA to MUSICA C and Python. Currently the only thing you can do is query the version of CARMA through both APIs