diff --git a/config.yaml b/config.yaml index bba0e0c3..fedff423 100644 --- a/config.yaml +++ b/config.yaml @@ -72,12 +72,12 @@ renewable: distance_grid_codes: [1, 2, 3, 4, 5, 6] natura: true potential: conservative # or heuristic + clip_p_max_pu: 1.e-2 offwind-ac: cutout: europe-2013-era5 resource: method: wind turbine: NREL_ReferenceTurbine_5MW_offshore - # ScholzPhd Tab 4.3.1: 10MW/km^2 capacity_per_sqkm: 3 # correction_factor: 0.93 corine: [44, 255] @@ -85,6 +85,7 @@ renewable: max_depth: 50 max_shore_distance: 80000 potential: conservative # or heuristic + clip_p_max_pu: 1.e-2 offwind-dc: cutout: europe-2013-era5 resource: @@ -98,6 +99,7 @@ renewable: max_depth: 50 min_shore_distance: 80000 potential: conservative # or heuristic + clip_p_max_pu: 1.e-2 solar: cutout: europe-2013-sarah resource: @@ -113,14 +115,14 @@ renewable: 14, 15, 16, 17, 18, 19, 20, 26, 31, 32] natura: true potential: conservative # or heuristic + clip_p_max_pu: 1.e-2 hydro: cutout: europe-2013-era5 carriers: [ror, PHS, hydro] PHS_max_hours: 6 hydro_max_hours: "energy_capacity_totals_by_country" # one of energy_capacity_totals_by_country, # estimate_by_large_installations or a float - - + clip_min_inflow: 1.0 lines: types: 220.: "Al/St 240/40 2-bundle 220.0" @@ -166,7 +168,6 @@ costs: solving: options: formulation: kirchhoff - clip_p_max_pu: 1.e-2 load_shedding: true noisy_costs: true min_iterations: 4 diff --git a/scripts/build_hydro_profile.py b/scripts/build_hydro_profile.py index 8b2533e8..e8ecab9b 100644 --- a/scripts/build_hydro_profile.py +++ b/scripts/build_hydro_profile.py @@ -9,7 +9,8 @@ import logging logger = logging.getLogger(__name__) logger.setLevel(level=snakemake.config['logging_level']) -cutout = atlite.Cutout(snakemake.config['renewable']['hydro']['cutout'], +config = snakemake.config['renewable']['hydro'] +cutout = atlite.Cutout(config['cutout'], cutout_dir=os.path.dirname(snakemake.input.cutout)) countries = snakemake.config['countries'] @@ -22,4 +23,6 @@ inflow = cutout.runoff(shapes=country_shapes, lower_threshold_quantile=True, normalize_using_yearly=eia_stats) +inflow.values[inflow.values < config.get('min_inflow', 1.)] = 0. + inflow.to_netcdf(snakemake.output[0]) diff --git a/scripts/build_renewable_profiles.py b/scripts/build_renewable_profiles.py index 8853e9c0..29235df4 100644 --- a/scripts/build_renewable_profiles.py +++ b/scripts/build_renewable_profiles.py @@ -179,5 +179,10 @@ if __name__ == '__main__': ds['underwater_fraction'] = xr.DataArray(underwater_fraction, [buses]) - (ds.sel(bus=(ds['profile'].mean('time') > config.get('min_p_max_pu', 0.)) & (ds['p_nom_max'] > 0.)) - .to_netcdf(snakemake.output.profile)) + # select only buses with some capacity and minimal capacity factor + ds = ds.sel(bus=((ds['profile'].mean('time') > config.get('min_p_max_pu', 0.)) & + (ds['p_nom_max'] > config.get('min_p_nom_max', 0.)))) + + ds['profile'].values[ds['profile'].values < config.get('clip_p_max_pu')] = 0. + + ds.to_netcdf(snakemake.output.profile)