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

Add optional metadata fields for constituent implementation

Open peverwhee opened this issue 2 years ago • 4 comments

Description

For the purposes of completing the constituent infrastructure in CAMDEN, @gold2718 and I propose two new optional metadata fields:

  • molar_mass (float)
  • input_names (list): list of aliases found on file for reading input data file

Additionally: a new interface will be generated (akin to ccpp_physics_suite_variables) that will return the input_names list for each variable.

Aside: a related optional metadata field is already in NCAR/ccpp-framework/main:

  • advected (boolean, default false): if true, this is an advected constituent

Alternatives (optional)

During discussion of this at the CCPP Framework meeting, there was some pushback on the input_names field because:

  1. "non-standard" fieldnames like "T" and "state_T" (for example) introduce unwanted ambiguity
  2. Since the framework should have nothing to do with I/O it seems iffy to include these names that are very much tied to I/O

One related suggestion was to change the name of the field from input_names to known_aliases or input_aliases for clarity. Though this does not resolve the ambiguity of the aliases themselves or the I/O ties.

peverwhee avatar Jan 18 '23 01:01 peverwhee

  1. "non-standard" fieldnames like "T" and "state_T" (for example) introduce unwanted ambiguity

I've been wondering about this, especially with names such as "state_T" which are from a very specific source not likely to be widely used. Perhaps this needs to be a host-model function.

On the other hand:

Since the framework should have nothing to do with I/O it seems iffy to include these names that are very much tied to I/O

I think there have been calls for the CCPP Framework to provide a way to have a diagnostic name that is different from the standard name. Because many diagnostic fields are widely shared, how do we provide this service without being too I/O about it?

gold2718 avatar Jan 18 '23 08:01 gold2718

I've been thinking about this all day and still don't have a clear idea. I think perhaps we move the input names list (and interface) to the host side and deal with the diagnostic fields in the future.

peverwhee avatar Jan 19 '23 03:01 peverwhee

One additional proposed metadata field:

  • default_value (float): what a constituent will default to if not on the initial data file

peverwhee avatar Jun 09 '23 19:06 peverwhee