Skip to content

Commit

Permalink
Hot fix for compatibility with split between solid biomass and biogas…
Browse files Browse the repository at this point in the history
… in new ppm version (PyPSA#1490)

* hot fix for compatibility with split between solid biomass and biogas in new ppm version

* hot fix for compatibility with split between solid biomass and biogas in new ppm version

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
daniel-rdt and pre-commit-ci[bot] authored Jan 24, 2025
1 parent e1299af commit b7e7b40
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/build_powerplants.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,14 @@ def replace_natural_gas_fueltype(df):
.query('Fueltype not in ["Solar", "Wind"] and Country in @countries')
.assign(Technology=replace_natural_gas_technology)
.assign(Fueltype=replace_natural_gas_fueltype)
.replace({"Solid Biomass": "Bioenergy", "Biogas": "Bioenergy"})
)

# Correct bioenergy for countries where possible
opsd = pm.data.OPSD_VRE().powerplant.convert_country_to_alpha2()
opsd = opsd.query('Country in @countries and Fueltype == "Bioenergy"')
opsd = opsd.replace({"Solid Biomass": "Bioenergy", "Biogas": "Bioenergy"}).query(
'Country in @countries and Fueltype == "Bioenergy"'
)
opsd["Name"] = "Biomass"
available_countries = opsd.Country.unique()
ppl = ppl.query('not (Country in @available_countries and Fueltype == "Bioenergy")')
Expand Down

0 comments on commit b7e7b40

Please sign in to comment.