Skip to content

Commit

Permalink
fix(gfs-etl): Ignore grib errors
Browse files Browse the repository at this point in the history
  • Loading branch information
devsjc committed Jun 12, 2024
1 parent 0e8cf86 commit 051b99d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion containers/gfs/download_combine_gfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,14 @@ def convert_file(file: str, outfolder: str) -> str | None:
"""
# Convert the file
try:
ds: list[xr.Dataset] = cfgrib.open_datasets(file, backend_kwargs={"indexpath": ""})
ds: list[xr.Dataset] = cfgrib.open_datasets(
file,
backend_kwargs={
"indexpath": "",
"grib_errors": "ignore",
"errors": "ignore",
},
)
except Exception as e:
log.error(f"Error opening dataset for file {file}: {e}")
return None
Expand Down

0 comments on commit 051b99d

Please sign in to comment.