diff --git a/README.rst b/README.rst index b0bb9967..2e48baaa 100644 --- a/README.rst +++ b/README.rst @@ -390,6 +390,13 @@ Data variables: orog (y, x) float32 ... tp (y, x) float32 ... acpcp (y, x) float32 ... + csnow (y, x) float32 ... + cicep (y, x) float32 ... + cfrzr (y, x) float32 ... + crain (y, x) float32 ... + cape (y, x) float32 ... + cin (y, x) float32 ... + hpbl (y, x) float32 ... Attributes: GRIB_edition: 2 GRIB_centre: kwbc @@ -504,6 +511,46 @@ Attributes: Conventions: CF-1.7 institution: US National Weather Service - NCEP... history: ..., +Dimensions: (heightAboveGroundLayer: 2, x: 93, y: 65) +Coordinates: + time datetime64[ns] ... + step timedelta64[ns] ... + * heightAboveGroundLayer (heightAboveGroundLayer) int64 1000 3000 + latitude (y, x) float64 ... + longitude (y, x) float64 ... + valid_time datetime64[ns] ... +Dimensions without coordinates: x, y +Data variables: + hlcy (heightAboveGroundLayer, y, x) float32 ... +Attributes: + GRIB_edition: 2 + GRIB_centre: kwbc + GRIB_centreDescription: US National Weather Service - NCEP... + GRIB_subCentre: 0 + Conventions: CF-1.7 + institution: US National Weather Service - NCEP... + history: ..., +Dimensions: (x: 93, y: 65) +Coordinates: + time datetime64[ns] ... + step timedelta64[ns] ... + tropopause int64 ... + latitude (y, x) float64 ... + longitude (y, x) float64 ... + valid_time datetime64[ns] ... +Dimensions without coordinates: x, y +Data variables: + pres (y, x) float32 ... + t (y, x) float32 ... + u (y, x) float32 ... +Attributes: + GRIB_edition: 2 + GRIB_centre: kwbc + GRIB_centreDescription: US National Weather Service - NCEP... + GRIB_subCentre: 0 + Conventions: CF-1.7 + institution: US National Weather Service - NCEP... + history: ..., Dimensions: (x: 93, y: 65) Coordinates: time datetime64[ns] ... diff --git a/cfgrib/dataset.py b/cfgrib/dataset.py index cd00b3b5..f039a5fd 100644 --- a/cfgrib/dataset.py +++ b/cfgrib/dataset.py @@ -433,11 +433,13 @@ def build_dataset_components( ): filter_by_keys = dict(filter_by_keys) index = stream.index(ALL_KEYS, indexpath=indexpath).subindex(filter_by_keys) - param_ids = index['paramId'] dimensions = collections.OrderedDict() variables = collections.OrderedDict() - for param_id, short_name, var_name in zip(param_ids, index['shortName'], index['cfVarName']): + for param_id in index['paramId']: var_index = index.subindex(paramId=param_id) + first = var_index.first() + short_name = first['shortName'] + var_name = first['cfVarName'] try: dims, data_var, coord_vars = build_variable_components( var_index, encode_cf, filter_by_keys,