PyPSA / atlite

atlite: A Lightweight Python Package for Calculating Renewable Power Potentials and Time Series
https://atlite.readthedocs.io
MIT License
278 stars 98 forks source link

`atlite` is incompatible with `cdsapi` v0.7.3 #379

Closed irm-codebase closed 1 month ago

irm-codebase commented 2 months ago

Version Checks (indicate both or one)

Issue Description

atlite cannot download cutout data if the newest cdsapi version is present. Pinning cdsapi = 0.7.2 solves the problem, temporarily.

I'm not really sure if the issue is on the cdsapi side, or atlite's though.

Reproducible Example

import atlite

# values are random, any cutout will fail
cutout = atlite.Cutout(
    module=['era5'],
    x=slice(3, 6),
    y=slice(3, 6),
    time="2019-05-02",
    features=['runoff'],
)

Expected Behavior

Cutouts work.

Installed Versions

v0.2.14
eliasinul commented 1 month ago

not sure, if I should create a new issue. But ERA5 has changed their "time" index to "valid_time". That's breaking lots of the codes !

perhaps a ds.rename({'valid_time': 'time'})may save our life :D

image
fneum commented 1 month ago

Has been dealt with here: https://github.com/PyPSA/atlite/pull/364/files

Are you sure you’re running on the latest atlite version?

fneum commented 1 month ago

Thanks for the hint @irm-codebase, though I don’t yet understand what changed in the cdsapi. It seems to be another dependency of cdsapi that breaks things. Mysterious.

eliasinul commented 1 month ago

Has been dealt with here: https://github.com/PyPSA/atlite/pull/364/files

Are you sure you’re running on the latest atlite version?

Seems resolved. thanks for quick response !

irm-codebase commented 1 month ago

@irm-codebase glad to help! The CDS move is just causing headaches left and right.