You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have recently been working on a version of PyPSA-Eur capable of running over multiple years. I mean single-year runs with data from different historical years (similar to #204), but also continuous runs over more than 1 years. Mostly this worked quite well, which is great! If multi-year runs are ever planned for PyPSA-Eur, it looks like it's not too much work to set up, and most of the work is on the data side.
One issue which cropped up is related to the variable Nyears, used (and recomputed) at a few different places in the code as follows:
It is used for investment cost computations and the global Co2 limit, but has fallen out of use in practice and PyPSA-Eur is mostly run for a single year only. In ea96d49, the snapshot weightings are updated to make their total equal to 8760:
This means that Nyears will always be equal to 1 in the codebase; I guess this was unintentional.
If PyPSA-Eur is only ever intended to be run for a single year, then it probably makes the most sense to remove Nyears from the codebase entirely in order to avoid confusion.
If, on the other hand, it's hoped that PyPSA-Eur will eventually support a time period longer than 1 year, then the issue is a little more subtle. But I think it makes sense to revert ea96d49? The motivation for that commit was to "align" operational and investment costs. But investment costs are multiplied by Nyear anyway, so I believe that ea96d49 wasn't necessary? (For example, if the model runs over 3 months, then Nyears will be 0.25, and investment costs are scaled down accordingly. This has the same effect as scaling up operational costs.)
Reverting ea96d49 should also fix the Co2 limit, which is currently actually only set to an annual limit because Nyears is always 1. (To check: first run the default tutorial model, then run the same model but over a 2-week period instead of a 1-month period. The Co2 limit is the same.)
That makes sense! Thanks for debugging this and the explanation. I have reverted this commit in c8c1c3c.
Yes, we would very much like to facilitate easy sweeps of different weather years as well as runs covering more than a single calendar year of weather data.
I have recently been working on a version of PyPSA-Eur capable of running over multiple years. I mean single-year runs with data from different historical years (similar to #204), but also continuous runs over more than 1 years. Mostly this worked quite well, which is great! If multi-year runs are ever planned for PyPSA-Eur, it looks like it's not too much work to set up, and most of the work is on the data side.
One issue which cropped up is related to the variable
Nyears
, used (and recomputed) at a few different places in the code as follows:It is used for investment cost computations and the global Co2 limit, but has fallen out of use in practice and PyPSA-Eur is mostly run for a single year only. In ea96d49, the snapshot weightings are updated to make their total equal to 8760:
This means that
Nyears
will always be equal to 1 in the codebase; I guess this was unintentional.If PyPSA-Eur is only ever intended to be run for a single year, then it probably makes the most sense to remove
Nyears
from the codebase entirely in order to avoid confusion.If, on the other hand, it's hoped that PyPSA-Eur will eventually support a time period longer than 1 year, then the issue is a little more subtle. But I think it makes sense to revert ea96d49? The motivation for that commit was to "align" operational and investment costs. But investment costs are multiplied by
Nyear
anyway, so I believe that ea96d49 wasn't necessary? (For example, if the model runs over 3 months, thenNyears
will be 0.25, and investment costs are scaled down accordingly. This has the same effect as scaling up operational costs.)Reverting ea96d49 should also fix the Co2 limit, which is currently actually only set to an annual limit because
Nyears
is always 1. (To check: first run the default tutorial model, then run the same model but over a 2-week period instead of a 1-month period. The Co2 limit is the same.)Checklist
master
branch.pypsa-eur
environment.The text was updated successfully, but these errors were encountered: