Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 19, 2024
1 parent 48dcf96 commit cb16606
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/build_industry_demand.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,4 +349,4 @@ def match_technology(df):

nodal_df.to_csv(
snakemake.output.industrial_energy_demand_per_node, float_format="%.2f"
)
)
9 changes: 4 additions & 5 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def add_carrier_buses(n, carrier, nodes=None):
if not isinstance(nodes, pd.Index):
nodes = pd.Index(nodes)

n.add("Carrier", carrier) #, co2_emissions=costs.at[carrier, "CO2 intensity"])
n.add("Carrier", carrier) # , co2_emissions=costs.at[carrier, "CO2 intensity"])

n.madd("Bus", nodes, location=location, carrier=carrier)

Expand Down Expand Up @@ -2675,11 +2675,10 @@ def add_rail_transport(n, costs):

# Add location. TODO: move it into pypsa-earth
n.buses.location = n.buses.index

# Change the carrier name of oil powerplants so include it in the emission counting
n.carriers = n.carriers.rename({"oil": "oil EOP"})
n.generators['carrier'].replace("oil", "oil EOP", inplace=True)

# Change the carrier name of oil powerplants so include it in the emission counting
n.carriers = n.carriers.rename({"oil": "oil EOP"})
n.generators["carrier"].replace("oil", "oil EOP", inplace=True)

# Set carrier of AC loads
n.loads.loc[nodes, "carrier"] = "AC"
Expand Down

0 comments on commit cb16606

Please sign in to comment.