Skip to content

Commit

Permalink
add missing product_kind param to codes_new_from_file calls
Browse files Browse the repository at this point in the history
  • Loading branch information
domeniconappo committed Dec 17, 2019
1 parent 45b568e commit b958fcf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pyg2p/main/readers/grib.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
codes_index_new_from_file, codes_new_from_index, codes_new_from_file, codes_index_select,
codes_index_release, codes_release,
codes_get, codes_get_double_array, codes_get_double,
GribInternalError, codes_get_array)
GribInternalError, codes_get_array, CODES_PRODUCT_GRIB)
from numpy import ma

from ..domain.grid_details import GribGridDetails
Expand Down Expand Up @@ -98,7 +98,7 @@ def has_geopotential(self):

elif self._file_handler:
while 1:
gid = codes_new_from_file(self._file_handler)
gid = codes_new_from_file(self._file_handler, product_kind=CODES_PRODUCT_GRIB)
if gid is None:
break
has_geo = True
Expand Down Expand Up @@ -126,7 +126,7 @@ def scan_grib(self, gribs, kwargs):
codes_release(gid)
elif self._file_handler:
while 1:
gid = codes_new_from_file(self._file_handler)
gid = codes_new_from_file(self._file_handler, product_kind=CODES_PRODUCT_GRIB)
if gid is None:
break
if GRIBReader._find(gid, **kwargs):
Expand Down

0 comments on commit b958fcf

Please sign in to comment.