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

some small adjustments to run as single node model #1183

Merged
merged 2 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions scripts/cluster_gas_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ def build_clustered_gas_network(df, bus_regions, length_factor=1.25):
# drop pipes within the same region
df = df.loc[df.bus1 != df.bus0]

if df.empty:
return df

# recalculate lengths as center to center * length factor
df["length"] = df.apply(
lambda p: length_factor
Expand Down
12 changes: 6 additions & 6 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -2775,10 +2775,11 @@ def add_industry(n, costs):
)

domestic_navigation = pop_weighted_energy_totals.loc[
nodes, "total domestic navigation"
nodes, ["total domestic navigation"]
].squeeze()
international_navigation = (
pd.read_csv(snakemake.input.shipping_demand, index_col=0).squeeze() * nyears
pd.read_csv(snakemake.input.shipping_demand, index_col=0).squeeze(axis=1)
* nyears
)
all_navigation = domestic_navigation + international_navigation
p_set = all_navigation * 1e6 / nhours
Expand Down Expand Up @@ -3946,12 +3947,11 @@ def add_enhanced_geothermal(n, egs_potentials, egs_overlap, costs):

snakemake = mock_snakemake(
"prepare_sector_network",
# configfiles="test/config.overnight.yaml",
simpl="",
opts="",
clusters="37",
ll="v1.0",
sector_opts="730H-T-H-B-I-A-dist1",
clusters="1",
ll="vopt",
sector_opts="",
planning_horizons="2050",
)

Expand Down
Loading