From 6aa6b20e269c2fc96ec24dd0e51a717454269cad Mon Sep 17 00:00:00 2001 From: Fabian Neumann Date: Wed, 7 Aug 2019 17:58:28 +0200 Subject: [PATCH] more config tables and fixed table widths --- doc/_static/theme_overrides.css | 19 +++++++++++++ doc/conf.py | 12 ++++---- doc/configtables/atlite.csv | 22 +++++++-------- doc/configtables/electricity.csv | 18 ++++++------ doc/configtables/onwind.csv | 18 ++++++------ doc/configtables/snapshots.csv | 6 ++-- doc/configtables/toplevel.csv | 14 +++++----- doc/configuration.rst | 48 +++++++++++++++++++------------- 8 files changed, 92 insertions(+), 65 deletions(-) create mode 100644 doc/_static/theme_overrides.css diff --git a/doc/_static/theme_overrides.css b/doc/_static/theme_overrides.css new file mode 100644 index 00000000..c413554e --- /dev/null +++ b/doc/_static/theme_overrides.css @@ -0,0 +1,19 @@ +/* override table width restrictions */ +@media screen and (min-width: 767px) { + + .wy-table-responsive table td { + /* !important prevents the common CSS stylesheets from overriding + this as on RTD they are loaded after this stylesheet */ + white-space: normal !important; + /* background: #eeeeee !important; */ + } + + .wy-table-responsive { + max-width: 100%; + overflow: visible !important; + } + + .wy-nav-content { + max-width: 910px !important; + } + } \ No newline at end of file diff --git a/doc/conf.py b/doc/conf.py index da527330..0bbee5d3 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -155,13 +155,13 @@ html_theme_options = { # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -# html_static_path = ['_static'] +html_static_path = ['_static'] -# html_context = { -# 'css_files': [ -# '_static/theme_overrides.css', # override wide tables in RTD theme -# ], -# } +html_context = { + 'css_files': [ + '_static/theme_overrides.css', # override wide tables in RTD theme + ], +} # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied diff --git a/doc/configtables/atlite.csv b/doc/configtables/atlite.csv index 7f34a0f7..7c9e82bf 100644 --- a/doc/configtables/atlite.csv +++ b/doc/configtables/atlite.csv @@ -1,13 +1,13 @@ ,Unit,Values,Description -nprocesses,--,{'E'},TODO +nprocesses,--,int,"Number of parallel processes in cutout preparation" cutouts,--,E,TODO --- europe-2013-era5,--,E,TODO --- -- module,--,E,TODO --- -- xs,--,E,TODO --- -- ys,--,E,TODO --- -- years,--,E,TODO --- europe-2013-sarah,--,E,TODO --- -- module,--,E,TODO --- -- xs,--,E,TODO --- -- ys,--,E,TODO --- -- years,--,E,TODO \ No newline at end of file +-- europe-2013-era5,--,,"Directory to write cutout data to." +-- -- module,--,"Must be 'era5'","Source of the reanalysis weather dataset. `ERA5 `_" +-- -- xs,°,"Float interval within [-180, 180]","Range of longitudes to download weather data for." +-- -- ys,°,"Float interval within [-90, 90]","Range of latitudes to download weather data for." +-- -- years,--,"Integer interval within [1979,2018]","Range of years to download weather data for." +-- europe-2013-sarah,--,,"Directory to write cutout data to." +-- -- module,--,"Must be 'sarah'","Source of the surface solar radiation dataset. `SARAH-2 `_" +-- -- xs,°,"Float interval within [-180, 180]","Range of longitudes to download weather data for." +-- -- ys,°,"Float interval within [-90, 90]","Range of latitudes to download weather data for." +-- -- years,--,"Integer interval within [1983,2015]","Range of years to download weather data for." \ No newline at end of file diff --git a/doc/configtables/electricity.csv b/doc/configtables/electricity.csv index 9a4988f5..03052835 100644 --- a/doc/configtables/electricity.csv +++ b/doc/configtables/electricity.csv @@ -1,10 +1,10 @@ ,Unit,Values,Description -voltages,--,{'E'},TODO -co2limit,--,E,TODO -extendable_carriers,--,E,TODO --- Generator,--,E,TODO --- StorageUnit,--,E,TODO -max_hours,--,E,TODO --- battery,--,E,TODO --- H2,--,E,TODO -conventional_carriers,--,E,TODO +voltages,kV,"Any subset of {220., 300., 380.}","Voltage levels to consider when" +co2limit,:math:`t_{CO_2-eq}/a`,float,"Cap on total annual system carbon dioxide emissions" +extendable_carriers,,, +-- Generator,--,"Any subset of {'OCGT','CCGT'}","Places extendable conventional power plants (OCGT and/or CCGT) where gas power plants are located today without capacity limits." +-- StorageUnit,--,"Any subset of {'battery','H2'}","Places extendable storage units (battery and/or hydrogen) at every node/bus without capacity limits." +max_hours,,, +-- battery,h,float,"Maximum state of charge capacity of the battery in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation `_." +-- H2,h,float,"Maximum state of charge capacity of the hydrogen storage in terms of hours at full output capacity ``p_nom``. Cf. `PyPSA documentation `_." +conventional_carriers,--,"Any subset of {nuclear, oil, OCGT, CCGT, coal, lignite, geothermal, biomass}","List of conventional power plants to include in the model from ``resources/powerplants.csv``." diff --git a/doc/configtables/onwind.csv b/doc/configtables/onwind.csv index 818806d8..d0bcdc51 100644 --- a/doc/configtables/onwind.csv +++ b/doc/configtables/onwind.csv @@ -1,13 +1,13 @@ ,Unit,Values,Description -cutout,--,{'E'},TODO -resource,--,E,TODO --- method,--,E,TODO --- turbine,--,E,TODO -capacity_per_sqkm,--,E,TODO -corine,--,E,TODO --- grid_codes,--,E,TODO --- distance,--,E,TODO --- distance_grid_codes,--,E,TODO +cutout,--,"Must be 'europe-2013-era5'","Specifies the directory where the relevant weather data ist stored." +resource,,, +-- method,--,"Must be 'wind'","A superordinate technology type." +-- turbine,--,"One of turbine types included in `atlite `_","Specifies the turbine type and its characteristic power curve." +capacity_per_sqkm,MW/km2,float,"Allowable density of wind turbine placement." +corine,,, +-- grid_codes,--,"Any subset of the `CORINE Land Cover code list `_",TODO +-- distance,m,float, +-- distance_grid_codes,--,"Any subset of the `CORINE Land Cover code list `_",TODO natura,--,E,TODO potential,--,E,TODO clip_p_max_pu,--,E,TODO \ No newline at end of file diff --git a/doc/configtables/snapshots.csv b/doc/configtables/snapshots.csv index 2b1ae93b..14fd8001 100644 --- a/doc/configtables/snapshots.csv +++ b/doc/configtables/snapshots.csv @@ -1,4 +1,4 @@ ,Unit,Values,Description -start,--,{'E'},TODO -end,--,E,TODO -closed,--,E,TODO \ No newline at end of file +start,--,"str or datetime-like; e.g. YYYY-MM-DD","Left bound of date range" +end,--,"str or datetime-like; e.g. YYYY-MM-DD","Right bound of date range" +closed,--,"One of {None, ‘left’, ‘right’}","Make the time interval closed to the ``left``, ``right``, or both sides ``None``." \ No newline at end of file diff --git a/doc/configtables/toplevel.csv b/doc/configtables/toplevel.csv index 99b262c5..dfc4a0bb 100644 --- a/doc/configtables/toplevel.csv +++ b/doc/configtables/toplevel.csv @@ -1,8 +1,8 @@ ,Unit,Values,Description -version,--,{'E'},TODO -logging_level,--,E,TODO -summary_dir,--,E,TODO -countries,--,E,TODO -enable,--,E,TODO --- powerplantmatching,--,{'E'},TODO --- prepare_links_p_nom,--,E,TODO \ No newline at end of file +version,--,0.1,"Version of PyPSA-Eur" +logging_level,--,"Any of {'INFO', 'WARNING', 'ERROR'}","Restrict console outputs to all infos, warning or errors only" +summary_dir,--,"e.g. 'results'","Directory into which results are written." +countries,--,"Subset of {'AL', 'AT', 'BA', 'BE', 'BG', 'CH', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'ME', 'MK', 'NL', 'NO', 'PL', 'PT', 'RO', 'RS', 'SE', 'SI', 'SK'}","European countries defined by their `Two-letter country codes (ISO 3166-1) `_ which should be included in the energy system model." +enable,,, +-- powerplantmatching,bool,"{true, false}","Switch to retrieve currently existing conventional power plant capacities matched from multiple sources by using `powerplantmatching `_." +-- prepare_links_p_nom,bool,"{true, false}","Switch to retrieve current HVDC projects from `Wikipedia `_" \ No newline at end of file diff --git a/doc/configuration.rst b/doc/configuration.rst index 5cbf0f29..5b33c88e 100644 --- a/doc/configuration.rst +++ b/doc/configuration.rst @@ -2,8 +2,10 @@ Configuration ########################################## -Single-level entries -==================== +by changing the default configuration in ``config.yaml``. + +Top-level configuration +======================= .. literalinclude:: ../config.yaml :language: yaml @@ -11,9 +13,10 @@ Single-level entries .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/toplevel.csv + Wildcards and ``scenario`` ========================== @@ -23,7 +26,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/scenario.csv @@ -31,13 +34,15 @@ Wildcards and ``scenario`` ``snapshots`` ============= +Arguments to `pandas.date_range `_ + .. literalinclude:: ../config.yaml :language: yaml :lines: 17-21 .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/snapshots.csv @@ -50,9 +55,12 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/electricity.csv +.. warning:: + Carriers in ``conventional_carriers`` must not also be in ``extendable_carriers``. + ``atlite`` ============= @@ -62,7 +70,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/atlite.csv ``renewable`` @@ -73,7 +81,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/onwind.csv ``offwind-ac`` @@ -81,7 +89,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/offwind-ac.csv ``offwind-dc`` @@ -89,7 +97,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/offwind-dc.csv ``solar`` @@ -97,7 +105,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/solar.csv ``hydro`` @@ -105,7 +113,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/hydro.csv ``lines`` @@ -113,7 +121,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/lines.csv ``links`` @@ -121,7 +129,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/links.csv ``transformers`` @@ -129,7 +137,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/transformers.csv ``load`` @@ -137,7 +145,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/load.csv ``costs`` @@ -145,7 +153,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/costs.csv ``solving`` @@ -156,7 +164,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/solving-options.csv ``solver`` @@ -164,7 +172,7 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/solving-solver.csv ``plotting`` @@ -172,5 +180,5 @@ Wildcards and ``scenario`` .. csv-table:: :header-rows: 1 - :align: left + :widths: 25,7,22,30 :file: configtables/plotting.csv