Repository navigation
Description
Description
Two schemes in the same suite group cap using the same name for arguments that have different meanings (i.e., different standard name) might generate group cap that is uncompilable. See #771 for reproducer
Steps to Reproduce
sima_2026-07-15 in CAM-SIMA
capgen v0
Reproducer in #771
Two schemes, same argument name, one is constituent, another is a normal quantity. At least this situation will trigger the bug, possibly others.
Additional Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
- Machine: Derecho
- Compiler: GNU
- Suite Definition File or Scheme:
https://github.com/jimmielin/atmospheric_physics/blob/b9b4af8be3b3d08deef97721048dac5e3aaab41b/suites/suite_cam7.xml
schemes clashing ni
- https://github.com/jimmielin/atmospheric_physics/blob/b9b4af8be3b3d08deef97721048dac5e3aaab41b/schemes/microp_aero/ccpp/nucleate_ice_ccpp.F90
- https://github.com/jimmielin/atmospheric_physics/blob/b9b4af8be3b3d08deef97721048dac5e3aaab41b/schemes/gravity_wave_drag/gravity_wave_drag_convection.F90
former defines it as
[ ni ]
standard_name = mass_number_concentration_of_ice_wrt_moist_air_and_condensed_water
units = kg-1
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_layer_dimension)
intent = in
advected = True
latter defines it as
[ ni ]
standard_name = brunt_vaisalla_frequencies_at_interfaces
units = s-1
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent, vertical_interface_dimension)
intent = in
PR #771
Output
Please include any relevant log files, screenshots or other output here.
07-22 17:01 CIME.utils WARNING Error: Symbol 'ni' at (1) already has basic type of REAL
07-22 17:01 CIME.utils WARNING Error: Allocate-object at (1) must be ALLOCATABLE or a POINTER
07-22 17:01 CIME.utils WARNING Error: Dummy argument 'ni' with INTENT(IN) in variable definition context (actual argument to INTENT = OUT/INOUT) at (1)
07-22 17:01 CIME.utils WARNING Error: 'array' argument of 'allocated' intrinsic at (1) must be ALLOCATABLE
07-22 17:01 CIME.utils WARNING Error: Allocate-object at (1) must be ALLOCATABLE or a POINTER
Activity
climbfuji commentedon Jul 23, 2026
Can you clarify if this is with capgen v0 or v1?
jimmielin commentedon Jul 23, 2026
Thanks, v0. Updated in issue body
peverwhee commentedon Jul 30, 2026
@jimmielin and Claude confirmed that this issue is not present for v1 (no fix needed in
feature/capgen-v1)EDIT: ^^ this is somewhat untrue. While confirming that this specific issue isn't a problem in v1, Claude identified a similar, but distinct issue in v1 - #774
climbfuji commentedon Jul 31, 2026
Yes, thanks for the report. Will work on it in the next two weeks.
[feature/capgen-v1]: Test for issue 772 in capgen v0, fix for issue 7…
Fix local name collisions between group cap dummy arguments and locals (
mkavulich commentedon Aug 27, 2026
It looks like this was resolved with #771, and a similar remaining issue in capgenv1 is covered by #774. Closing this issue.