You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`inputs_path`: Path to a folder of csv files (OSeMOSYS inputs). File names should correspond to OSeMOSYS parameter names.
19
+
`results_path`: Path to a folder of csv files (OSeMOSYS results). File names should correspond to OSeMOSYS variable names.
20
+
`config_path`: Path to the configuration file (see below)
21
+
`output_path`: Path to the .xlsx file you wish to write out
14
22
15
23
## The IAMC format
16
24
@@ -30,7 +38,70 @@ in the contribution by Working Group III to the IPCC's Sixth Assessment Report (
30
38
Please refer to the Horizon 2020 project [openENTRANCE](https://github.com/openENTRANCE/openentrance#data-format-structure)
31
39
for more information about the format and its usage in that project.
32
40
33
-
## Usage for OSeMOSYS
41
+
## Writing a configuration file
42
+
43
+
Write a configuration file in YAML format. A simple configuration file with one result variable looks like this:
44
+
45
+
model: OSeMBE v1.0.0
46
+
scenario: DIAG-C400-lin-ResidualFossil
47
+
region: ['Austria'] # select countries to plot summary results
48
+
results:
49
+
- iamc_variable: 'Carbon Capture|Biomass'
50
+
tech_emi: ['(?=^.{2}(BM))^.{4}(CS)']
51
+
emissions: [CO2]
52
+
unit: kt CO2/yr
53
+
transform: abs
54
+
osemosys_param: AnnualTechnologyEmissions
55
+
56
+
The first section of the configuration file with the keys `model`, `scenario`, and `region` are used to define the metadata for
57
+
the IAMC template.
58
+
59
+
The second section `results:` is where you describe each of the IAMC variables and provide instructions to osemosys2iamc on how
60
+
to compute the values.
61
+
62
+
`iamc_variable` - this should match one of the IAMC variable names
63
+
`unit` - provide the units of the OSeMOSYS results
64
+
`transform` - only `abs` is currently available. This returns the absolute value of the results
65
+
`osemosys_param` - provide the name of the result file from which the script should extract the result data
66
+
67
+
One or more of the following filter keys. These filter the
68
+
results by one or more columns found in OSeMOSYS results.
69
+
Following the fitering, the remaining columns except region
70
+
and year are discarded and rows are summed.
71
+
72
+
`tech_emi` - filter the results by TECHNOLOGY and EMISSION columns using the provide regular expression and an `emissions` entry
73
+
`emissions` - a list of emissions to filter the results by the EMISSION column
74
+
`fuel` - filter by the FUEL column
75
+
`capacity` - filter the TECHNOLOGY column
76
+
`primary_technology` - filter the TECHNOLOGY column (can be replaced by `capacity` key)
77
+
`excluded_prod_tech` - filter the TECHNOLOGY column (can be replaced by `capacity` key)
78
+
`el_prod_technology` - filter the TECHNOLOGY column (can be replaced by `capacity` key)
79
+
`demand` - filters by the FUEL column (final energy)
80
+
81
+
The value for each of these keys is a list of regular expressions. These regular expressions are used to filter the rows of data in the chosen column to those that match the
82
+
regular expression.
83
+
84
+
Writing regular expressions can be tricky, but there are [useful tools](https://regexr.com/) to help.
85
+
Below we provide some examples:
86
+
87
+
`^.{2}(WI)` match rows with any two characters followed by `WI`
88
+
89
+
`(?=^.{2}(HF))^((?!00).)*$` match rows with `HF` in 3rd and 4th position which do not include `00`
90
+
91
+
`(?=^.{2}(NG))^((?!(00)|(CS)).)*$` match rows with `NG` in 3rd and 4th position that do not include `00` or `CS`
92
+
93
+
`^.{6}(I0)` match rows which contain any 6 characters followed by `IO` in the 7th and 8th position
94
+
95
+
Putting this together, the following entry extracts results from the result file `ProductionByTechnologyAnnual.csv`, filters out the rows
96
+
by matching values in the TECHNOLOGY column with a list of 6 regular expressions (this is an OR operation)
97
+
and assigns the unit `PJ/yr` and adds the aggregated (summing over region and year) total under `Primary Energy` in the IAMC template format.
0 commit comments