diff --git a/src/pyaro/timeseries/Filter.py b/src/pyaro/timeseries/Filter.py index 42398fe..c26a1c0 100644 --- a/src/pyaro/timeseries/Filter.py +++ b/src/pyaro/timeseries/Filter.py @@ -1304,12 +1304,14 @@ def _update_topo_file_path(self, lat: float, lon: float) -> bool: if lon < metadata[file]["w"] or lon > metadata[file]["e"]: continue + self._topo_file = self._topo / file + break + if file is None: raise Exception( f"No matching topography file found for coordinate pair (lat={lat:.6f}; lon={lon:.6f})" ) - self._topo_file = self._topo / file else: raise FileNotFoundError