Commit 3cb4a28
authored
Merge pull request #456 from xylar/omega/fix-del4-curl-operator
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.3 files changed
Lines changed: 32 additions & 14 deletions
File tree
- components/omega/src/ocn
- auxiliaryVars
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
121 | 120 | | |
122 | 121 | | |
123 | | - | |
124 | 122 | | |
125 | 123 | | |
126 | 124 | | |
| |||
204 | 202 | | |
205 | 203 | | |
206 | 204 | | |
207 | | - | |
208 | | - | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
Lines changed: 22 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
83 | 92 | | |
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
87 | | - | |
88 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
89 | 101 | | |
90 | 102 | | |
91 | 103 | | |
92 | 104 | | |
93 | 105 | | |
94 | 106 | | |
95 | | - | |
96 | | - | |
| 107 | + | |
| 108 | + | |
97 | 109 | | |
98 | 110 | | |
99 | 111 | | |
| |||
118 | 130 | | |
119 | 131 | | |
120 | 132 | | |
121 | | - | |
122 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
123 | 137 | | |
124 | 138 | | |
125 | 139 | | |
| |||
0 commit comments