Skip to content

Commit

Permalink
Merge pull request #547 from xylar/fix-lon-lat-region-masks
Browse files Browse the repository at this point in the history
Limit lon to -180 to 180 in lon-lat region masks
  • Loading branch information
xylar authored Jan 12, 2024
2 parents de7286e + ba7dd43 commit bcedec2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions conda_package/mpas_tools/mesh/mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,9 @@ def compute_lon_lat_region_masks(lon, lat, fcMask, logger=None, pool=None,

dsMasks = xr.Dataset()

# make sure lon is between -180 and 180
lon = numpy.mod(lon + 180., 360.) - 180.

Lon, Lat = numpy.meshgrid(lon, lat)

shape = Lon.shape
Expand Down

0 comments on commit bcedec2

Please sign in to comment.