Merge branch 'master' into post-merge-param
This commit is contained in:
commit
862e54770f
@ -39,7 +39,7 @@ repos:
|
||||
|
||||
# Make docstrings PEP 257 compliant
|
||||
- repo: https://github.com/PyCQA/docformatter
|
||||
rev: v1.6.5
|
||||
rev: v1.7.2
|
||||
hooks:
|
||||
- id: docformatter
|
||||
args: ["--in-place", "--make-summary-multi-line", "--pre-summary-newline"]
|
||||
|
@ -96,7 +96,7 @@ repository](https://doi.org/10.5281/zenodo.3601881).
|
||||
We strongly welcome anyone interested in contributing to this project. If you have any ideas, suggestions or encounter problems, feel invited to file issues or make pull requests on GitHub.
|
||||
- In case of code-related **questions**, please post on [stack overflow](https://stackoverflow.com/questions/tagged/pypsa).
|
||||
- For non-programming related and more general questions please refer to the [mailing list](https://groups.google.com/group/pypsa).
|
||||
- To **discuss** with other PyPSA users, organise projects, share news, and get in touch with the community you can use the [discord server](https://discord.gg/JTdvaEBb).
|
||||
- To **discuss** with other PyPSA users, organise projects, share news, and get in touch with the community you can use the [discord server](https://discord.com/invite/AnuJBk23FU).
|
||||
- For **bugs and feature requests**, please use the [PyPSA-Eur Github Issues page](https://github.com/PyPSA/pypsa-eur/issues).
|
||||
|
||||
# Licence
|
||||
|
@ -385,10 +385,11 @@ def mock_snakemake(rulename, configfiles=[], **wildcards):
|
||||
|
||||
|
||||
def override_component_attrs(directory):
|
||||
"""Tell PyPSA that links can have multiple outputs by
|
||||
overriding the component_attrs. This can be done for
|
||||
as many buses as you need with format busi for i = 2,3,4,5,....
|
||||
See https://pypsa.org/doc/components.html#link-with-multiple-outputs-or-inputs
|
||||
"""
|
||||
Tell PyPSA that links can have multiple outputs by overriding the
|
||||
component_attrs. This can be done for as many buses as you need with format
|
||||
busi for i = 2,3,4,5,.... See https://pypsa.org/doc/components.html#link-
|
||||
with-multiple-outputs-or-inputs.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
|
@ -698,8 +698,8 @@ def get_solar_gains_per_year(window_area):
|
||||
|
||||
def map_to_lstrength(l_strength, df):
|
||||
"""
|
||||
renames column names from a pandas dataframe to map tabula retrofitting
|
||||
strengths [2 = moderate, 3 = ambitious] to l_strength
|
||||
Renames column names from a pandas dataframe to map tabula retrofitting
|
||||
strengths [2 = moderate, 3 = ambitious] to l_strength.
|
||||
"""
|
||||
middle = len(l_strength) // 2
|
||||
map_to_l = pd.MultiIndex.from_arrays(
|
||||
|
@ -424,7 +424,10 @@ def clustering_for_n_clusters(
|
||||
n.links.eval("underwater_fraction * length").div(nc.links.length).dropna()
|
||||
)
|
||||
nc.links["capital_cost"] = nc.links["capital_cost"].add(
|
||||
(nc.links.length - n.links.length).clip(lower=0).mul(extended_link_costs),
|
||||
(nc.links.length - n.links.length)
|
||||
.clip(lower=0)
|
||||
.mul(extended_link_costs)
|
||||
.dropna(),
|
||||
fill_value=0,
|
||||
)
|
||||
|
||||
|
@ -1105,7 +1105,11 @@ def add_storage_and_grids(n, costs):
|
||||
cavern_types = snakemake.params["sector"]["hydrogen_underground_storage_locations"]
|
||||
h2_caverns = pd.read_csv(snakemake.input.h2_cavern, index_col=0)
|
||||
|
||||
if not h2_caverns.empty and options["hydrogen_underground_storage"]:
|
||||
if (
|
||||
not h2_caverns.empty
|
||||
and options["hydrogen_underground_storage"]
|
||||
and set(cavern_types).intersection(h2_caverns.columns)
|
||||
):
|
||||
h2_caverns = h2_caverns[cavern_types].sum(axis=1)
|
||||
|
||||
# only use sites with at least 2 TWh potential
|
||||
|
Loading…
Reference in New Issue
Block a user