Skip to content

Mask raw MEaSUReS velocity to MALI hull instead of pre-extrapolating - #976

Open
trhille wants to merge 2 commits into
MPAS-Dev:mainfrom
trhille:landice/mask_velocity_interp
Open

Mask raw MEaSUReS velocity to MALI hull instead of pre-extrapolating#976
trhille wants to merge 2 commits into
MPAS-Dev:mainfrom
trhille:landice/mask_velocity_interp

Conversation

@trhille

@trhille trhille commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

Add optional valid-data source masking to interp_gridded2mali via a new valid_mask_varnames argument. When provided, no-data source cells (where any listed variable is non-finite) are excluded from the ESMF remapping weights in addition to the destination-hull footprint mask, and the weight-gen call gains --norm_type fracarea and --extrap_method neareststod so partially covered destination cells are renormalized and any unmapped cells are filled from the nearest valid source.

This lets the AIS mesh_gen case interpolate directly from the raw (unextrapolated) MEaSUReS velocity file, excluding no-data cells from the weights rather than relying on a slow offline extrapolation. BedMachine is unchanged (bed stays real, full-extent). Extrapolated-source cases are a no-op because their all-finite fields yield an all-ones mask that leaves the gated flags off.

Update AIS user guide and framework developer docs accordingly.

Checklist

  • User's Guide has been updated
  • API documentation in the Developer's Guide (api.rst) has any new or modified class, method and/or functions listed
  • Documentation has been built locally and changes look as expected
  • Document (in a comment titled Testing in this PR) any testing that was used to verify the changes

Add optional valid-data source masking to interp_gridded2mali via a new
valid_mask_varnames argument. When provided, no-data source cells (where
any listed variable is non-finite) are excluded from the ESMF remapping
weights in addition to the destination-hull footprint mask, and the
weight-gen call gains --norm_type fracarea and --extrap_method neareststod
so partially covered destination cells are renormalized and any unmapped
cells are filled from the nearest valid source.

This lets the AIS mesh_gen case interpolate directly from the raw
(unextrapolated) MEaSUReS velocity file, excluding no-data cells from the
weights rather than relying on a slow offline extrapolation. BedMachine is
unchanged (bed stays real, full-extent). Extrapolated-source cases are a
no-op because their all-finite fields yield an all-ones mask that leaves
the gated flags off.

Update AIS user guide and framework developer docs accordingly.
ESMF forbids --extrap_method with conservative regridding, so the raw
MEaSUReS velocity interpolation failed. Drop the invalid flag and instead
fill destination cells left unmapped by the conservative pass with nearest
active-source weights computed directly via a KD-tree and merged into the
conservative weight file. ESMF_RegridWeightGen is still called only once,
preserving the mesh_gen compute/memory profile.
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.

1 participant