From 32248724bdcfa3dada40d669488d9fef37887fa5 Mon Sep 17 00:00:00 2001 From: Jan Frederick Date: Fri, 3 Apr 2020 12:02:25 +0200 Subject: [PATCH 1/5] add if statements for "keep all availble areas" Add possibility to keep all availble areas for the potential area generation. --- scripts/build_renewable_profiles.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build_renewable_profiles.py b/scripts/build_renewable_profiles.py index f8e832058..7b1719b37 100644 --- a/scripts/build_renewable_profiles.py +++ b/scripts/build_renewable_profiles.py @@ -289,7 +289,8 @@ def calculate_potential(gid, save_map=None): potentials = config['capacity_per_sqkm'] * vlanduse._cutout_cell_areas(cutout) potmatrix = matrix * spdiag(potentials.ravel()) - potmatrix.data[potmatrix.data < 1.] = 0 # ignore weather cells where only less than 1 MW can be installed + if config.get('keep_all_available_areas', False) != True: + potmatrix.data[potmatrix.data < 1.] = 0 # ignore weather cells where only less than 1 MW can be installed potmatrix.eliminate_zeros() resource = config['resource'] From b707578bfb07b23743f5113b5ed128d7fbac7788 Mon Sep 17 00:00:00 2001 From: Jan Frederick Date: Fri, 3 Apr 2020 12:09:17 +0200 Subject: [PATCH 2/5] Update build_renewable_profiles.py --- scripts/build_renewable_profiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_renewable_profiles.py b/scripts/build_renewable_profiles.py index 7b1719b37..7c00e4f01 100644 --- a/scripts/build_renewable_profiles.py +++ b/scripts/build_renewable_profiles.py @@ -289,7 +289,7 @@ def calculate_potential(gid, save_map=None): potentials = config['capacity_per_sqkm'] * vlanduse._cutout_cell_areas(cutout) potmatrix = matrix * spdiag(potentials.ravel()) - if config.get('keep_all_available_areas', False) != True: + if config.get('keep_all_available_areas', False) != True: # check config file if user wants to use all availbe areas for renewable potentials potmatrix.data[potmatrix.data < 1.] = 0 # ignore weather cells where only less than 1 MW can be installed potmatrix.eliminate_zeros() From b4c502f90162c30112056a5e0243772066866bb3 Mon Sep 17 00:00:00 2001 From: Jan Frederick Date: Fri, 3 Apr 2020 12:12:27 +0200 Subject: [PATCH 3/5] Updated description --- scripts/build_renewable_profiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_renewable_profiles.py b/scripts/build_renewable_profiles.py index 7c00e4f01..d694114b0 100644 --- a/scripts/build_renewable_profiles.py +++ b/scripts/build_renewable_profiles.py @@ -289,7 +289,7 @@ def calculate_potential(gid, save_map=None): potentials = config['capacity_per_sqkm'] * vlanduse._cutout_cell_areas(cutout) potmatrix = matrix * spdiag(potentials.ravel()) - if config.get('keep_all_available_areas', False) != True: # check config file if user wants to use all availbe areas for renewable potentials + if config.get('keep_all_available_areas', False) != True: # check config file whether user wants to use all availbe weather cells for renewable profile and potential generation potmatrix.data[potmatrix.data < 1.] = 0 # ignore weather cells where only less than 1 MW can be installed potmatrix.eliminate_zeros() From 0adaf2c1b605e6b9ca3bc8b20075f0ed6a73f11a Mon Sep 17 00:00:00 2001 From: Jan Frederick Date: Mon, 6 Apr 2020 16:38:54 +0200 Subject: [PATCH 4/5] cleaned code for better understanding --- scripts/build_renewable_profiles.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build_renewable_profiles.py b/scripts/build_renewable_profiles.py index d694114b0..549765022 100644 --- a/scripts/build_renewable_profiles.py +++ b/scripts/build_renewable_profiles.py @@ -289,7 +289,7 @@ def calculate_potential(gid, save_map=None): potentials = config['capacity_per_sqkm'] * vlanduse._cutout_cell_areas(cutout) potmatrix = matrix * spdiag(potentials.ravel()) - if config.get('keep_all_available_areas', False) != True: # check config file whether user wants to use all availbe weather cells for renewable profile and potential generation + if not config.get('keep_all_available_areas', False): # check config file whether user wants to use all availbe weather cells for renewable profile and potential generation potmatrix.data[potmatrix.data < 1.] = 0 # ignore weather cells where only less than 1 MW can be installed potmatrix.eliminate_zeros() From d66b70e180135b34282b674681dfe5cb0a5270e8 Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Mon, 8 Jun 2020 18:29:15 +0200 Subject: [PATCH 5/5] doc: update release notes and documentation [skip travis] --- doc/configtables/offwind-ac.csv | 3 ++- doc/configtables/offwind-dc.csv | 3 ++- doc/configtables/onwind.csv | 3 ++- doc/configtables/solar.csv | 3 ++- doc/release_notes.rst | 8 +++++--- scripts/build_renewable_profiles.py | 2 +- 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/doc/configtables/offwind-ac.csv b/doc/configtables/offwind-ac.csv index e34e88312..025445067 100644 --- a/doc/configtables/offwind-ac.csv +++ b/doc/configtables/offwind-ac.csv @@ -9,4 +9,5 @@ natura,bool,"{true, false}","Switch to exclude `Natura 2000 `_","Specifies areas according to CORINE Land Cover codes to which wind turbines must maintain a distance specified in the setting ``distance``." natura,bool,"{true, false}","Switch to exclude `Natura 2000 `_ natural protection areas. Area is excluded if ``true``." potential,--,"One of {'simple', 'conservative'}","Method to compute the maximal installable potential for a node; confer :ref:`renewableprofiles`" -clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." \ No newline at end of file +clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." +keep_all_available_areas,bool,"{'true', 'false'}","Use all availabe weather cells for renewable profile and potential generation. The default ignores weather cells where only less than 1 MW can be installed." \ No newline at end of file diff --git a/doc/configtables/solar.csv b/doc/configtables/solar.csv index c7153db4f..93bfd04a0 100644 --- a/doc/configtables/solar.csv +++ b/doc/configtables/solar.csv @@ -11,4 +11,5 @@ correction_factor,--,float,"A correction factor for the capacity factor (availab corine,--,"Any subset of the `CORINE Land Cover code list `_","Specifies areas according to CORINE Land Cover codes which are generally eligible for solar panel placement." natura,bool,"{true, false}","Switch to exclude `Natura 2000 `_ natural protection areas. Area is excluded if ``true``." potential,--,"One of {'simple', 'conservative'}","Method to compute the maximal installable potential for a node; confer :ref:`renewableprofiles`" -clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." \ No newline at end of file +clip_p_max_pu,p.u.,float,"To avoid too small values in the renewables` per-unit availability time series values below this threshold are set to zero." +keep_all_available_areas,bool,"{'true', 'false'}","Use all availabe weather cells for renewable profile and potential generation. The default ignores weather cells where only less than 1 MW can be installed." \ No newline at end of file diff --git a/doc/release_notes.rst b/doc/release_notes.rst index 09d497b88..00ad17b91 100644 --- a/doc/release_notes.rst +++ b/doc/release_notes.rst @@ -7,14 +7,16 @@ Release Notes ########################################## -* An updated extract of the `ENTSO-E Transmission System Map `_ (including Malta) was added to the repository using the `GridKit `_ tool. This tool has been updated to retrieve up-to-date map extracts using a single `script `_. The update extract features 5322 buses, 6574 lines, 46 links. (`#118 `_). - * The optimization is now performed using the ``pyomo=False`` setting in the :func:`pypsa.lopf.network_lopf`. This speeds up the solving process significantly and consumes much less memory. The inclusion of additional constraints were adjusted to the new implementation. They are all passed to the :func:`network_lopf` function via the ``extra_functionality`` argument. The rule ``trace_solve_network`` was integrated into the rule :mod:`solve_network` and can be activated via configuration with ``solving: options: track_iterations: true``. The charging and discharging capacities of batteries modelled as store-link combination are now coupled (`#116 `_). -* Removed the `id` column for custom power plants in `data/custom_powerplants.csv` to avoid custom power plants with conflicting ids getting attached to the wrong bus (`#131 `_). +* An updated extract of the `ENTSO-E Transmission System Map `_ (including Malta) was added to the repository using the `GridKit `_ tool. This tool has been updated to retrieve up-to-date map extracts using a single `script `_. The update extract features 5322 buses, 6574 lines, 46 links. (`#118 `_). + +* Removed the ``id`` column for custom power plants in ``data/custom_powerplants.csv`` to avoid custom power plants with conflicting ids getting attached to the wrong bus (`#131 `_). * ``snakemake`` rules for retrieving cutouts and the natura raster can now be disabled independently from their respective rules to build them; via ``config.*yaml`` (`#136 `_). +* Add option ``renewables: {carrier}: keep_all_available_areas: `` to use all availabe weather cells for renewable profile and potential generation. The default ignores weather cells where only less than 1 MW can be installed (`#150 `_). + * Added `FSFE REUSE `_ compliant license information. Documentation now licensed under CC-BY-4.0 (`#160 `_). PyPSA-Eur 0.1.0 (9th January 2020) diff --git a/scripts/build_renewable_profiles.py b/scripts/build_renewable_profiles.py index 72fe0d54b..c8ff69ae0 100644 --- a/scripts/build_renewable_profiles.py +++ b/scripts/build_renewable_profiles.py @@ -294,7 +294,7 @@ def calculate_potential(gid, save_map=None): potentials = config['capacity_per_sqkm'] * vlanduse._cutout_cell_areas(cutout) potmatrix = matrix * spdiag(potentials.ravel()) - if not config.get('keep_all_available_areas', False): # check config file whether user wants to use all availbe weather cells for renewable profile and potential generation + if not config.get('keep_all_available_areas', False): potmatrix.data[potmatrix.data < 1.] = 0 # ignore weather cells where only less than 1 MW can be installed potmatrix.eliminate_zeros()