Landmask (NaturalEarth)

The outline of the landmask is obtained from Natural Earth. It is automatically downloaded on-the-fly (but only once) with cartopy and opened with geopandas. The following landmask is currently available:

  • Land 1:110m

Note

If available, it is better to use the landmask of the used data set.

The following imports are necessary for the examples.

In [1]: import cartopy.crs as ccrs

In [2]: import regionmask

In [3]: import matplotlib.pyplot as plt

Landmask

Note

From v0.5 the Caspian Sea is included in the (land-) mask.

In [4]: land = regionmask.defined_regions.natural_earth.land_110

In [5]: f, ax = plt.subplots(1, 1, subplot_kw=dict(projection=ccrs.PlateCarree()))

# use add_geometries because land.plot does not add the polygon interiors
In [6]: ax.add_geometries(land.polygons, ccrs.PlateCarree(), fc="none", ec="0.1")
Out[6]: <cartopy.mpl.feature_artist.FeatureArtist at 0x7f6cfcd00f60>

In [7]: plt.tight_layout()
_images/plotting_landmask.png