This file contains the methods used to generate postprocessed data tables that are available by default in the model results.
calliope.postprocess.postprocess.capacity_factor(results, model_data, systemwide=False)
¶
Calculation of capacity factors.
Processes whether flow_cap is a parameter or a result, then calculates the
capacity factor.
The weight of timesteps is considered when computing systemwide capacity factors, such that higher-weighted timesteps have a stronger influence on the resulting system-wide time-averaged capacity factor.
Source code in src/calliope/postprocess/postprocess.py
calliope.postprocess.postprocess.systemwide_levelised_cost(results, model_data, total=False)
¶
Calculates systemwide levelised costs.
Returns a DataArray with systemwide levelised costs for the given results, indexed by techs, carriers and costs if total is False, or by carriers and costs if total is True.
The weight of timesteps is considered when computing levelised costs:
-
costs are already multiplied by weight in the constraints, and not further adjusted here.
-
production (
flow_out+flow_export) is not multiplied by weight in the constraints, so scaled by weight here to be consistent with costs. CAUTION: this scaling is temporary during levelised cost computation - the actual costs in the results remain untouched.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
results
|
Dataset
|
Model results. |
required |
model_data
|
Dataset
|
Model input data. |
required |
total
|
bool
|
If False (default) returns per-technology levelised cost, if True, returns overall system-wide levelised cost. |
False
|
Returns:
| Type | Description |
|---|---|
DataArray
|
xr.DataArray: Array of levelised costs. |