-
Notifications
You must be signed in to change notification settings - Fork 434
EAMxx: Implement field aliasing feature with := syntax and metadata support #7570
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
Conversation
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the feedback! I've addressed all the comments from @bartgol and yourself:
All examples now use verified EAMxx field names like T_mid, qv, qc, qi, ps, RelativeHumidity, and cloud fraction fields. The implementation is ready for review. Warning Firewall rules blocked me from connecting to one or more addressesI tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
@copilot, I pushed a few fixes that tidy up the impl. However, there are a few outstanding issues I'd like to you consider in one last revision.
|
Addressed all three requests in commit 4c29a51:
The
|
Co-authored-by: mahf708 <122953255+mahf708@users.noreply.github.com>
Co-authored-by: mahf708 <122953255+mahf708@users.noreply.github.com>
Co-authored-by: mahf708 <122953255+mahf708@users.noreply.github.com>
Co-authored-by: mahf708 <122953255+mahf708@users.noreply.github.com>
6b34353
to
52ded65
Compare
52ded65
to
d891e9c
Compare
Very cool to see this whole workflow play out. Thanks @mahf708 for setting this up. |
@bartgol @jgfouca @AaronDonahue ready for integration whenever you feel good about the dashboard, etc. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
This PR implements a field aliasing feature that allows users to specify custom variable names in netcdf output while maintaining the original internal field names in EAMxx. This addresses the need for more user-friendly and tool-compatible variable names in model output.
This PR implements a field aliasing feature that allows users to specify custom variable names in netcdf output while maintaining the original internal field names in EAMxx. This addresses the need for more user-friendly and tool-compatible variable names in model output.
Key Features
Alias Syntax: Uses the delimiter
:=
to map alias names to internal field names:Comprehensive Support: Works for both output writing and input reading operations across all EAMxx I/O functionality.
Metadata Tracking: Netcdf files include
eamxx_name
attribute when aliases are used, providing clear traceability between variable names and internal field names.Backward Compatible: Existing configurations without aliases continue to work unchanged. Non-aliased fields use the same name for both netcdf variables and internal fields.
Implementation Details
Core Components:
parse_field_alias()
andprocess_field_aliases()
functions ineamxx_io_utils.hpp/cpp
AtmosphereOutput
class with alias mapping support for output operationsError Handling:
Testing: Added comprehensive unit tests (
io_alias.cpp
) covering normal usage, edge cases, and error conditions.Usage Examples
Climate Model Output:
The implementation provides a clean, intuitive way for users to customize netcdf variable names while maintaining internal field consistency and model functionality. All changes are surgical and minimal, ensuring no impact on existing functionality or performance.
Fixes #7569.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.