calliope-project / ec_modules

Make energy model workflows easy as šŸ„§!
https://ec-modules.readthedocs.io/en/stable/
MIT License
4 stars 1 forks source link

New IO standard #39

Closed irm-codebase closed 1 month ago

irm-codebase commented 2 months ago

Fixes #30 and #14

IO concept

IO standard to make modules easier to use on the user/model side, which meets snakemake's recommended structure.

The preexisting hydropower module and the module template were updated to showcase it.

Inputs

Configuration

Outputs

Check the hydropower README for detailed info. A brief summary:

irm-codebase commented 2 months ago

Resulting structure when running in euro-calliope-modular

units is the name of the resolution used by euro calliope, so it's the name used for the folders. If instead someone passed files for national.geojson, ehighways.geojson, etc; they'd have separate folders for each.

Please note that 2016 is just a wildcard. This makes it possible to request data for different resolutions for different years.

module_hydropower
ā”œā”€ā”€ resources
ā”‚   ā”œā”€ā”€ basins
ā”‚   ā”‚   ā””ā”€ā”€ raw_eu.geojson
ā”‚   ā”œā”€ā”€ Geth_2015_PHS_capacity.csv
ā”‚   ā”œā”€ā”€ IRENA_hydro_generation.csv
ā”‚   ā”œā”€ā”€ jrc_hydropower_plants.csv
ā”‚   ā””ā”€ā”€ user_input
ā”‚       ā””ā”€ā”€ units.geojson
ā””ā”€ā”€ results
    ā”œā”€ā”€ basins
    ā”‚   ā””ā”€ā”€ preprocessed_eu.gpkg
    ā”œā”€ā”€ jrc_hydropower_plant_database_preprocessed.csv
    ā”œā”€ā”€ plots
    ā”‚   ā”œā”€ā”€ basins
    ā”‚   ā”‚   ā””ā”€ā”€ basin_eu.png
    ā”‚   ā””ā”€ā”€ units
    ā”‚       ā””ā”€ā”€ 2016
    ā”‚           ā””ā”€ā”€ plot_cutout.png
    ā””ā”€ā”€ shapes
        ā””ā”€ā”€ units
            ā”œā”€ā”€ 2016
            ā”‚   ā”œā”€ā”€ capacity_factors_reservoir.csv
            ā”‚   ā”œā”€ā”€ capacity_factors_ror.csv
            ā”‚   ā”œā”€ā”€ cutout.nc
            ā”‚   ā”œā”€ā”€ hydropower_inflow_energy.nc
            ā”‚   ā””ā”€ā”€ hydropower_inflow_m3.nc
            ā”œā”€ā”€ hydropower_storage_capacity.csv
            ā””ā”€ā”€ hydropower_supply_capacity.csv

13 directories, 17 files
irm-codebase commented 2 months ago

@jnnr Thanks for the feedback!

Couple of clarifications, based on our discussion:

I think renaming user_input makes sense for the points you raised. However:

How about resources/customisable/ | resources/custom? And if we have non-customisable resources that users must give, we just tell them to drop it in resources/ with a specific name.

irm-codebase commented 2 months ago

@jnnr I've updated the module to the agreed convention. Please let me know if I can merge this so the templates are updated.