Merge branch 'master' into refactor-copy-config-get-rdir
This commit is contained in:
commit
82ac7df318
@ -115,7 +115,7 @@ if config["enable"]["retrieve"] and config["enable"].get(
|
|||||||
mem_mb=5000,
|
mem_mb=5000,
|
||||||
retries: 2
|
retries: 2
|
||||||
run:
|
run:
|
||||||
move(input[0], output[0])
|
copyfile(input[0], output[0])
|
||||||
validate_checksum(output[0], input[0])
|
validate_checksum(output[0], input[0])
|
||||||
|
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ def disable_grid_expansion_if_limit_hit(n):
|
|||||||
for name, glc in glcs.iterrows():
|
for name, glc in glcs.iterrows():
|
||||||
total_expansion = (
|
total_expansion = (
|
||||||
(
|
(
|
||||||
n.lines.query("p_nom_extendable")
|
n.lines.query("s_nom_extendable")
|
||||||
.eval(f"s_nom_min * {cols[limit_type]}")
|
.eval(f"s_nom_min * {cols[limit_type]}")
|
||||||
.sum()
|
.sum()
|
||||||
)
|
)
|
||||||
|
@ -202,9 +202,10 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
contained_years = pd.date_range(freq="YE", **snakemake.params.snapshots).year
|
contained_years = pd.date_range(freq="YE", **snakemake.params.snapshots).year
|
||||||
norm_year = config_hydro.get("eia_norm_year")
|
norm_year = config_hydro.get("eia_norm_year")
|
||||||
|
missing_years = contained_years.difference(eia_stats.index)
|
||||||
if norm_year:
|
if norm_year:
|
||||||
eia_stats.loc[contained_years] = eia_stats.loc[norm_year]
|
eia_stats.loc[contained_years] = eia_stats.loc[norm_year]
|
||||||
elif missing_years := eia_stats.index.difference(contained_years):
|
elif missing_years.any():
|
||||||
eia_stats.loc[missing_years] = eia_stats.median()
|
eia_stats.loc[missing_years] = eia_stats.median()
|
||||||
|
|
||||||
inflow = cutout.runoff(
|
inflow = cutout.runoff(
|
||||||
|
@ -26,7 +26,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
version = snakemake.params.version
|
version = snakemake.params.version
|
||||||
if "/" in version:
|
if "/" in version:
|
||||||
baseurl = f"https://raw.githubusercontent.com/{version}/outputs"
|
baseurl = f"https://raw.githubusercontent.com/{version}/outputs/"
|
||||||
else:
|
else:
|
||||||
baseurl = f"https://raw.githubusercontent.com/PyPSA/technology-data/{version}/outputs/"
|
baseurl = f"https://raw.githubusercontent.com/PyPSA/technology-data/{version}/outputs/"
|
||||||
filepath = Path(snakemake.output[0])
|
filepath = Path(snakemake.output[0])
|
||||||
|
Loading…
Reference in New Issue
Block a user