build_*_profile(s): Make caps on p_nom_max and inflow optional
This commit is contained in:
parent
77095c3b94
commit
9c6c89dfad
@ -23,6 +23,7 @@ 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.
|
||||
if 'clip_min_inflow' in config:
|
||||
inflow.values[inflow.values < config['clip_min_inflow']] = 0.
|
||||
|
||||
inflow.to_netcdf(snakemake.output[0])
|
||||
|
@ -183,6 +183,7 @@ if __name__ == '__main__':
|
||||
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.
|
||||
if 'clip_p_max_pu' in config:
|
||||
ds['profile'].values[ds['profile'].values < config['clip_p_max_pu']] = 0.
|
||||
|
||||
ds.to_netcdf(snakemake.output.profile)
|
||||
|
Loading…
Reference in New Issue
Block a user