Skip to content

Conversation

@tclune
Copy link
Collaborator

@tclune tclune commented Jan 22, 2026

Types of change(s)

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Trivial change (affects only documentation or cleanup)
  • Refactor (no functional changes, no api changes)

Checklist

  • Tested this change with a run of GEOSgcm
  • Ran the Unit Tests (make tests)

Description

Related Issue

…date_from_payload

- Tests for update_from_payload with ESMF_Field (R4, R8, I4, I8, MIRROR)
- Tests for update_from_payload with ESMF_FieldBundle (R4, R8, MIRROR)
- Tests for update_payload with ESMF_Field (R4, R8, I4, I8, MIRROR)
- Tests for update_payload with ESMF_FieldBundle (R4, R8, MIRROR)
- Round-trip tests to verify data integrity
- Corner cases: no field/bundle provided, multiple consecutive updates
- Tests for overwriting existing typekind values
- Tests for proper mirror flag handling

These tests ensure reliable operation of critical framework methods
that synchronize TypekindAspect state with ESMF payloads.
- Add comprehensive test suite for TypekindAspect (19 tests)
  - Test update_payload() and update_from_payload() methods
  - Cover R4, R8, I4, I8, and MIRROR typekinds for Field and FieldBundle
  - Initialize with non-matching typekinds to avoid false positives

- Refactor FieldBundleInfo to delegate typekind handling to FieldInfo
  - Removes duplicate to_string/to_TypeKind functions
  - Fixes MIRROR typekind support for bundles (was returning 200 instead of "<MIRROR>")
  - FieldInfoGetInternal/SetInternal now handle typekind parameter
@tclune tclune added 🪲 Bugfix This fixes a bug! 0 Diff The changes in this pull request have verified to be zero-diff with the target branch. labels Jan 22, 2026
@tclune tclune requested a review from a team as a code owner January 22, 2026 16:34
@tclune tclune added the 📈 MAPL3 MAPL 3 Related label Jan 22, 2026
@tclune tclune requested a review from darianboggs January 22, 2026 16:34
Copy link
Contributor

@atrayano atrayano left a comment

Choose a reason for hiding this comment

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

This a general comment: most of the new PF unit tests call ESMF_FieldBundleDestoy. Since ESMF does not destroy any of the fields inside the bundle, this potentially would be causing a memory leak. IIn unit tests, this is mostly irrelevant, but it will be good to not "show" a bad coding practice to the rest of the users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0 Diff The changes in this pull request have verified to be zero-diff with the target branch. 🪲 Bugfix This fixes a bug! 📈 MAPL3 MAPL 3 Related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants