Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Nov 21, 2024
1 parent bd928b7 commit 1a485a4
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/anemoi/inference/grib/encoding.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
LOG = logging.getLogger(__name__)


GRIB1_ONLY = []

GRIB2_ONLY = ["typeOfGeneratingProcess"]


def _param(param):
try:
int(param)
Expand All @@ -38,6 +43,14 @@ def grib_keys(
if edition is None:
edition = 1

if edition == 1:
for k in GRIB2_ONLY:
result.pop(k, None)

if edition == 2:
for k in GRIB1_ONLY:
result.pop(k, None)

result["edition"] = edition

if param is not None:
Expand Down

0 comments on commit 1a485a4

Please sign in to comment.