own databundle (#96)

* config.default.yaml

* retrieve_databundle: docs, config and defaults

* fix capitalisation of true/false
This commit is contained in:
JanFrederickUnnewehr 2019-11-19 09:56:44 -05:00 committed by Fabian Neumann
parent 9517eda1d7
commit 6cde3e902b
5 changed files with 14 additions and 8 deletions

View File

@ -24,7 +24,7 @@ rule solve_all_elec_networks:
expand("results/networks/elec_s{simpl}_{clusters}_l{ll}_{opts}.nc", expand("results/networks/elec_s{simpl}_{clusters}_l{ll}_{opts}.nc",
**config['scenario']) **config['scenario'])
if config['enable']['prepare_links_p_nom']: if config['enable'].get('prepare_links_p_nom', False):
rule prepare_links_p_nom: rule prepare_links_p_nom:
output: 'data/links_p_nom.csv' output: 'data/links_p_nom.csv'
threads: 1 threads: 1
@ -39,12 +39,14 @@ datafiles = ['ch_cantons.csv', 'je-e-21.03.02.xls',
'NUTS_2013_60M_SH/data/NUTS_RG_60M_2013.shp', 'nama_10r_3popgdp.tsv.gz', 'NUTS_2013_60M_SH/data/NUTS_RG_60M_2013.shp', 'nama_10r_3popgdp.tsv.gz',
'nama_10r_3gdp.tsv.gz', 'time_series_60min_singleindex_filtered.csv', 'nama_10r_3gdp.tsv.gz', 'time_series_60min_singleindex_filtered.csv',
'corine/g250_clc06_V18_5.tif'] 'corine/g250_clc06_V18_5.tif']
if not config['tutorial']:
if not config.get('tutorial', False):
datafiles.extend(["natura/Natura2000_end2015.shp", "GEBCO_2014_2D.nc"]) datafiles.extend(["natura/Natura2000_end2015.shp", "GEBCO_2014_2D.nc"])
rule retrieve_databundle: if config['enable'].get('retrieve_databundle', True):
output: expand('data/bundle/{file}', file=datafiles) rule retrieve_databundle:
script: 'scripts/retrieve_databundle.py' output: expand('data/bundle/{file}', file=datafiles)
script: 'scripts/retrieve_databundle.py'
rule build_powerplants: rule build_powerplants:
input: input:
@ -107,7 +109,7 @@ rule build_bus_regions:
# group: 'nonfeedin_preparation' # group: 'nonfeedin_preparation'
script: "scripts/build_bus_regions.py" script: "scripts/build_bus_regions.py"
if config['enable']['build_cutout']: if config['enable'].get('build_cutout', False):
rule build_cutout: rule build_cutout:
output: directory("cutouts/{cutout}") output: directory("cutouts/{cutout}")
resources: mem=config['atlite'].get('nprocesses', 4) * 1000 resources: mem=config['atlite'].get('nprocesses', 4) * 1000
@ -121,7 +123,7 @@ else:
script: 'scripts/retrieve_cutout.py' script: 'scripts/retrieve_cutout.py'
if config['enable']['build_natura_raster']: if config['enable'].get('build_natura_raster', False):
rule build_natura_raster: rule build_natura_raster:
input: input:
natura="data/bundle/natura/Natura2000_end2015.shp", natura="data/bundle/natura/Natura2000_end2015.shp",

View File

@ -20,6 +20,7 @@ snapshots:
enable: enable:
prepare_links_p_nom: false prepare_links_p_nom: false
retrieve_databundle: true
build_cutout: false build_cutout: false
build_natura_raster: false build_natura_raster: false
@ -333,4 +334,4 @@ plotting:
H2: "Hydrogen\nStorage" H2: "Hydrogen\nStorage"
lines: "Transmission\nlines" lines: "Transmission\nlines"
ror: "Run of\nriver" ror: "Run of\nriver"

View File

@ -20,6 +20,7 @@ snapshots:
enable: enable:
prepare_links_p_nom: false prepare_links_p_nom: false
retrieve_databundle: true
build_cutout: false build_cutout: false
build_natura_raster: false build_natura_raster: false

View File

@ -7,5 +7,6 @@ countries,--,"Subset of {'AL', 'AT', 'BA', 'BE', 'BG', 'CH', 'CZ', 'DE', 'DK', '
focus_weights,--,"Keys should be two-digit country codes (e.g. DE) and values should range between 0 and 1","Ratio of total clusters for particular countries. the remaining weight is distributed according to mean load. An example: ``focus_weights: DE: 0.6 FR: 0.2``." focus_weights,--,"Keys should be two-digit country codes (e.g. DE) and values should range between 0 and 1","Ratio of total clusters for particular countries. the remaining weight is distributed according to mean load. An example: ``focus_weights: DE: 0.6 FR: 0.2``."
enable,,, enable,,,
-- prepare_links_p_nom,bool,"{true, false}","Switch to retrieve current HVDC projects from `Wikipedia <https://en.wikipedia.org/wiki/List_of_HVDC_projects>`_" -- prepare_links_p_nom,bool,"{true, false}","Switch to retrieve current HVDC projects from `Wikipedia <https://en.wikipedia.org/wiki/List_of_HVDC_projects>`_"
-- retrieve_databundle,bool,"{true, false}","Switch to retrieve databundle from zenodo via the rule :mod:`retrieve_databundle` or whether to keep a custom databundle located in the corresponding folder.
-- build_cutout,bool,"{true, false}","Switch to build cutouts via the rule :mod:`build_cutout` or whether to retrieve the data from zenodo with :mod:`retrieve_cutout`." -- build_cutout,bool,"{true, false}","Switch to build cutouts via the rule :mod:`build_cutout` or whether to retrieve the data from zenodo with :mod:`retrieve_cutout`."
-- build_natura_raster,bool,"{true, false}","Switch to create raster ``natura.tiff`` via the rule :mod:`build_natura_raster` or whether to retrieve ``natura.tiff`` from zenodo with :mod:`retrieve_natura_raster`." -- build_natura_raster,bool,"{true, false}","Switch to create raster ``natura.tiff`` via the rule :mod:`build_natura_raster` or whether to retrieve ``natura.tiff`` from zenodo with :mod:`retrieve_natura_raster`."
Can't render this file because it contains an unexpected character in line 11 and column 22.

View File

@ -20,6 +20,7 @@ snapshots:
enable: enable:
prepare_links_p_nom: false prepare_links_p_nom: false
retrieve_databundle: true
build_cutout: false build_cutout: false
build_natura_raster: false build_natura_raster: false