Skip to content

fix(crop): crop variable field by absolute lat/lon range#126

Merged
jourdain merged 1 commit into
Kitware:masterfrom
berkgeveci:fix/regional-mesh-crop
Jul 20, 2026
Merged

fix(crop): crop variable field by absolute lat/lon range#126
jourdain merged 1 commit into
Kitware:masterfrom
berkgeveci:fix/regional-mesh-crop

Conversation

@berkgeveci

Copy link
Copy Markdown
Collaborator

The variable-data crop filter (EAMExtract) trimmed by amounts measured from the global extent (range_to_trim) but applied them to the data's own bounds, while the base map (EAMTransformAndExtract) clipped at absolute lat/lon. The two frames only agree for global data, so a regional mesh (e.g. lat 55-85N) had its field mis-cropped while the map cropped correctly.

Give EAMExtract absolute LongitudeRange/LatitudeRange and mask cell centers directly, in the same [-180,180] x [-90,90] frame as EAMTransformAndExtract. Drop range_to_trim; DataReader.crop now passes the raw [min, max] ranges. Both map and field now share one convention and crop consistently for any data extent.

The variable-data crop filter (EAMExtract) trimmed by amounts measured
from the global extent (range_to_trim) but applied them to the data's
own bounds, while the base map (EAMTransformAndExtract) clipped at
absolute lat/lon. The two frames only agree for global data, so a
regional mesh (e.g. lat 55-85N) had its field mis-cropped while the map
cropped correctly.

Give EAMExtract absolute LongitudeRange/LatitudeRange and mask cell
centers directly, in the same [-180,180] x [-90,90] frame as
EAMTransformAndExtract. Drop range_to_trim; DataReader.crop now passes
the raw [min, max] ranges. Both map and field now share one convention
and crop consistently for any data extent.
@berkgeveci
berkgeveci requested a review from jourdain July 20, 2026 15:48
@berkgeveci

Copy link
Copy Markdown
Collaborator Author

@jourdain please review.

@jourdain
jourdain merged commit 47f3da2 into Kitware:master Jul 20, 2026
1 check 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