Refactor C3P and introduce CCPP interface with MPAS compatibility; migrate to submodule#1104
Open
lisa-bengtsson wants to merge 8 commits intoNOAA-EMC:developfrom
Open
Refactor C3P and introduce CCPP interface with MPAS compatibility; migrate to submodule#1104lisa-bengtsson wants to merge 8 commits intoNOAA-EMC:developfrom
lisa-bengtsson wants to merge 8 commits intoNOAA-EMC:developfrom
Conversation
… shared MPAS code. Move to stand alone submodule
28 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.