diff --git a/pyposeidon/moceanmesh.py b/pyposeidon/moceanmesh.py index a31f91b9..e3de330f 100644 --- a/pyposeidon/moceanmesh.py +++ b/pyposeidon/moceanmesh.py @@ -639,6 +639,9 @@ def make_oceanmesh_global(df, **kwargs): # stereo shoreline shoreline_stereo = om.Shoreline(shp=fshp_ste, bbox=extent.bbox, h0=res_min, crs=crs, stereo=True) domain = om.signed_distance_function(shoreline_stereo) + # add north pole in the mesh to avoid triangle over the north pole + if domain.eval([[0, 0]]): + pfix = np.append(pfix, [[0, 0]], axis=0) else: raise ValueError("Not implemented: bgmesh must be 'om' or None") dh = xr.open_dataset(bgmesh)