Skip to content

Commit 8330b72

Browse files
committed
update UGRID test to match cfdm
1 parent 1f2d563 commit 8330b72

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

cf/test/test_UGRID.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,18 @@ def test_read_write_UGRID_domain(self):
295295
ugrid = cf.read(self.filename3, domain=True)
296296
face, edge, point = (2, 1, 0)
297297

298+
# Get the new face, edge, point order indices for the
299+
# domains read from disk (don't hard-wire these, as
300+
# implementation choices in netcdfread.py might change the
301+
# order :))
302+
for i, u in enumerate(ugrid):
303+
if u.domain_topology().get_cell() == "point":
304+
point = i
305+
elif u.domain_topology().get_cell() == "edge":
306+
edge = i
307+
elif u.domain_topology().get_cell() == "face":
308+
face = i
309+
298310

299311
if __name__ == "__main__":
300312
print("Run date:", datetime.datetime.now())

cf/test/test_collapse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ def test_Field_collapse_ugrid(self):
824824

825825
# Check the collpsed fields writes
826826
cf.write(f, tmpfile)
827-
827+
828828
def test_Field_collapse_HEALPix(self):
829829
"""Test HEALPix collapses."""
830830
f0 = cf.example_field(12)

0 commit comments

Comments
 (0)