Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in "add_heating_capacities_installed_before_baseyear" #1301

Open
2 tasks done
cerealice opened this issue Sep 17, 2024 · 1 comment
Open
2 tasks done

Bug in "add_heating_capacities_installed_before_baseyear" #1301

cerealice opened this issue Sep 17, 2024 · 1 comment
Assignees
Labels

Comments

@cerealice
Copy link

cerealice commented Sep 17, 2024

  • I am using the current master branch.
  • I am running on an up-to-date pypsa-eur environment. Update via conda env update -f envs/environment.yaml.

Describe the Bug

When running a myopic forecast for the year 2050 there is a bug when in the script "add_existing_baseyear.py".

            valid_grouping_years = pd.Series(
                [
                    int(grouping_year)
                    for grouping_year in grouping_years
                    if int(grouping_year) + default_lifetime > int(baseyear)
                    and int(grouping_year) < int(baseyear)
                ]
                
int(grouping_year) + default_lifetime is lowe than int(baseyear), so the result is an empty pandas series that gives an error in the following lines (see image below). I guess a fix could be a simple check if that variable is empty.
Parameters that changed in my config file (I ran a single nation but I see the same bug in other spatial configurations):

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#foresight
foresight: myopic

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#scenario
# Wildcard docs in https://pypsa-eur.readthedocs.io/en/latest/wildcards.html
scenario:
  ll:
  - vopt
  clusters:
  - 5
  opts:
  - ''
  sector_opts:
  - ''
  planning_horizons:
  # - 2020
  # - 2030
  # - 2040
  - 2050

# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#countries
countries: ['IT']

Error Message

image

@cerealice cerealice added the bug label Sep 17, 2024
@cerealice
Copy link
Author

@amos-schledorn

@amos-schledorn amos-schledorn self-assigned this Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants