Skip to content

Commit 64eb500

Browse files
authored
Merge pull request #338 from ecmwf/feature/gribjump_no_index_error
Feature/gribjump no index error
2 parents ce1f9c5 + 331c89f commit 64eb500

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

polytope_feature/datacube/backends/fdb.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from copy import deepcopy
44
from itertools import product
55

6-
from ...utility.exceptions import BadGridError, BadRequestError
6+
from ...utility.exceptions import BadGridError, BadRequestError, GribJumpNoIndexError
77
from ...utility.geometry import nearest_pt
88
from .datacube import Datacube, TensorIndexTree
99

@@ -145,6 +145,9 @@ def get(self, requests: TensorIndexTree, context=None):
145145
if "BadValue: Grid hash mismatch" in str(e):
146146
logging.info("Error is: %s", e)
147147
raise BadGridError()
148+
if "Missing JumpInfo" in str(e):
149+
logging.info("Error is: %s", e)
150+
raise GribJumpNoIndexError()
148151
else:
149152
raise e
150153

polytope_feature/utility/exceptions.py

+5
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,8 @@ def __init__(self, axis):
3838
class BadGridError(PolytopeError, ValueError):
3939
def __init__(self):
4040
self.message = "Data on this grid is not supported by Polytope."
41+
42+
43+
class GribJumpNoIndexError(PolytopeError, ValueError):
44+
def __init__(self):
45+
self.message = "GribJump index for this data was not yet written."

polytope_feature/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "1.0.30"
1+
__version__ = "1.0.31"

0 commit comments

Comments
 (0)