NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 64 forks source link

ccpp_prebuild.py: add capability to use chunks of contiguous arrays in the run phase #520

Closed climbfuji closed 9 months ago

climbfuji commented 11 months ago

Description

As part of the "master plan" to transition all users of CCPP to the next-generation framework capgen, we want to add the capability to ccpp_prebuild to use contiguous arrays in the init, timestep_init, timestep_finalize, and finalize phases, while sending chunks of these arrays to the physics in the run phase for parallel processing (via OpenMP etc.).

We have good reasons to believe that this is faster than using blocked data structures as it is currently the case for the UFS Weather Model (and the SCM, although it doesn't matter here since it only uses one block).

If we can demonstrate that contiguous arrays are faster and easier to implement and manage, then we can transition the UFS Weather Model and other models to those arrays, remove support for blocked data structures, and remove the need to add support for blocked data structures to capgen.

Solution

Add capability to ccpp_prebuild to use contiguous arrays / chunks of contiguous arrays, similar to how it is done in capgen.

Alternatives (optional)

Add support for blocked data structures to capgen.

Related to (optional)

n/a