hydro: store corrected eia stats
This commit is contained in:
parent
96b599aedd
commit
aff5e09195
@ -234,7 +234,9 @@ rule build_hydro_profile:
|
||||
eia_hydro_capacity='data/eia_hydro_annual_capacity.csv',
|
||||
era5_runoff='data/era5-annual-runoff-per-country.csv',
|
||||
cutout=f"cutouts/{config['renewable']['hydro']['cutout']}.nc" if "hydro" in config["renewable"] else "config['renewable']['hydro']['cutout'] not configured",
|
||||
output: 'resources/profile{weather_year}_hydro.nc'
|
||||
output:
|
||||
profile='resources/profile{weather_year}_hydro.nc',
|
||||
eia_hydro='resources/eia_hydro_annual_generation.csv',
|
||||
log: "logs/build_hydro_profile{weather_year}.log"
|
||||
resources: mem_mb=5000
|
||||
script: 'scripts/build_hydro_profile.py'
|
||||
|
@ -180,6 +180,8 @@ if __name__ == "__main__":
|
||||
fn = snakemake.input.era5_runoff
|
||||
eia_stats = approximate_missing_eia_stats(eia_stats, fn, countries)
|
||||
|
||||
eia_stats.to_csv(snakemake.output.eia_hydro)
|
||||
|
||||
weather_year = snakemake.wildcards.weather_year
|
||||
norm_year = config_hydro.get('eia_norm_year')
|
||||
if norm_year:
|
||||
@ -195,4 +197,4 @@ if __name__ == "__main__":
|
||||
if 'clip_min_inflow' in config_hydro:
|
||||
inflow = inflow.where(inflow > config_hydro['clip_min_inflow'], 0)
|
||||
|
||||
inflow.to_netcdf(snakemake.output[0])
|
||||
inflow.to_netcdf(snakemake.output.profile)
|
||||
|
Loading…
Reference in New Issue
Block a user