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

Migrate to new metadata format step 1 #205

Merged

Conversation

climbfuji
Copy link
Collaborator

@climbfuji climbfuji commented Jul 25, 2019

This PR and associated PRs enable parsing metadata in the new metadata format on a file-by-file basis. All type and variable definitions in FV3 are converted to the new metadata with the correct dimensions filled in. In addition, one physics scheme (ysuvdif.F90) is also converted to the new metadata.

Changes for ccpp-framewqork:

  • remove old logic to identify kind and type definitions from mkcap.py
  • bugfixes to new metadata parser to correctly interpret optional attributes and to allow uppercase characters in variable standard names
  • improve metadata converter:
    • suppress optional argument for variable/kind/type definitions, do not convert standard names to lowercase strings
    • add host-model dependent information and add an additional conversion script for schemes that leverages information on array dimensions from type/variable definition metadata in new format
    • add a simplified version of the metadata converter for schemes that uses the type/variable definition metadata (in new format) to fill in the missing information on array dimensions
  • add functionality to detect and parse new metadata with ccpp_prebuild.py on a per-file basis

…se, skip optional and intent attributes for variable/type definitions
…ormat and convert back into old format, currently tested for schemes and module variable definitions, not yet for DDTs
…ype and kind definitions when initializing from a metadata table
@climbfuji
Copy link
Collaborator Author

Associated PRs:

https://github.com/NCAR/FV3/pull/181
#205
NCAR/ccpp-physics#288
NEMSfv3gfs: not yet created (only update of submodule pointers?)

Copy link
Collaborator

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

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

Looks okay, could use some improvement.

scripts/metavar.py Outdated Show resolved Hide resolved
scripts/parse_tools/parse_checkers.py Outdated Show resolved Hide resolved
…riable names that denote the start of a new variable block
…y: define and export LITERAL, use in logical expressions for array references
climbfuji and others added 7 commits July 31, 2019 13:44
…py: add capability to parse variable and type definition metadata tables in new metadata format on a per-file basis
…uard to prevent using multi-dimensional character arrays
…red, this only works if all DDTs are defined in the same file and in the correct order
…tments to convert type/variable definitions and fill in dimensions, array references, ...
…e tables one by one, filling in dimension information from type definitions
@climbfuji
Copy link
Collaborator Author

See https://github.com/NCAR/NEMSfv3gfs/pull/210 for regression testing.

@climbfuji climbfuji marked this pull request as ready for review August 1, 2019 13:46
Copy link
Contributor

@llpcarson llpcarson left a comment

Choose a reason for hiding this comment

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

Approved

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

3 participants