diff --git a/README.md b/README.md index 06ba9c15..70312ba7 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ carbon. The data can be read using the following components: Class | Function | |------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `Climate` | Wrapper class to read all things climate, including GMST and GMSL. You can pass a `fair_path` with a NetCDF with FaIR control and pulse simulations and median FaIR runs. You can use `gmst_path` to input a CSV file with model and year anomaly data, for fitting the damage functions. | -| `EconVars` | Class to ingest sector path related data, this includes GDP and population data. Some intermediate variables are also included in this class, check the documentation for more details | +| `EconVars` | Class to ingest sector path related data, this includes GDP and population data. Some intermediate variables are also included in this class, check the documentation for more details. | | `StackedDamages` | Damages wrapper class. This class contains all the elements above and additionally reads all the computed monetized damages. A single path is needed to read all damages, and sectors must be separated by folders. If necessary, the class will save data in `.zarr` format to make chunking operations more efficient. Check documentation of the class for more details. | diff --git a/requirements.txt b/requirements.txt index fbdd29cd..dbe16139 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,7 @@ requests==2.32.3 statsmodels==0.14.4 pytest==8.3.5 pytest-cov==6.0.0 -zarr==2.18.4 +zarr==3.0.5 ruff==0.8.6 netcdf4==1.7.2 h5netcdf==1.6.1 diff --git a/src/dscim/preprocessing/input_damages.py b/src/dscim/preprocessing/input_damages.py index e55f6bb0..31af513a 100644 --- a/src/dscim/preprocessing/input_damages.py +++ b/src/dscim/preprocessing/input_damages.py @@ -14,7 +14,6 @@ from functools import partial from p_tqdm import p_map, p_umap from dscim.menu.simple_storage import EconVars -from zarr.errors import GroupNotFoundError logger = logging.getLogger(__name__) @@ -832,11 +831,7 @@ def coastal_inputs( adapt_type, vsl_valuation=None, ): - try: - d = xr.open_zarr(f"{path}/coastal_damages_{version}.zarr") - except GroupNotFoundError: - print(f"Zarr not found: {path}/coastal_damages_{version}.zarr") - exit() + d = xr.open_zarr(f"{path}/coastal_damages_{version}.zarr") if "vsl_valuation" in d.coords: if vsl_valuation is None: