Build renewable profiles
Adapted from pypsa-EUR by the pypsa China-PIK authors
Calculates for each clustered region the
(i) installable capacity (based on land-use from :mod:determine_availability_matrix
)
(ii) the available generation time series (based on weather data)
(iii) the average distanc from the node for onshore wind,
AC-connected offshore wind, DC-connected offshore wind and solar PV generators.
Outputs
-
resources/profile_{technology}.nc
with the following structure=================== ==================== ===================================================== Field Dimensions Description =================== ==================== ===================================================== profile year, bus, bin, time the per unit hourly availability factors for each bus
p_nom_max bus, bin maximal installable capacity at the bus (in MW)
average_distance bus, bin average distance of units in the region to the grid bus for onshore techs and to the shoreline for offshore technologies (in km) =================== ==================== =====================================================
Description
This script functions at two main spatial resolutions: the resolution of the
clustered network regions, and the resolution of the cutout grid cells for the
weather data. Typically the weather data grid is finer than the network regions,
so we have to work out the distribution of generators across the grid cells
within each region. This is done by taking account of a combination of the
available land at each grid cell (computed in
:mod:determine_availability_matrix
) and the capacity factor there.
Based on the availability matrix, the script first computes how much of the technology can be installed at each cutout grid cell. To compute the layout of generators in each clustered region, the installable potential in each grid cell is multiplied with the capacity factor at each grid cell. This is done since we assume more generators are installed at cells with a higher capacity factor.
Based on the average capacity factor, the potentials are further divided into a configurable number of resource classes (bins).
This layout is then used to compute the generation availability time series from
the weather data cutout from atlite
.
The maximal installable potential for the node (p_nom_max
) is computed by
adding up the installable potentials of the individual grid cells.
build_resource_classes(cutout, nbins, regions, capacity_factor, params)
Bin resources based on their capacity factor The number of bins can be dynamically reduced based on a min delta cf
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cutout
|
Cutout
|
the atlite cutout |
required |
nbins
|
int
|
the number of bins |
required |
regions
|
GeoSeries
|
the regions |
required |
capacity_factor
|
(DataArray,)
|
the capacity factor |
required |
params
|
dict
|
the config for VREs |
required |
Returns:
Type | Description |
---|---|
DataArray
|
xr.DataArray: the mask for the resource classes |
GeoSeries
|
gpd.GeoSeries: multi-indexed series [bus, bin]: geometry |
Source code in workflow/scripts/build_renewable_profiles.py
localize_cutout_time(cutout, drop_leap=True)
Localize the time to the local timezone
Parameters:
Name | Type | Description | Default |
---|---|---|---|
cutout
|
Cutout
|
the atlite cutout object |
required |
drop_leap
|
bool
|
drop 29th Feb. Defaults to True. |
True
|
Returns:
Name | Type | Description |
---|---|---|
Cutout |
Cutout
|
the updated cutout |
Source code in workflow/scripts/build_renewable_profiles.py
prepare_resource_config(params, nprocesses, noprogress=True)
Parse the resource config (atlite calc config)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
params
|
dict
|
the renewable options |
required |
nprocesses
|
int
|
the number or processes |
required |
noprogress
|
bool
|
whether to show progress bars |
True
|
Returns:
Type | Description |
---|---|
(dict, dict)
|
the resource config for the atlite calcs, the turbine/panel models |