CCPP History
Cheryl Craig, Courtney Peverley,�Dustin Swales, Dom Heinzeller
May 2026
Before CCPP, there was IPD
Interoperable Physics Driver written by P. Tripp (EMC) and R. Benson (GFDL) for the NGGPS “dycore” bake off.
IPD refactored old GCM physics drivers and made GFS physics accessible to others: interoperable physics!
COORD_X: 00010101
TIMESTAMP: PRE-EPOCH
FV3
MPAS
GCM
NEPTUNE
NIM
NMMUJ
FV3
Gaps in IPD interoperability
IPD did not increase flexibility for adding or reorganizing physical parameterizations.
IPD drivers were maintained by hand, 10k+ lines long.
No information (metadata) on variables needed to run a parameterization: Which quantity exactly? What units?
CCPP: improve interoperability through metadata and auto-generated interfaces based on suite definition.
COORD_X: 00010101
TIMESTAMP: PRE-EPOCH
ccpp-prebuild v0: dynamic loading
Suite definition file
All schemes compiled�into dynamic library
Open libexmaple.so
Load and run scheme test
BUILD
RUN
2017
Original design: Tim Brown (NOAA/CIRES), Dave Gill (MMM)
ccpp-prebuild metadata in code
CCPP hooks + doxygen
metadata + doxygen
looong lines and many rows
ccpp-scm: physics R&D + CCPP sandbox
COORD_X: 00010101
TIMESTAMP: PRE-EPOCH
2017
Early adoption in FV3GFS, NEPTUNE
NEPTUNE: Dom sat down with Alex Reinecke (NRL) for half a day to implement a dynamic CCPP “helloworld” suite. No visibility of code (restricted access).�Alex and his team took it from there.
FV3GFS: Incremental approach termed “hybrid CCPP”. Schemes were one by one called from CCPP instead of IPD (no CCPP group/suite caps - needed dynamic CCPP).
COORD_X: 00010101
TIMESTAMP: PRE-EPOCH
2018-ish
Issues with dynamic loading
��
Host code�(Fortran)
CCPP API�(C)
Scheme code�(Fortran)
ccpp-prebuild v3: static caps
ccpp-prebuild v3 was the first real “code generator”; it generated Fortran caps for groups and suites. This was only possible after a full adoption of CCPP in the UFS.
Side plot: the UFS-CCPP�acceptance drama (aka�bit-for-bit challenge)
2019
Metadata updates
Unwieldy metadata tables in Fortran code were replaced with accompanying metadata files. The metadata parser used by ccpp-prebuild was retired in favor of the new capgen metadata parser (see later in this talk).
2019
ccpp-prebuild static: pros & cons
�Static ccpp-prebuild v4 replaced IPD in the UFS in 2020
ccpp-prebuild v4-v7 features 1/2
optional argument
allocation/size check
unit conversion
ccpp-prebuild v4-v7 features 2/2
Subcycling of schemes to call at�higher frequency, do iterations.
�Replaced blocked data structures�(IPD-style) with chunked arrays.
foo%bar(1:ncolums)
foo(1:nblocks)
foo(1:nblocks)%� bar(1:blocksize)
vs
ccpp-prebuild releases, operations
Release | Date |
v1 | Mar 2018 |
v3 | Jun 2019 |
v4 | Mar 2020 |
v5 | Mar 2021 |
v6 | Aug 2022 |
v7 | Sep 2024 |
final | Apr 2026 |
Operations (model) | Date |
HAFS v1+ | 2023 |
GEFS-Aerosols v12.3+ | 2023 |
AQM (2 implement.) | 2024 |
NEPTUNE v1.6 | 2025-2026 |
Planned: GFS v17, GEFS v13, GCAFS, SFS, RRFS (2026-2027) | |
Capgen motivation
Prebuild has some limitations…
Capgen is a “clean sheet” design to address these limitations.
capgen features
Fortran parser
In prebuild, only the metadata files are parsed. There is no mechanism to ensure that the fortran arguments match what is in the metadata. Bad! ��Capgen parses the fortran files and compares it to the metadata for consistency.
This is done at build-time, catching potential run-time errors sooner.
Fortran/metadata checking can also be performed independently (for example, as part of a Github action)
Facilitate Scheme Portability
Prebuild has support for unit-conversions, allowing for the host and schemes to maintain their own unit conventions.
Capgen extends this approach to do a range of “variable transformations”
Introduce “Suite variables”
Some schemes require fields output from other schemes.
In prebuild, these needed to be allocated by the host (e.g., CCPP_typedefs in UFS).
In capgen, there is no need to do this. Instead, capgen will define these fields as module variables within the suite cap.
This greatly reduces the overhead in the host.
Introduce “register” phase
In addition to the “init”, “timestep_init”, “run”, and “timestep_final” phases that exist in prebuild, capgen introduces a new register phase. This phase is to be (optionally) be called before “init”.
Add built-in constituents handling
The constituents/tracer object is known to and handled by the framework, allowing schemes to:
without any intervention needed by the host model (meaning that schemes that use the constituent object are portable to other CCPP-enabled host models)
CCPP Timeline
2017
2026
2019
2021
2023
2025
v0 dynamic
v3 static
v6
capgen
prebuild
NEPTUNE v1.6
v7
v4
v5
development begins
constituents added
testing revamped
CAM4 physics
in CAM-SIMA
HAFS v1
HAFS v2/v2.1
GEFS-Aerosols v12.3
capgen challenges
Challenges with Capgen…
Capgen is currently
Challenges with Capgen…
Capgen was
Challenges with Capgen…
Capgen has been under development for ~7 years!
Considerations going forward
How can we best leverage the pros of both the capgen and prebuild designs?
As we look towards capgen version 2.0 (?), what do we want to simplify and/or clean up? What features can be removed?
How can we best improve on capgen while minimizing impacts to participant host models?