Skip to content

Constrain MAC-filled values to the variable's range#450

Merged
bpbond merged 3 commits intomainfrom
mac-drift-fix
Jan 27, 2026
Merged

Constrain MAC-filled values to the variable's range#450
bpbond merged 3 commits intomainfrom
mac-drift-fix

Conversation

@bpbond
Copy link
Copy Markdown
Member

@bpbond bpbond commented Jan 26, 2026

In the L2 step we add a Value_MAC column based on each variable's mean annual cycle, and it was possible for these imputed values to be nonsensical -- see example posted by @stephpenn1 in #433 .

This PR ensures that our MAC values are not allowed to drift outside of the variable's bounds defined in metadata/variables_metadata.csv; we truncate to that range.

Result for Steph's example:

CRC_W_2022_wx-par-den15_L2_v???

Closes #433

@bpbond bpbond requested a review from stephpenn1 January 26, 2026 19:00
@bpbond
Copy link
Copy Markdown
Member Author

bpbond commented Jan 26, 2026

If this looks good to you @stephpenn1 , and assuming tests pass, I will re-run L2 and upload to the HPC.

@bpbond bpbond merged commit 7936b3f into main Jan 27, 2026
1 check passed
@bpbond bpbond deleted the mac-drift-fix branch January 27, 2026 19:05
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.

MAC PAR drift

2 participants