Grouping GCP emission files by category

Grouping GCP emission files by category#

Prior to reprojecting emissions to one’s model inputs, it is possible to group emission categories into larger categories to reduce the number of unknown to solve in the inversion.

The Yaml below generates GCP emission files as groups of original GCP files. The groups are:

  • bioff: biofuels + biomass burning

  • ff: coal + oilgasind

  • enteric: livestock + rice + waste

  • biogenic: wetlands + freshwaters + termites

Files are generated in the folder obsoperator/fwd_0000/%Y-%m-%d_00-00/.

  1#####################
  2# pyCIF config file #
  3#####################
  4
  5# Define here all parameters for pyCIF following YAML syntax
  6# For details on YAML syntax, please see:
  7# http://docs.ansible.com/ansible/latest/YAMLSyntax.html
  8
  9###############################################################################
 10# pyCIF parameters
 11
 12rootdir: &rootdir /tmp/CIF/
 13outdir: &outdir /tmp/pytest-of-root/pytest-0
 14verbose: 2
 15logfile: pycif.log
 16workdir: !!python/object/apply:pathlib.PosixPath
 17- /
 18- tmp
 19- pytest-of-root
 20- pytest-0
 21- gcp
 22datei: 2019-01-01 00:00:00
 23datef: 2019-03-01 00:00:00
 24
 25###############################################################################
 26
 27# http://community-inversion.eu/documentation/plugins/platforms/docker.html
 28
 29platform:
 30  plugin:
 31    name: docker
 32    version: cif
 33
 34  cores: 10
 35  queue: mediump
 36
 37###############################################################################
 38
 39# http://community-inversion.eu/documentation/plugins/obsoperators/standard.html
 40
 41obsoperator:
 42  plugin:
 43    name: standard
 44    version: std
 45
 46  autorestart: true
 47  save_debug: true
 48  ignore_model: true
 49  force_propagate_attributes: true
 50  init_inputs:
 51    components:
 52      flux: []
 53
 54###############################################################################
 55
 56# http://community-inversion.eu/documentation/plugins/obsvects/standard.html
 57
 58obsvect:
 59  plugin:
 60    name: standard
 61    version: std
 62
 63  dump: true
 64
 65###############################################################################
 66
 67# http://community-inversion.eu/documentation/plugins/controlvects/standard.html
 68
 69controlvect:
 70  plugin:
 71    name: standard
 72    version: std
 73
 74  transform_pipe:
 75    sum_anthropo_bio:
 76      plugin:
 77        name: families
 78        version: std
 79        type: transform
 80      component: flux_anthropogenic
 81      parameters_in:
 82      - CH4_biofuels
 83      - CH4_biomass
 84      component_out: flux
 85      parameter_out: CH4_bioff
 86
 87    dump_flx_anthropo_1:
 88      plugin:
 89        name: dump2format
 90        version: std
 91        type: transform
 92      component: flux
 93      parameter: CH4_bioff
 94      dump_file: 'fch4.bioff.gcp2022.%Y%m.nc'
 95      dump_format:
 96        name: GCP
 97        version: 1x1
 98        type: flux
 99      dump_options:
100        contact_person: Docker runner
101        contact_mail: No contact
102        dump_longname: Biomass burning emissions
103
104    sum_anthropo_ff:
105      plugin:
106        name: families
107        version: std
108        type: transform
109      component: flux_anthropogenic
110      parameters_in:
111      - CH4_coal
112      - CH4_oilgasind
113      component_out: flux
114      parameter_out: CH4_ff
115
116    dump_flx_anthropo_2:
117      plugin:
118        name: dump2format
119        version: std
120        type: transform
121      component: flux
122      parameter: CH4_ff
123      dump_file: 'fch4.ff.gcp2022.%Y%m.nc'
124      dump_format:
125        name: GCP
126        version: 1x1
127        type: flux
128      dump_options:
129        contact_person: Docker runner
130        contact_mail: No contact
131        dump_longname: Fossil fuel emissions
132
133    sum_anthropo_enteric:
134      plugin:
135        name: families
136        version: std
137        type: transform
138      component: flux_anthropogenic
139      parameters_in:
140      - CH4_livestock
141      - CH4_rice
142      - CH4_waste
143      component_out: flux
144      parameter_out: CH4_enteric
145
146    dump_flx_anthropo_3:
147      plugin:
148        name: dump2format
149        version: std
150        type: transform
151      component: flux
152      parameter: CH4_enteric
153      dump_file: 'fch4.enteric.gcp2022.%Y%m.nc'
154      dump_format:
155        name: GCP
156        version: 1x1
157        type: flux
158      dump_options:
159        contact_person: Docker runner
160        contact_mail: No contact
161        dump_longname: Enteric emissions
162
163    sum_bio_enteric:
164      plugin:
165        name: families
166        version: std
167        type: transform
168      component: flux_natural
169      parameters_in:
170      - CH4_freshwaters
171      - CH4_termites
172      - CH4_wetlands
173      component_out: flux
174      parameter_out: CH4_biogenic
175
176    dump_flx_bio_1:
177      plugin:
178        name: dump2format
179        version: std
180        type: transform
181      component: flux
182      parameter: CH4_biogenic
183      dump_file: 'fch4.biogenic.gcp2022.%Y%m.nc'
184      dump_format:
185        name: GCP
186        version: 1x1
187        type: flux
188      dump_options:
189        contact_person: Docker runner
190        contact_mail: No contact
191        dump_longname: Biogenic emissions
192
193###############################################################################
194
195# http://community-inversion.eu/documentation/plugins/datavects/standard.html
196
197datavect:
198  plugin:
199    name: standard
200    version: std
201
202  components:
203    flux_anthropogenic:
204      file_freq: 1MS
205      dir: /tmp/PYCIF_DATA_TEST/RAW/EMISSIONS/GCP-CH4/ANTHROPOGENIC
206      varname: fch4
207      parameters:
208        CH4_biofuels:
209          plugin:
210            name: GCP
211            version: 1x1
212            type: flux
213          file: fch4.biofuels.edgarv6.1x1.2000-2020.nc
214
215        CH4_coal:
216          plugin:
217            name: GCP
218            version: 1x1
219            type: flux
220          file: fch4.coal.edgarv6.1x1.2000-2020.nc
221
222        CH4_livestock:
223          plugin:
224            name: GCP
225            version: 1x1
226            type: flux
227          file: fch4.livestock.edgarv6.1x1.2000-2020.nc
228
229        CH4_oilgasind:
230          plugin:
231            name: GCP
232            version: 1x1
233            type: flux
234          file: fch4.oilgasind.edgarv6.1x1.2000-2020.nc
235
236        CH4_rice:
237          plugin:
238            name: GCP
239            version: 1x1
240            type: flux
241          file: fch4.rice.edgarv6.1x1.2000-2020.nc
242
243        CH4_waste:
244          plugin:
245            name: GCP
246            version: 1x1
247            type: flux
248          file: fch4.waste.edgarv6.1x1.2000-2020.nc
249
250        CH4_biomass:
251          plugin:
252            name: GCP
253            version: 1x1
254            type: flux
255          file: fch4.biomass.gfedv41s.1x1.2000-2020.nc
256
257    flux_natural:
258      file_freq: 1MS
259      dir: /tmp/PYCIF_DATA_TEST/RAW/EMISSIONS/GCP-CH4/NATURAL
260      varname: fch4
261      parameters:
262        CH4_freshwaters:
263          plugin:
264            name: GCP
265            version: 1x1
266            type: flux
267          file: fch4.freshwaters.stavert2021.1x1.clim.nc
268          is_climato: true
269
270        CH4_geological:
271          plugin:
272            name: GCP
273            version: 1x1
274            type: flux
275          file: fch4.geological.scaledEtiope2019.1x1.clim.nc
276          is_climato: true
277
278        CH4_ocean:
279          plugin:
280            name: GCP
281            version: 1x1
282            type: flux
283          file: fch4.ocean.weber2019.1x1.clim.nc
284          is_climato: true
285
286        CH4_soils:
287          plugin:
288            name: GCP
289            version: 1x1
290            type: flux
291          file: fch4.soils.murguiaFlores2018.1x1.2000-2020.nc
292
293        CH4_termites:
294          plugin:
295            name: GCP
296            version: 1x1
297            type: flux
298          file: fch4.termites.saunois2020.1x1.clim.nc
299          is_climato: true
300
301        CH4_wetlands:
302          plugin:
303            name: GCP
304            version: 1x1
305            type: flux
306          file: fch4.wetlands.saunois2020.1x1.clim.nc
307          is_climato: true