Skip to content

Commit

Permalink
optional level encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
EddyCMWF committed Jun 21, 2024
1 parent c3a6681 commit 4baeb37
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cfgrib/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,8 @@ def encode_cf_first(data_var_attrs, encode_cf=("parameter", "time"), time_dims=(
raise ValueError("time_dims %r not a subset of %r" % (time_dims, ALL_REF_TIME_KEYS))
else:
coords_map.extend(DATA_TIME_KEYS)
coords_map.extend(VERTICAL_KEYS)
if "level" in encode_cf:
coords_map.extend(VERTICAL_KEYS)
coords_map.extend(SPECTRA_KEYS)
return coords_map

Expand Down

0 comments on commit 4baeb37

Please sign in to comment.