Skip to content

Fix biharmonic velocity mixing at boundary vertices#456

Open
xylar wants to merge 1 commit into
E3SM-Project:developfrom
xylar:omega/fix-del4-curl-operator
Open

Fix biharmonic velocity mixing at boundary vertices#456
xylar wants to merge 1 commit into
E3SM-Project:developfrom
xylar:omega/fix-del4-curl-operator

Conversation

@xylar

@xylar xylar commented Jul 2, 2026

Copy link
Copy Markdown

Compute the Laplacian of relative vorticity (Del2RelVortVertex) over the full vertex valid range [MinLayerVertexTop, MaxLayerVertexBot] and clamp each edge contribution to that edge's valid range [MinLayerEdgeTop, MaxLayerEdgeBot], matching VorticityAuxVars::computeVarsOnVertex.

Previously Del2RelVortVertex was computed only over the narrower [MinLayerVertexBot, MaxLayerVertexTop] range (layers where every surrounding cell is active) and summed Del2Edge with no per-edge clamp. The biharmonic velocity tendency (VelocityHyperDiffOnEdge) reads Del2RelVortVertex over the edge range up to MaxLayerEdgeTop, which for a deep edge sharing a vertex with a shallower cell exceeds MaxLayerVertexTop. Those boundary-vertex layers were never computed, so on partial-bottom meshes the biharmonic term was under-computed there. This is a latent correctness bug on its own; on the fill-values branch (#428) the uncomputed layers hold FillValueReal, so the term instead blew up to ~1e45, corrupting NormalVelocity and, through the flux divergence and vertical advection, PseudoThickness and the tracers (surfaced by the new state validation in DRIVER_TEST).

The wider range gives boundary vertices a valid, generally non-zero value from their active edges; inactive edges contribute zero via the per-edge clamp and Del2Edge's zeroed boundary band, so no fill value is read.

Checklist

  • Linting
  • Testing
    • Add a comment to the PR titled Testing with the following:
      • Which machines CTest unit tests
        have been run on and indicate that are all passing.

Compute the Laplacian of relative vorticity (Del2RelVortVertex) over the
full vertex valid range [MinLayerVertexTop, MaxLayerVertexBot] and clamp
each edge contribution to that edge's valid range [MinLayerEdgeTop,
MaxLayerEdgeBot], matching VorticityAuxVars::computeVarsOnVertex.

Previously Del2RelVortVertex was computed only over the narrower
[MinLayerVertexBot, MaxLayerVertexTop] range (layers where every
surrounding cell is active) and summed Del2Edge with no per-edge clamp.
The biharmonic velocity tendency (VelocityHyperDiffOnEdge) reads
Del2RelVortVertex over the edge range up to MaxLayerEdgeTop, which for a
deep edge sharing a vertex with a shallower cell exceeds MaxLayerVertexTop.
Those boundary-vertex layers were never computed, so on partial-bottom
meshes the biharmonic term was under-computed there. This is a latent
correctness bug on its own; on the fill-values branch the uncomputed
layers hold FillValueReal, so the term instead blew up to ~1e45, corrupting
NormalVelocity and, through the flux divergence and vertical advection,
PseudoThickness and the tracers (surfaced by the new state validation in
DRIVER_TEST).

The wider range gives boundary vertices a valid, generally non-zero value
from their active edges; inactive edges contribute zero via the per-edge
clamp and Del2Edge's zeroed boundary band, so no fill value is read.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@xylar xylar added the bug Something isn't working label Jul 2, 2026
@xylar

xylar commented Jul 2, 2026

Copy link
Copy Markdown
Author

Testing

I tested this fix as part of #428

CTest unit tests:

  • Machine: chrysalis
  • Compiler: oneapi-ifx
  • Build type: Release
  • Result: All tests passed
  • Log: /gpfs/fs1/home/ac.xylar/e3sm_work/polaris/main/build_omega/build_chrysalis_oneapi-ifx/ctests.log

There are no omega_pr tests that catch this particular issue but I will report the omega_pr suite tests including this fix in #428

@xylar

xylar commented Jul 2, 2026

Copy link
Copy Markdown
Author

@sbrus89, please review along with #428 since it fixes the failing CTests you reported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants