Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
1b6224e
Merge coincident nodes in structured grids on the sphere
rajeeja Aug 19, 2026
3b1016e
Keep tol in degrees when matching nodes on the sphere
rajeeja Aug 19, 2026
0d59921
Merge duplicate nodes when constructing the dual mesh
rajeeja Aug 19, 2026
70cade5
Address review: derive tol from ERROR_TOLERANCE, reuse xyz helper, cl…
rajeeja Aug 21, 2026
dde8a18
Upcast lon/lat to float64 before coincidence detection
rajeeja Aug 21, 2026
c5eaea9
Merge coincident nodes in structured grids on the sphere
rajeeja Aug 19, 2026
fa9b4be
Keep tol in degrees when matching nodes on the sphere
rajeeja Aug 19, 2026
63ba245
Address review: derive tol from ERROR_TOLERANCE, reuse xyz helper, cl…
rajeeja Aug 21, 2026
1c43cbb
Upcast lon/lat to float64 before coincidence detection
rajeeja Aug 21, 2026
9a3e017
Merge coincident nodes generally at Grid construction time
rajeeja Aug 21, 2026
d2c7c44
Remove now-redundant duplicate-node handling from dual mesh path
rajeeja Aug 21, 2026
125ec17
Exclude dead duplicate node indices from node search trees
rajeeja Aug 21, 2026
f4ce52e
Make SCRIP reader's unique-node dedup order deterministic
rajeeja Aug 21, 2026
ed92ba5
Update tests for construction-time node dedup behavior
rajeeja Aug 21, 2026
2aceeab
Merge branch 'main' into rajeeja/structured-coincident-nodes
rajeeja Aug 21, 2026
762df98
Exclude pole points from coincident-node merging
rajeeja Aug 21, 2026
89cc346
Use ERROR_TOLERANCE directly as the default node-matching radius
rajeeja Aug 25, 2026
8979606
Merge remote-tracking branch 'origin/main' into rajeeja/structured-co…
rajeeja Aug 25, 2026
4b176af
Merge remote-tracking branch 'origin/rajeeja/structured-coincident-no…
rajeeja Aug 25, 2026
ba8dbfa
Vectorize duplicate-index check and make dedup tests self-evident
rajeeja Aug 25, 2026
3ec1f71
Merge remote-tracking branch 'origin/main' into rajeeja/coincident-nodes
rajeeja Aug 27, 2026
5e8f4bd
Rename _dedupe_grid_ds_nodes to _merge_coincident_grid_ds_nodes
rajeeja Aug 27, 2026
d93f276
Make the pole carve-out a chord tolerance, not a raw |z| deviation
rajeeja Aug 27, 2026
cba8fff
Restore the duplicate-node guard on get_dual
rajeeja Aug 27, 2026
e9e3108
Re-run structured.ipynb against the rewritten structured reader
rajeeja Aug 27, 2026
cd78346
Merge branch 'main' into rajeeja/coincident-nodes
rajeeja Aug 28, 2026
851965d
Merge branch 'main' into rajeeja/coincident-nodes
rajeeja Sep 8, 2026
7a235cc
Drop the structured.ipynb re-execution now that #1690 is on main
rajeeja Sep 8, 2026
3409822
Prescreen coincident-node detection on sorted x before building a KDTree
rajeeja Sep 8, 2026
a35fd8c
Merge branch 'main' into rajeeja/coincident-nodes
Sevans711 Sep 9, 2026
77b5f83
Clarify duplicate node test comments and diagram
rajeeja Sep 10, 2026
c968d01
Test that near-coincident nodes merge within tolerance
rajeeja Sep 10, 2026
f1e6e5c
Warn when node locations are unknown and the merge is skipped
rajeeja Sep 10, 2026
e61e1fd
Explain why only face rings need corner collapsing
rajeeja Sep 10, 2026
fb25d0e
Note the merge tolerance is a chord, not degrees
rajeeja Sep 10, 2026
080906f
Cache the duplicate node map on the grid
rajeeja Sep 10, 2026
897b007
Skip the coincident merge when building the dual grid
rajeeja Sep 11, 2026
4d580fc
Strengthen tolerance test, cover the unknown-location warning, and re…
rajeeja Sep 11, 2026
0c0db1c
Say plainly that the no-duplicate path returns grid_ds untouched
rajeeja Sep 17, 2026
d4cf7e5
Skip the coincident search for formats that index a unique vertex list
rajeeja Sep 17, 2026
d70b04d
Merge remote-tracking branch 'origin/main' into rajeeja/coincident-nodes
rajeeja Sep 17, 2026
6f279af
Read central longitude from pm as well as lon_0
rajeeja Sep 17, 2026
f4db4a0
Merge branch 'main' into rajeeja/coincident-nodes
rajeeja Sep 23, 2026
780b7a9
Merge main into coincident-node handling
rajeeja Oct 19, 2026
e853b9d
Address coincident-node review findings
rajeeja Oct 19, 2026
44ee972
Ravel unique inverse for pole duplicate indexing
rajeeja Oct 22, 2026
8e051a4
Merge main into rajeeja/coincident-nodes
rajeeja Oct 23, 2026
240cafb
Merge branch 'main' into rajeeja/coincident-nodes
cmdupuis3 Oct 26, 2026
bef763b
Merge main into coincident-node canonicalization
rajeeja Nov 3, 2026
e96f7d6
Merge main into coincident-node review branch
rajeeja Nov 12, 2026
111f883
Preserve unused nonfinite nodes during coincidence matching
rajeeja Nov 12, 2026
a292320
Canonicalize deferred lazy topology for grid dual construction
rajeeja Nov 12, 2026
c606b36
Unify dual construction and canonicalize coincident face centers
rajeeja Nov 12, 2026
eb6ef72
Treat decoded missing SCRIP corners as connectivity padding
rajeeja Nov 12, 2026
0b84be6
Forward coincidence merge opt-out through dataset and file readers
rajeeja Nov 12, 2026
673018d
Preserve coincidence merge opt-out during deferred dual preparation
rajeeja Nov 12, 2026
1e5d53c
Merge branch 'main' into rajeeja/coincident-nodes
rajeeja Nov 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions test/core/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,43 @@ def test_get_dual(gridpath, datasetpath):
assert len(uxds.data_vars) == len(dual.data_vars)


def test_get_dual_aligns_node_data_with_retained_primal_nodes():
grid = ux.Grid.from_topology(
node_lon=np.array([-1.0, 0.0, 0.0, 1.0, 0.0]),
node_lat=np.array([0.0, -1.0, 0.0, 0.0, 1.0]),
face_node_connectivity=np.array(
[[2, 0, 1], [2, 1, 3], [2, 3, 4], [2, 4, 0]]
),
)
node_data = np.arange(2 * 5 * 3).reshape(2, 5, 3)
face_data = np.arange(8).reshape(2, 4)
unrelated_data = np.array([10, 20])
uxds = UxDataset(
{
"node_data": (("time", "n_node", "level"), node_data),
"face_data": (("time", "n_face"), face_data),
"unrelated": (("time",), unrelated_data),
},
uxgrid=grid,
)

with pytest.warns(Warning, match="mesh is partial"):
dual_array = uxds["node_data"].get_dual()
with pytest.warns(Warning, match="mesh is partial"):
dual_dataset = uxds.get_dual()

assert dual_array.dims == ("time", "n_face", "level")
nt.assert_array_equal(dual_array.values, node_data[:, [2], :])
assert dual_array.sizes["n_face"] == dual_array.uxgrid.n_face == 1

assert dual_dataset["node_data"].dims == ("time", "n_face", "level")
nt.assert_array_equal(dual_dataset["node_data"].values, node_data[:, [2], :])
assert dual_dataset["face_data"].dims == ("time", "n_node")
nt.assert_array_equal(dual_dataset["face_data"].values, face_data)
assert dual_dataset["unrelated"].dims == ("time",)
nt.assert_array_equal(dual_dataset["unrelated"].values, unrelated_data)


def _load_sel_subset(gridpath, datasetpath):
grid_file = gridpath("ugrid", "outCSne30", "outCSne30.ug")
data_file = datasetpath("ugrid", "outCSne30", "outCSne30_sel_timeseries.nc")
Expand Down
Loading
Loading