Skip to content

Commit

Permalink
added north pole fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tomsail committed Dec 19, 2023
1 parent efc8de4 commit d5703c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pyposeidon/moceanmesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d5703c5

Please sign in to comment.