diff --git a/pyart/graph/gridmapdisplay.py b/pyart/graph/gridmapdisplay.py index 80ca87b877..518ac6e89f 100644 --- a/pyart/graph/gridmapdisplay.py +++ b/pyart/graph/gridmapdisplay.py @@ -6,16 +6,10 @@ import warnings +import cartopy import matplotlib.pyplot as plt import numpy as np -try: - import cartopy # noqa - - _CARTOPY_AVAILABLE = True -except ImportError: - _CARTOPY_AVAILABLE = False - try: import metpy # noqa @@ -76,11 +70,6 @@ class GridMapDisplay: def __init__(self, grid, debug=False): """initalize the object.""" - # check that cartopy and xarray are available - if not _CARTOPY_AVAILABLE: - raise MissingOptionalDependency( - "Cartopy is required to use GridMapDisplay but is not installed!" - ) if not _XARRAY_AVAILABLE: raise MissingOptionalDependency( "Xarray is required to use GridMapDisplay but is not installed!" diff --git a/requirements.txt b/requirements.txt index c1fe381533..736c3569c0 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,4 +11,5 @@ xradar>=0.5.0 pandas mda-xdrlib xarray!=0.21.0 +cartopy pint