Skip to content

Registry should allow for registered variables to also be dimensions of other variables #390

Description

@nusbaume

What is the feature/what would you like to discuss?

Many registry variables have a dimensions attribute, with most of those dimensions being defined by the CCPP-framework itself. However, it would be beneficial to have the ability to use other registered variables (assuming they are scalar integers with pre-set values) as dimensions when need be, especially for variables that might have specialized or unique dimensions that aren't generally used elsewhere.

Doing this would require generate_registry_data.py to do the following:

  1. Check if the dimension names already exist in the registry variable dictionary (if not already one of the official CCPP-framework dimensions)
  2. If it does exist in the dictionary, check that the variable is an integer type with no dimensions (i.e. a scalar)
  3. Also, check that the variable is either declared a parameter, or has an initial_value attribute.
  4. Finally, if all those checks pass, then the script will need to modify the auto-generated code so that the allocation is done with the provided registry variable(s).

Once this work is done, a couple of unit tests could be added to ensure that it works as expected.

Is there anyone in particular you want to be part of this conversation?

@peverwhee @cacraigucar

Will this change (regression test) answers?

No

Will you be implementing this enhancement yourself?

Any Software Engineer can do this

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions