Skip to content

Refactor C3P and introduce CCPP interface with MPAS compatibility; migrate to submodule#1104

Open
lisa-bengtsson wants to merge 8 commits intoNOAA-EMC:developfrom
lisa-bengtsson:c3
Open

Refactor C3P and introduce CCPP interface with MPAS compatibility; migrate to submodule#1104
lisa-bengtsson wants to merge 8 commits intoNOAA-EMC:developfrom
lisa-bengtsson:c3

Conversation

@lisa-bengtsson
Copy link
Copy Markdown
Contributor

This PR introduces a major refactoring of the community convective cloud parameterization (C3P), including a new CCPP-facing interface that is compatible with shared MPAS code. As part of this effort, the codebase is migrated from a subdirectory into a standalone repository.

  • Kept the existing CCPP-facing interface from ccpp-physics/physics/CONV/C3/cu_c3_driver.F90 mostly intact, with corresponding updates to newly added cu_c3_driver.meta.

  • Extracted the MPAS-facing driver from module_cu_c3.F90 and renamed it cu_c3_driver_mpas.F90.

  • Added the needed module_cu_c3 dependencies to the CCPP metadata/build path.

  • Temporarily call initModConvParGF() to initialize default namelist/configuration variables. Longer term, these should likely be exposed through the standard UFS/CCPP namelist mechanism.

  • Import only the plume-control variables needed by the CCPP driver loop; the remaining initialized module variables are used internally by CUP_C3.

  • Reworked the CCPP driver to transpose CCPP (i,k) arrays into the shared C3 (k,i) layout before calling CUP_C3.

  • Reconstructed MPAS-style thermodynamic states in the CCPP driver, including temp_old, temp_new, temp_new_BL, and temp_new_ADV, using dynamics and PBL tendencies where available.

  • Added wiring to output PBL t and q tendencies from GFS_PBL_generic_post.F90 and mynnedmf_wrapper_post.F90

  • Converted CCPP specific humidity inputs/tendencies to dry-air mixing ratio for consistency with C3.

  • Adjusted land/sea-mask handling, surface flux units, surface temperature, LCL/source-parcel perturbations, and related preprocessing to more closely match the MPAS driver.

  • Replaced the legacy shallow/deep CCPP call block with a direct CUP_C3 path patterned after the MPAS driver and the shared C3 call structure.

  • Kept the existing CCPP postprocessing section, adding mappings from the shared C3 plume-indexed outputs back into the legacy CCPP arrays.

  • Preserved the existing OpenACC directives in the CCPP driver where possible, but CUP_C3 itself will need OpenACC/device treatment before this is GPU-ready.

  • Renamed relevant C3 source files from .F to .F90 so they compile consistently as free-form Fortran.

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.

1 participant