Skip to content

FIX: Gradient calculation was using sharpest increase, not decrease. - #1065

Merged
zssherman merged 1 commit into
ARM-DOE:mainfrom
rcjackson:wavelet_fix1
Oct 5, 2026
Merged

zssherman merged 1 commit into
ARM-DOE:mainfrom
rcjackson:wavelet_fix1

Conversation

@rcjackson

Copy link
Copy Markdown
Collaborator

What changed

2-4 bullets in plain language.

  • The Harr Wavelet technique was finding the maximum in vertical gradient in SNR when it should be the minimum.
  • The scale factor should have been in log2 space.

Why

1-2 lines on the user/problem impact.

The current implementation will cause PBL heights to be improperly estimated as the wavelet technique will lock upon regions with higher SNR above the layer, which is backwards to what we expect at the PBL top. So this fixes that.

Issues closed

List issue references this PR closes (for example: Closes #123, Fixes #456).

Validation

Mark each item as done or N/A. Add one short evidence line for each item.

  • I ran pre-commit or ruff

  • I ran tests and/or added tests

AI usage & manual verification

If AI tools were used, complete this section.

  • AI used: yes
  • Model/tooling: Claude Opus 5 / Claude Code
  • Tasks delegated to AI: Validation of code + REAL data analysis
  • Manual verification performed: Yes

Use Xarray Dataset naming

When adding dataset usage to the code use ds for Datasets and da for
DataArrays

Impact note (optional): PBL heights from the Harr wavelet technique will change.

@zssherman
zssherman merged commit 7d99e72 into ARM-DOE:main Oct 5, 2026
23 of 25 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

Development

Successfully merging this pull request may close these issues.

2 participants