modify to run without GEBCO and without hydro
This commit is contained in:
parent
e44c5491af
commit
5ea60a1ee0
29
Snakefile
29
Snakefile
@ -93,7 +93,7 @@ rule build_bus_regions:
|
||||
script: "scripts/build_bus_regions.py"
|
||||
|
||||
rule build_cutout:
|
||||
output: "cutouts/{cutout}"
|
||||
output: directory("cutouts/{cutout}")
|
||||
resources: mem=config['atlite'].get('nprocesses', 4) * 1000
|
||||
threads: config['atlite'].get('nprocesses', 4)
|
||||
benchmark: "benchmarks/build_cutout_{cutout}"
|
||||
@ -110,7 +110,9 @@ rule build_renewable_profiles:
|
||||
base_network="networks/base.nc",
|
||||
corine="data/bundle/corine/g250_clc06_V18_5.tif",
|
||||
natura="resources/natura.tiff",
|
||||
gebco="data/bundle/GEBCO_2014_2D.nc",
|
||||
gebco=lambda wildcards: ("data/bundle/GEBCO_2014_2D.nc"
|
||||
if "max_depth" in config["renewable"][wildcards.technology].keys()
|
||||
else []),
|
||||
country_shapes='resources/country_shapes.geojson',
|
||||
offshore_shapes='resources/offshore_shapes.geojson',
|
||||
regions=lambda wildcards: ("resources/regions_onshore.geojson"
|
||||
@ -124,15 +126,16 @@ rule build_renewable_profiles:
|
||||
# group: 'feedin_preparation'
|
||||
script: "scripts/build_renewable_profiles.py"
|
||||
|
||||
rule build_hydro_profile:
|
||||
input:
|
||||
country_shapes='resources/country_shapes.geojson',
|
||||
eia_hydro_generation='data/bundle/EIA_hydro_generation_2000_2014.csv',
|
||||
cutout="cutouts/" + config["renewable"]['hydro']['cutout']
|
||||
output: 'resources/profile_hydro.nc'
|
||||
resources: mem=5000
|
||||
# group: 'feedin_preparation'
|
||||
script: 'scripts/build_hydro_profile.py'
|
||||
if 'hydro' in config['renewable'].keys():
|
||||
rule build_hydro_profile:
|
||||
input:
|
||||
country_shapes='resources/country_shapes.geojson',
|
||||
eia_hydro_generation='data/bundle/EIA_hydro_generation_2000_2014.csv',
|
||||
cutout="cutouts/" + config["renewable"]['hydro']['cutout']
|
||||
output: 'resources/profile_hydro.nc'
|
||||
resources: mem=5000
|
||||
# group: 'feedin_preparation'
|
||||
script: 'scripts/build_hydro_profile.py'
|
||||
|
||||
rule add_electricity:
|
||||
input:
|
||||
@ -305,7 +308,9 @@ rule build_country_flh:
|
||||
base_network="networks/base.nc",
|
||||
corine="data/bundle/corine/g250_clc06_V18_5.tif",
|
||||
natura="resources/natura.tiff",
|
||||
gebco="data/bundle/GEBCO_2014_2D.nc",
|
||||
gebco=lambda wildcards: ("data/bundle/GEBCO_2014_2D.nc"
|
||||
if "max_depth" in config["renewable"][wildcards.technology].keys()
|
||||
else []),
|
||||
country_shapes='resources/country_shapes.geojson',
|
||||
offshore_shapes='resources/offshore_shapes.geojson',
|
||||
pietzker="data/pietzker2014.xlsx",
|
||||
|
@ -600,7 +600,8 @@ if __name__ == "__main__":
|
||||
attach_conventional_generators(n, costs, ppl)
|
||||
|
||||
attach_wind_and_solar(n, costs)
|
||||
attach_hydro(n, costs, ppl)
|
||||
if 'hydro' in snakemake.config['renewable']:
|
||||
attach_hydro(n, costs, ppl)
|
||||
attach_extendable_generators(n, costs, ppl)
|
||||
attach_storage(n, costs)
|
||||
|
||||
|
@ -184,8 +184,9 @@ def init_globals(bounds_xXyY, n_dx, n_dy, n_config, n_paths):
|
||||
config = n_config
|
||||
paths = n_paths
|
||||
|
||||
gebco = gk.raster.loadRaster(paths["gebco"])
|
||||
gebco.SetProjection(gk.srs.loadSRS(4326).ExportToWkt())
|
||||
if "max_depth" in config:
|
||||
gebco = gk.raster.loadRaster(paths["gebco"])
|
||||
gebco.SetProjection(gk.srs.loadSRS(4326).ExportToWkt())
|
||||
|
||||
clc = gk.raster.loadRaster(paths["corine"])
|
||||
clc.SetProjection(gk.srs.loadSRS(3035).ExportToWkt())
|
||||
|
Loading…
Reference in New Issue
Block a user