rename "ept" to "Ept"

restructure remote rsync with remote
This commit is contained in:
Fabian 2023-07-03 17:14:50 +02:00
parent f903eba061
commit 879d2925f9
7 changed files with 31 additions and 54 deletions

11
.sync-send Normal file
View File

@ -0,0 +1,11 @@
# SPDX-FileCopyrightText: : 2021-2023 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: CC0-1.0
rules
scripts
config
config/test
envs
matplotlibrc
Snakefile

View File

@ -1,21 +0,0 @@
# SPDX-FileCopyrightText: : 2021-2023 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: CC0-1.0
.snakemake
.git
.pytest_cache
.ipynb_checkpoints
.vscode
.DS_Store
__pycache__
*.pyc
*.pyo
*.ipynb
notebooks
doc
cutouts
data
benchmarks
*.nc
configs

View File

@ -1,23 +0,0 @@
# SPDX-FileCopyrightText: : 2021-2023 The PyPSA-Eur Authors
#
# SPDX-License-Identifier: CC0-1.0
.snakemake
.git
.pytest_cache
.ipynb_checkpoints
.vscode
.DS_Store
__pycache__
*.pyc
*.pyo
*.ipynb
notebooks
benchmarks
logs
resources*
results
networks*
cutouts
data/bundle
doc

View File

@ -53,6 +53,7 @@ include: "rules/build_electricity.smk"
include: "rules/build_sector.smk"
include: "rules/solve_electricity.smk"
include: "rules/postprocess.smk"
include: "rules/validate.smk"
if config["foresight"] == "overnight":
@ -98,3 +99,14 @@ rule doc:
directory("doc/_build"),
shell:
"make -C doc html"
rule sync:
params:
cluster=f"{config['remote']['ssh']}:{config['remote']['path']}",
shell:
"""
rsync -uvarh --no-g --ignore-missing-args --files-from=.sync-send . {params.cluster}
rsync -uvarh --no-g --ignore-missing-args {params.cluster}/results results
rsync -uvarh --no-g --ignore-missing-args {params.cluster}/logs logs
"""

View File

@ -9,6 +9,10 @@ logging:
level: INFO
format: '%(levelname)s:%(name)s:%(message)s'
remote:
ssh: ""
path: ""
run:
name: "" # use this to keep track of runs with different settings
disable_progressbar: false # set to true to disable the progressbar

View File

@ -11,7 +11,7 @@ scenario:
clusters: # number of nodes in Europe, any integer between 37 (1 node per country-zone) and several hundred
- 37c
opts: # only relevant for PyPSA-Eur
- 'ept'
- 'Ept'
sector_opts: # this is where the main scenario settings are
- Co2L0-1H-T-H-B-I-A-solar+p3-dist1
@ -84,12 +84,6 @@ costs:
emission_prices: # in currency per tonne emission, only used with the option Ep
co2: 25
clustering:
simplify_network:
exclude_carriers: ['CCGT', 'lignite', 'oil', 'coal', 'OCGT', 'nuclear']
cluster_network:
exclude_carriers: ['CCGT', 'lignite', 'oil', 'coal', 'OCGT', 'nuclear']
solving:
#tmpdir: "path/to/tmp"
options:

View File

@ -108,7 +108,7 @@ def add_emission_prices(n, emission_prices={"co2": 0.0}, exclude_co2=False):
n.storage_units["marginal_cost"] += su_ep
def add_emission_prices_t(n):
def add_dynamic_emission_prices(n):
co2_price = pd.read_csv(snakemake.input.co2_price, index_col=0, parse_dates=True)
co2_price = co2_price[~co2_price.index.duplicated()]
co2_price = (
@ -341,11 +341,11 @@ if __name__ == "__main__":
logger.info("Setting emission prices according to config value.")
add_emission_prices(n, snakemake.params.costs["emission_prices"])
break
if "ept" in o:
if "Ept" in o:
logger.info(
"Setting time dependent emission prices according spot market price"
)
add_emission_prices_t(n)
add_dynamic_emission_prices(n)
ll_type, factor = snakemake.wildcards.ll[0], snakemake.wildcards.ll[1:]
set_transmission_limit(n, ll_type, factor, costs, Nyears)