lewisjared / rscm

A reduced-complexity climate model implemented in rust
MIT License
0 stars 0 forks source link

Support hierachical timeseries #2

Open lewisjared opened 2 weeks ago

lewisjared commented 2 weeks ago

The problem

TImeseries that can be hierarchical with constraints between them that should be conserved. For example, Emissions|CO2 should be the sum of Emissions|CO2|Anthropogenic + Emissions|CO2|LULUCF. Typically we have used | as the hierarchy separator.

Previously this required manual cascading changes which is brittle and error prone. Changes any one of the timeseries should be propagated to the other timeseries to ensure that the constraint holds.

Requirements

Questions:

Definition of "done"

Additional context

This could be done using a graph as part of the timeseries collection iff we follow some simple hierarchy rules. The edge weights could be used to denote weighted sums (e.g. CO2-equiv emissions or 4-box regions)

lewisjared commented 2 weeks ago

Using a graph for the regions might not be the most perfomant because data are not right beside each other, but the flexibility is nicer