Skip to content

Conversation

@uramirez8707
Copy link
Contributor

Description
Refactor the fms_yaml_parser code to enhance readability, maintainability, and in-code documentation
Adds support for yaml anchors in fms_yaml_parser (Fixes #1677)
Adds code to allow grouping variables by module in the diag yaml (Fixes #1678)

How Has This Been Tested?
CI including new tests!

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

Comment on lines 287 to 289
case (MAX_LEVELS_REACH)
call mpp_error(FATAL, "The file:"//trim(filename)//" has reached the maximum number of level!"//&
"Try setting -DMAX_LEVELS to a number greater than the current limit.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Defining the macro requires a recompile and the message should say that. Is there a way to make MAX_LEVELS a runtime option?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I’ve updated the error message.

Yes, making MAX_LEVELS a runtime option would be cleaner.

I didn’t pursue it yet since none of our current YAMLs come close to that limit, but I've open an issue to work on that in a future release: #1755

@vithikashah001 vithikashah001 merged commit c39f610 into NOAA-GFDL:main Aug 21, 2025
28 of 29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants