PyPSA / atlite

Atlite: A Lightweight Python Package for Calculating Renewable Power Potentials and Time Series
https://atlite.readthedocs.io
254 stars 86 forks source link

Merging cutouts / Integrate downloaded SARAH data into existing ERA-5 cutout #341

Closed ladder-upstroke closed 3 months ago

ladder-upstroke commented 4 months ago

I tried posting this to the PyPSA mailing list, where it may be more suitable, but my join request was not accepted since Tuesday.

Description

I have predownloaded cutouts with ERA-5 data and would now like to start working with SARAH data. Is there a way to avoid redownloading all the ERA-5 data when building the SARAH cutout?

I went through the example notebook and searched the GitHub issues and the mailing list but could not find anything.

Expected Behavior

When supplying sarah_dir= to atlite.Cutout( where the netCDF file in path= already exists, I had hoped that the SARAH data would be integrated into the existing cutout, so that no new downloading of ERA-5 is necessary.

Actual Behavior

UserWarning: Arguments module, sarah_dir, x, y, time are ignored, since cutout is already built.

Thanks for your great work!

euronion commented 3 months ago

Hi there,

Unfortunately we don't support that functionality. Whenever you prepare a feature involving ERA5, the data is downloaded again.

It might be possible to merge the underlying netCDF files and data, but since we process the datasets, do grid, temporal alignment and interpolation during the interpolation step, this is rather complicated and error prone.

What you can do, is built a second cutout based only on SARAH data for the features="influx" , by passing this to the .prepare(...) function. That feature does not require any downloads of ERA5 data.

P.S.: If the mailing list request is not accepted, you can also try the discord server.