calliope-project / calliope

A multi-scale energy systems modelling framework
https://www.callio.pe
Apache License 2.0
299 stars 94 forks source link

Data sources and templates #676

Closed irm-codebase closed 1 month ago

irm-codebase commented 2 months ago

What can be improved?

I am not entirely sure if this is possible in the new math, so I'm filing this as a potential feature request. Otherwise, it might be a documentation oversight...


In v0.6.10 it used to be possible to set data sources for tech_groups (now templates):

tech_groups:
    wind_onshore:  # from [@JRC:2014] Table 4
        essentials:
            name: Onshore wind
            carrier: electricity
            parent: supply
        constraints:
            resource: file=supply/capacityfactors-wind-onshore.csv
            resource_unit: energy_per_cap
            lifetime: 25

Since data sources are now a separate section, I assume this is no longer possible, since you need to provide dimensions to them (which templates do not have, since the tech is set later).

Is there a way to support this? People can define this for each tech, but it diminishes the usefulness of templates a bit.

Version

v0.7.0.dev3

brynpickering commented 1 month ago

How about templates becomes extra generic and everything can have a template that it links to. So you can have a data table template in templates and then you link to it via the template option in your data table definition?

irm-codebase commented 1 month ago

@brynpickering that would be the most flexible approach, and the logical conclusion to the idea of templates! I like the idea, if it does not add too much code on our end :+1: