Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support derived types in Fortran namelists #545

Merged
merged 7 commits into from
Jul 24, 2024

Conversation

maddenp-noaa
Copy link
Contributor

Synopsis

Given config.yaml

a:
  b:
    i: 77
    j: 88

Old behavior:

$ uw config realize --input-file config.yaml --output-format nml
[2024-07-24T15:53:51]    ERROR Cannot realize depth-3 config to type-'nml' config

New behavior:

$ uw config realize --input-file config.yaml --output-format nml
&a
    b%i = 77
    b%j = 88
/

This involves removing the restriction on depth of NMLConfig initialization data, as any level of derived-type member access via % separators. I have added some content to the config realize CLI docs to clarify this.

Type

  • Enhancement (adds new functionality)

Impact

  • This is a non-breaking change (existing functionality continues to work as expected)

Checklist

  • I have added myself and any co-authors to the PR's Assignees list.
  • I have reviewed the documentation and have made any updates necessitated by this change.

Copy link
Contributor

@christinaholtNOAA christinaholtNOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for this quick-turnaround user request!

src/uwtools/config/formats/nml.py Show resolved Hide resolved
@maddenp-noaa maddenp-noaa merged commit 77378bb into ufs-community:main Jul 24, 2024
2 checks passed
@maddenp-noaa maddenp-noaa deleted the nml-derived-types branch July 24, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants