From eeba4a81d484b2abaa8815db2dfb383bca501829 Mon Sep 17 00:00:00 2001 From: Jonas Hoersch Date: Tue, 11 Dec 2018 16:46:34 +0100 Subject: [PATCH] Remove build_renewable_potentials Superseded by GLAES in build_renewable_profiles --- scripts/build_renewable_potentials.py | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 scripts/build_renewable_potentials.py diff --git a/scripts/build_renewable_potentials.py b/scripts/build_renewable_potentials.py deleted file mode 100644 index 08e1e17d..00000000 --- a/scripts/build_renewable_potentials.py +++ /dev/null @@ -1,22 +0,0 @@ -import os -import atlite -import xarray as xr -import pandas as pd - -from vresutils import landuse as vlanduse - -config = snakemake.config['renewable'][snakemake.wildcards.technology] - -cutout = atlite.Cutout(config['cutout'], - cutout_dir=os.path.dirname(snakemake.input.cutout)) - -total_capacity = config['capacity_per_sqm'] * vlanduse._cutout_cell_areas(cutout) -potentials = xr.DataArray(total_capacity * - vlanduse.corine_for_cutout(cutout, fn=snakemake.input.corine, - natura_fn=snakemake.input.natura, **config['corine']), - [cutout.meta.indexes['y'], cutout.meta.indexes['x']]) - -if 'height_cutoff' in config: - potentials.values[(cutout.meta['height'] < - config['height_cutoff']).transpose(*potentials.dims)] = 0. - -potentials.to_netcdf(snakemake.output[0])