ccpp-framework icon indicating copy to clipboard operation
ccpp-framework copied to clipboard

capgen should keep cap names under 63 characters (12 hours)

Open gold2718 opened this issue 5 years ago • 3 comments

Concatenating a suite name, group name, and phase can result in a cap interface name which exceeds 63 characters. Proposal is to use name mangling to keep name under 63 characters. Suite name kept to 35 characters Group names kept to 20 characters

gold2718 avatar Nov 17 '20 23:11 gold2718

I have done some investigation, and I'll just post some information about the current state of CCPP with regards to this issue, as well as a proposed solution.

Current state of CCPP

Currently there is no cap that breaks the 63 character limit. Using the longest possible names given the current suites:

37 (FV3_GFS_cpld_rasmgshocnsstnoahmp_ugwp) + 12 (fast_physics) + 7 (tsfinal is longest phase name) + 3 ("cap") + 3 concatenation underscores = 62 for a theoretical max-length name using the current state of the UFS weather model.

In actuality, the longest right now is a tie between FV3_GFS_v16_coupled_nsstNoahmpUGWPv1_fast_physics_tsfinal_cap and FV3_GFS_cpld_rasmgshocnsstnoahmp_ugwp_stochastics_tsfinal_cap at 61 characters each.

Path forward

Unless there are some other suites/groups I'm missing, setting limits to the current state of the CCPP would keep this from being an issue in the future: limit suite names to 37 characters, group names to 12 characters, and phase names (assuming we ever get new ones) to 7 characters. This could be enforced through the cap generation process itself with the right checks.

mkavulich avatar Sep 13 '22 21:09 mkavulich

I will note that I had to internally abbreviate timestep_final and timestep_init to tsfinal and tsinit in order to stay below the 63-character limit. That's always been a bit of a hack, but it's been there for two years or so and worked fine.

climbfuji avatar Sep 13 '22 21:09 climbfuji

Okay, following discussion at today's ccpp-framework meeting, I will procede with implementing this solution imposing hard limits on these string lengths in prebuild (and capgen if a simple combined change). If physics developers revolt at the idea of keeping their suites to 37 characters, we can re-visit that in the future.

mkavulich avatar Sep 13 '22 23:09 mkavulich