match build_powerplants FuelType (closes #754)

This commit is contained in:
Fabian Neumann 2023-07-23 11:07:45 +02:00
parent 9cc5be1c25
commit d45cb71b7a

View File

@ -98,13 +98,13 @@ def add_custom_powerplants(ppl, custom_powerplants, custom_ppl_query=False):
def replace_natural_gas_technology(df):
mapping = {"Steam Turbine": "OCGT", "Combustion Engine": "OCGT"}
tech = df.Technology.replace(mapping).fillna("OCGT")
return df.Technology.where(df.Fueltype != "Natural Gas", tech)
mapping = {"Steam Turbine": "CCGT", "Combustion Engine": "OCGT"}
tech = df.Technology.replace(mapping).fillna("CCGT")
return df.Technology.mask(df.Fueltype == "Natural Gas", tech)
def replace_natural_gas_fueltype(df):
return df.Fueltype.where(df.Fueltype != "Natural Gas", df.Technology)
return df.Fueltype.mask(df.Technology == "OCGT" | df.Technology == "CCGT", "Natural Gas")
if __name__ == "__main__":