diff --git a/config.default.yaml b/config.default.yaml index 3af26442..a791578e 100644 --- a/config.default.yaml +++ b/config.default.yaml @@ -7,16 +7,21 @@ run: 'your-run-name' # use this to keep track of runs with different settings scenario: sectors: [E] # ignore this legacy setting simpl: [''] # only relevant for PyPSA-Eur - lv: [1.0,1.5] # can be any float >= 1.0 or "opt" - clusters: [45,50] # any integer between 37 and several hundred + lv: [1.0,1.5] # allowed transmission line volume expansion, can be any float >= 1.0 (today) or "opt" + clusters: [45,50] # number of nodes in Europe, any integer between 37 (1 node per country-zone) and several hundred opts: [''] # only relevant for PyPSA-Eur sector_opts: [Co2L0-3H-T-H-B-I-solar3-dist1] # this is where the main scenario settings are # to really understand the options here, look in scripts/prepare_sector_network.py # Co2Lx specifies the CO2 target in x% of the 1990 values; default will give default (5%); # Co2L0p25 will give 25% CO2 emissions; Co2Lm0p05 will give 5% negative emissions + # xH is the temporal resolution; 3H is 3-hourly, i.e. one snapshot every 3 hours + # single letters are sectors: T for land transport, H for building heating, + # B for biomass supply, I for industry, shipping and aviation # solarx or onwindx changes the available installable potential by factor x # dist{n} includes distribution grids with investment cost of n times cost in data/costs.csv + +# snapshots are originally set in PyPSA-Eur/config.yaml but used again by PyPSA-Eur-Sec snapshots: # arguments to pd.date_range start: "2013-01-01" @@ -24,25 +29,9 @@ snapshots: closed: 'left' # end is not inclusive -electricity: - voltages: [220., 300., 380.] - - extendable_carriers: - Generator: [] # [OCGT] - StorageUnit: [] # [battery, H2, CAES] - - max_hours: - battery: 6 - H2: 168 - - conventional_carriers: [] # nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass] - atlite: cutout_dir: '../pypsa-eur/cutouts' - -renewable: - onwind: - cutout: europe-2013-era5 + cutout_name: "europe-2013-era5" biomass: year: 2030 diff --git a/scripts/build_clustered_population_layouts.py b/scripts/build_clustered_population_layouts.py index de98d51d..e7f4db5a 100644 --- a/scripts/build_clustered_population_layouts.py +++ b/scripts/build_clustered_population_layouts.py @@ -6,7 +6,7 @@ import atlite -cutout = atlite.Cutout(snakemake.config['renewable']['onwind']['cutout'], +cutout = atlite.Cutout(snakemake.config['atlite']['cutout_name'], cutout_dir=snakemake.config['atlite']['cutout_dir']) diff --git a/scripts/build_heat_demand.py b/scripts/build_heat_demand.py index a1c793e1..1ed57ea4 100644 --- a/scripts/build_heat_demand.py +++ b/scripts/build_heat_demand.py @@ -18,7 +18,7 @@ if 'snakemake' not in globals(): time = pd.date_range(freq='m', **snakemake.config['snapshots']) params = dict(years=slice(*time.year[[0, -1]]), months=slice(*time.month[[0, -1]])) -cutout = atlite.Cutout(snakemake.config['renewable']['onwind']['cutout'], +cutout = atlite.Cutout(snakemake.config['atlite']['cutout_name'], cutout_dir=snakemake.config['atlite']['cutout_dir'], **params) @@ -32,9 +32,9 @@ I = cutout.indicatormatrix(clustered_busregions) for item in ["rural","urban","total"]: pop_layout = xr.open_dataarray(snakemake.input['pop_layout_'+item]) - + M = I.T.dot(sp.diag(I.dot(pop_layout.stack(spatial=('y', 'x'))))) - + heat_demand = cutout.heat_demand(matrix=M.T,index=clustered_busregions.index) heat_demand.to_netcdf(snakemake.output["heat_demand_"+item]) diff --git a/scripts/build_population_layouts.py b/scripts/build_population_layouts.py index f4273a91..5093e1b4 100644 --- a/scripts/build_population_layouts.py +++ b/scripts/build_population_layouts.py @@ -21,7 +21,7 @@ if 'snakemake' not in globals(): snakemake.input["urban_percent"] = "data/urban_percent.csv" -cutout = atlite.Cutout(snakemake.config['renewable']['onwind']['cutout'], +cutout = atlite.Cutout(snakemake.config['atlite']['cutout_name'], cutout_dir=snakemake.config['atlite']['cutout_dir']) grid_cells = cutout.grid_cells() @@ -101,4 +101,3 @@ for key in pop_cells.keys(): [('y', cutout.coords['y']), ('x', cutout.coords['x'])]) layout.to_netcdf(snakemake.output["pop_layout_"+key]) - diff --git a/scripts/build_solar_thermal_profiles.py b/scripts/build_solar_thermal_profiles.py index eaa65da3..a3a171d9 100644 --- a/scripts/build_solar_thermal_profiles.py +++ b/scripts/build_solar_thermal_profiles.py @@ -25,7 +25,7 @@ params = dict(years=slice(*time.year[[0, -1]]), months=slice(*time.month[[0, -1] -cutout = atlite.Cutout(snakemake.config['renewable']['onwind']['cutout'], +cutout = atlite.Cutout(snakemake.config['atlite']['cutout_name'], cutout_dir=snakemake.config['atlite']['cutout_dir'], **params) @@ -39,12 +39,12 @@ I = cutout.indicatormatrix(clustered_busregions) for item in ["total","rural","urban"]: pop_layout = xr.open_dataarray(snakemake.input['pop_layout_'+item]) - + M = I.T.dot(sp.diag(I.dot(pop_layout.stack(spatial=('y', 'x'))))) nonzero_sum = M.sum(axis=0, keepdims=True) nonzero_sum[nonzero_sum == 0.] = 1. M_tilde = M/nonzero_sum - + solar_thermal_angle = 45. #should clearsky_model be "simple" or "enhanced"? solar_thermal = cutout.solar_thermal(clearsky_model="simple", diff --git a/scripts/build_temperature_profiles.py b/scripts/build_temperature_profiles.py index 94e1fa26..28a4b858 100644 --- a/scripts/build_temperature_profiles.py +++ b/scripts/build_temperature_profiles.py @@ -19,7 +19,7 @@ time = pd.date_range(freq='m', **snakemake.config['snapshots']) params = dict(years=slice(*time.year[[0, -1]]), months=slice(*time.month[[0, -1]])) -cutout = atlite.Cutout(snakemake.config['renewable']['onwind']['cutout'], +cutout = atlite.Cutout(snakemake.config['atlite']['cutout_name'], cutout_dir=snakemake.config['atlite']['cutout_dir'], **params) @@ -33,12 +33,12 @@ I = cutout.indicatormatrix(clustered_busregions) for item in ["total","rural","urban"]: pop_layout = xr.open_dataarray(snakemake.input['pop_layout_'+item]) - + M = I.T.dot(sp.diag(I.dot(pop_layout.stack(spatial=('y', 'x'))))) nonzero_sum = M.sum(axis=0, keepdims=True) nonzero_sum[nonzero_sum == 0.] = 1. M_tilde = M/nonzero_sum - + temp_air = cutout.temperature(matrix=M_tilde.T,index=clustered_busregions.index) temp_air.to_netcdf(snakemake.output["temp_air_"+item])