Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |


Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions src/dscim/preprocessing/input_damages.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down Expand Up @@ -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:
Expand Down
Loading