Skip to content

Commit 80c19f1

Browse files
committed
dev
1 parent 28d624b commit 80c19f1

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

cf/regrid/regrid.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,12 @@ def create_esmpy_mesh(grid, mask=None):
16441644
The `esmpy.Mesh` derived from *grid*.
16451645
16461646
"""
1647+
if grid.mesh_location == "point":
1648+
raise ValueError(
1649+
f"Can't regrid {'from' if grid.name == 'source' else 'to'} "
1650+
f"a {grid.name} grid of UGRID point cells"
1651+
)
1652+
16471653
if grid.coord_sys == "spherical":
16481654
coord_sys = esmpy.CoordSys.SPH_DEG
16491655
else:

0 commit comments

Comments
 (0)