Module setup#2
Conversation
|
Brief list of unrequested suggestions to increase compatibility with other modules.
|
|
@jnnr I've made some changes to get the tests to run, but they still don't. Could you look into why the integration test fails? Basically, running (I already updated to the latest template, so that's not needed here unlike in |
sjpfenninger
left a comment
There was a problem hiding this comment.
I think this is a good start - with a bit of cleaning up we can build on this further very well!
| aggregate: true | ||
| cutout_params: | ||
| module: era5 | ||
| x: [3.4, 7.2] |
There was a problem hiding this comment.
Shouldn't the x and y bounds come from the input geometries (I guess spatial_units/{name_spatial_units}.parquet)?
There was a problem hiding this comment.
That could be done. However, if you need Europe in NUTS0, NUTS2, NUTS3 and for several years, you will download a big dataset several times.
| import xarray as xr | ||
|
|
||
|
|
||
| def cf_agg_from_point_layout( |
There was a problem hiding this comment.
This shares a lot of code with cf_agg_from_raster_layout so I would merge the two
| @@ -0,0 +1,72 @@ | |||
| """Prepare PV capacityfactors, given a cutout, a layout, spatial units to aggregate to and technology specifications.""" | |||
There was a problem hiding this comment.
This seems to share a lot of code with prepare_capacityfactors_raster_layout.py so I would merge this into one
Co-authored-by: Stefan Pfenninger-Lee <stefan@pfenninger.org>
This sets up a first version of the data module for pv and wind capacity factors.
To test the module, download the zip file "module_pv_wind_files.zip" (https://surfdrive.surf.nl/s/NZDE4C2NKXj3EQG), unzip it and put it into a directory tests/files/. Then,
cd tests/integrationand run eithersnakemake nld_raster,snakemake nld_pointfor a small example, orsnakemake europe_rasterfor a large example.