Skip to content

Commit

Permalink
nanmean
Browse files Browse the repository at this point in the history
  • Loading branch information
callumrollo committed Oct 8, 2024
1 parent 6b61462 commit 1bddbe1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gridded_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,8 @@ def make_map(nc, filename):
dataset = xr.open_dataset(nc)
lats = dataset.latitude.values
lons = dataset.longitude.values
coord = cartopy.crs.AzimuthalEquidistant(central_longitude=np.mean(lons),
central_latitude=np.mean(lats))
coord = cartopy.crs.AzimuthalEquidistant(central_longitude=np.nanmean(lons),
central_latitude=np.nanmean(lats))
pc = cartopy.crs.PlateCarree()
fig = plt.figure(figsize=(12, 6))
ax = fig.add_subplot(111, projection=coord)
Expand Down

0 comments on commit 1bddbe1

Please sign in to comment.