[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
7e543ad0cc
commit
ea3fdb6c15
@ -560,7 +560,7 @@ def _set_countries_and_substations(n, config, country_shapes, offshore_shapes):
|
|||||||
~buses["under_construction"]
|
~buses["under_construction"]
|
||||||
)
|
)
|
||||||
|
|
||||||
c_nan_b = buses.country == 'na'
|
c_nan_b = buses.country == "na"
|
||||||
if c_nan_b.sum() > 0:
|
if c_nan_b.sum() > 0:
|
||||||
c_tag = _get_country(buses.loc[c_nan_b])
|
c_tag = _get_country(buses.loc[c_nan_b])
|
||||||
c_tag.loc[~c_tag.isin(countries)] = np.nan
|
c_tag.loc[~c_tag.isin(countries)] = np.nan
|
||||||
|
@ -470,7 +470,7 @@ if __name__ == "__main__":
|
|||||||
n = pypsa.Network(snakemake.input.network)
|
n = pypsa.Network(snakemake.input.network)
|
||||||
|
|
||||||
# remove integer outputs for compatibility with PyPSA v0.26.0
|
# 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"]
|
exclude_carriers = params.cluster_network["exclude_carriers"]
|
||||||
aggregate_carriers = set(n.generators.carrier) - set(exclude_carriers)
|
aggregate_carriers = set(n.generators.carrier) - set(exclude_carriers)
|
||||||
|
@ -537,7 +537,7 @@ if __name__ == "__main__":
|
|||||||
Nyears = n.snapshot_weightings.objective.sum() / 8760
|
Nyears = n.snapshot_weightings.objective.sum() / 8760
|
||||||
|
|
||||||
# remove integer outputs for compatibility with PyPSA v0.26.0
|
# 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)
|
n, trafo_map = simplify_network_to_380(n)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user