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

Env fixes #805

Merged
merged 9 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from 3 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
7 changes: 4 additions & 3 deletions envs/environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
- pip

- atlite>=0.2.9
- pypsa
- pypsa>=0.26.0
- linopy
- dask

Expand All @@ -27,9 +27,9 @@ dependencies:
- lxml
- powerplantmatching>=0.5.5
- numpy
- pandas>=1.4
- pandas>=2.1
- geopandas>=0.11.0
- xarray
- xarray<=2023.8.0
FabianHofmann marked this conversation as resolved.
Show resolved Hide resolved
- rioxarray
- netcdf4
- networkx
Expand All @@ -46,6 +46,7 @@ dependencies:
- tabula-py
- pyxlsb
- graphviz
- ipopt

# Keep in conda environment when calling ipython
- ipython
Expand Down
2 changes: 1 addition & 1 deletion scripts/base_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ def prefer_voltage(x, which):
~buses["under_construction"]
)

c_nan_b = buses.country.isnull()
c_nan_b = buses.country == "na"
if c_nan_b.sum() > 0:
c_tag = _get_country(buses.loc[c_nan_b])
c_tag.loc[~c_tag.isin(countries)] = np.nan
Expand Down
2 changes: 1 addition & 1 deletion scripts/cluster_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ def plot_busmap_for_n_clusters(n, n_clusters, fn=None):
n = pypsa.Network(snakemake.input.network)

# remove integer outputs for compatibility with PyPSA v0.26.0
n.generators.drop("n_mod", axis=1, inplace=True, errors='ignore')
n.generators.drop("n_mod", axis=1, inplace=True, errors="ignore")

exclude_carriers = params.cluster_network["exclude_carriers"]
aggregate_carriers = set(n.generators.carrier) - set(exclude_carriers)
Expand Down
2 changes: 1 addition & 1 deletion scripts/simplify_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def cluster(
Nyears = n.snapshot_weightings.objective.sum() / 8760

# remove integer outputs for compatibility with PyPSA v0.26.0
n.generators.drop("n_mod", axis=1, inplace=True, errors='ignore')
n.generators.drop("n_mod", axis=1, inplace=True, errors="ignore")

n, trafo_map = simplify_network_to_380(n)

Expand Down
Loading