Skip to content

add zonal_anomaly with shared face-band weight kernel#1508

Open
rajeeja wants to merge 1 commit into
mainfrom
rajeeja/fix-zonal-anomaly
Open

add zonal_anomaly with shared face-band weight kernel#1508
rajeeja wants to merge 1 commit into
mainfrom
rajeeja/fix-zonal-anomaly

Conversation

@rajeeja
Copy link
Copy Markdown
Contributor

@rajeeja rajeeja commented May 13, 2026

Adds UxDataArray.zonal_anomaly() returning a same-dimension array where each face value has its latitude-band mean subtracted.

To avoid duplicating the expensive geometric intersection work already done by zonal_mean, the face-band overlap areas are extracted into a shared kernel _compute_face_band_weights(uxgrid, bands) that both zonal_mean and zonal_anomaly call. The conservative path blends band means across straddling faces using the same weight matrix; the default (non-conservative) path assigns each face to a band by centroid latitude.

Fixes #1247

@rajeeja rajeeja requested a review from erogluorhan May 13, 2026 16:10
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.

Add Zonal Anomaly

1 participant