Skip to content

A local parameter initialized by a scalar times an array constructor is refused at emission #26

Description

@chenyueqi

CLUBB's `sat_mixrat_ice_k` (saturation.F90) declares
`real( kind = core_rknd ), dimension(7), parameter :: a = 100._core_rknd * (/ 6.09868993_core_rknd, 0.499320233_core_rknd, ... /)`.
The translation emits a `NotImplementedError` for the whole subprogram: `local parameter a (literal '6.09868993_core_rknd' was never hoisted, so it has no name to emit)` (`recast.transform.numpy.names`). A bare constructor is handled (`_array_elements`); a constant expression over one is not, and its literals never reach the hoisting pass.

Found 2026-09-03 on the recast-clubb tier-1 units.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:emitterthe NumPy translation (statements, expressions, parameters)bugSomething isn't workingfixed-in-prfixed on a branch, awaiting the PR's mergefound-by:clubbsurfaced by the recast-clubb extension on CLUBB_core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions