Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StormEurope no longer compatible with Copernicus Climate Data #633

Open
ADouglasSPRO opened this issue Jan 26, 2023 · 1 comment
Open

StormEurope no longer compatible with Copernicus Climate Data #633

ADouglasSPRO opened this issue Jan 26, 2023 · 1 comment

Comments

@ADouglasSPRO
Copy link

ADouglasSPRO commented Jan 26, 2023

Hi I've been trying to load in the Copernicus WISC simulations (now just held in the climate data store) and have been having issues with naming conventions in the StormEurope class.
I've tried changing the .nc variable name to 'lat', 'latitude', and 'latitudes,' but none of those work for this bug.

File ~/opt/anaconda3/envs/climada_env/lib/python3.8/site-packages/climada/hazard/storm_europe.py:216, in StormEurope._read_one_nc(file_name, centroids, intensity_thres)
    195 """Read a single WISC footprint. Assumes a time dimension of length 1.
    196 Omits a footprint if another file with the same timestamp has already
    197 been read.
   (...)
    212     Hazard instance for one single storm.
    213 """
    214 ncdf = xr.open_dataset(file_name)
--> 216 if centroids.size != (ncdf.sizes['latitude'] * ncdf.sizes['longitude']):
    217     ncdf.close()
    218     LOGGER.warning(('Centroids size doesn\'t match NCDF dimensions. '
    219                     'Omitting file %s.'), file_name)
File ~/opt/anaconda3/envs/climada_env/lib/python3.8/site-packages/xarray/core/utils.py:453, in Frozen.__getitem__(self, key)
    452 def __getitem__(self, key: K) -> V:
--> 453     return self.mapping[key]
KeyError: 'latitude'
@peanutfun
Copy link
Member

Maybe @tovogt and @ThomasRoosli can help with that?

We're also tracking a case where WISC files downloaded from the Copernicus Climate Data Store (CDS) cause a memory overflow when reading them into Climada, see #610 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants