Skip to content

Commit

Permalink
Only try GRIB if it is available.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmav99 committed Apr 26, 2023
1 parent b0b5754 commit ed9e87c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions inspectds/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@
except RuntimeError:
IS_GRIB_AVAILABLE = False

SUPPORTED_DATASETS = {
"netcdf",
"zarr",
}

if IS_GRIB_AVAILABLE:
SUPPORTED_DATASETS = {
"grib",
Expand Down Expand Up @@ -131,7 +126,7 @@ def inspect_dataset(
dataset_type = infer_dataset_type(path)

open_dataset_kwargs: dict[str, typing.Any] = {}
if dataset_type == DATASET_TYPE.GRIB:
if IS_GRIB_AVAILABLE and dataset_type == DATASET_TYPE.GRIB:
open_dataset_kwargs.update(
dict(
engine="cfgrib",
Expand Down

0 comments on commit ed9e87c

Please sign in to comment.