From b958fcfe4c9b77e36cabff728189c0b0cd18587c Mon Sep 17 00:00:00 2001 From: Domenico Nappo Date: Tue, 17 Dec 2019 15:37:24 +0100 Subject: [PATCH] add missing product_kind param to codes_new_from_file calls --- src/pyg2p/main/readers/grib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pyg2p/main/readers/grib.py b/src/pyg2p/main/readers/grib.py index 7f493cd..26ba832 100644 --- a/src/pyg2p/main/readers/grib.py +++ b/src/pyg2p/main/readers/grib.py @@ -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 @@ -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 @@ -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):