<p>I used the R package <a href="https://atmoschem.github.io/eixport/index.html" rel="nofollow noreferrer">eixport</a> (Ibarra-Espinosa et al., 2018) to download EDGAR data (5 and spec voc 4.3.2) and then include several speciations for chemical mechanisms according to Carter (2015) and Lopez-Norena et al (2019).</p>
<p>The functions to download EDGAR are commented. This means that you must download all NetCDF files before running <a href="https://atmoschem.github.io/eixport/reference/chem_edgar.html" rel="nofollow noreferrer">chem_edgar</a>.</p>

<pre><code>library(eixport)
library(rasterVis)
#&gt; Loading required package: raster
#&gt; Loading required package: sp
#&gt; Loading required package: lattice
#&gt; Loading required package: latticeExtra
library(cptcity)
# 1 Get EDGAR ####
# get_edgar(dataset = &quot;v432_VOC_spec&quot;,
#           destpath = &quot;V50_432_AP/TOT/&quot;,
#           sector = c( &quot;TOTALS&quot;),
#           type = &quot;nc&quot;,
#           year = 2012)
#
# get_edgar(dataset = &quot;v50_AP&quot;,
#           destpath = &quot;V50_432_AP/TOT&quot;,
#           sector = c( &quot;TOTALS&quot;),
#           type = &quot;nc&quot;,
#           year = 2014)
#
# get_edgar(dataset = &quot;v432_VOC_spec&quot;,
#           destpath = &quot;V50_432_AP/TRO/&quot;,
#           sector = c( &quot;TRO&quot;),
#           type = &quot;nc&quot;,
#           year = 2012, ask = F)
#
# get_edgar(dataset = &quot;v50_AP&quot;,
#           destpath = &quot;V50_432_AP/TRO&quot;,
#           sector = c( &quot;TRO_RES&quot;, &quot;TRO_noRES&quot;),
#           type = &quot;nc&quot;,
#           year = 2014)
#
# totals &lt;- list.files(path = &quot;V50_432_AP/TOT/&quot;,
#                      full.names = TRUE,
#                      pattern = &quot;.zip&quot;)
# lapply(totals, unzip, exdir = &quot;V50_432_AP/TOT//&quot;)
#
#
# tros &lt;- list.files(path = &quot;V50_432_AP/TRO&quot;,
#                      full.names = TRUE,
#                      pattern = &quot;.zip&quot;)
# lapply(tros, unzip, exdir = &quot;V50_432_AP/TRO/&quot;)
a &lt;- chem_edgar(path = &quot;EDGAR/V50_432_AP/TOT&quot;, chem = &quot;cbmz_mosaic&quot;)
#&gt; units:  kg m-2 s-1 
#&gt; Detecting the following files:
#&gt;                                                           lncs
#&gt; voc1   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc1_2012.0.1x0.1.nc
#&gt; voc2   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc2_2012.0.1x0.1.nc
#&gt; voc3   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc3_2012.0.1x0.1.nc
#&gt; voc4   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc4_2012.0.1x0.1.nc
#&gt; voc5   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc5_2012.0.1x0.1.nc
#&gt; voc6   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc6_2012.0.1x0.1.nc
#&gt; voc7   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc7_2012.0.1x0.1.nc
#&gt; voc8   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc8_2012.0.1x0.1.nc
#&gt; voc9   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc9_2012.0.1x0.1.nc
#&gt; voc10 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc10_2012.0.1x0.1.nc
#&gt; voc11 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc11_2012.0.1x0.1.nc
#&gt; voc12 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc12_2012.0.1x0.1.nc
#&gt; voc13 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc13_2012.0.1x0.1.nc
#&gt; voc14 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc14_2012.0.1x0.1.nc
#&gt; voc15 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc15_2012.0.1x0.1.nc
#&gt; voc16 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc16_2012.0.1x0.1.nc
#&gt; voc17 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc17_2012.0.1x0.1.nc
#&gt; voc18 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc18_2012.0.1x0.1.nc
#&gt; voc19 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc19_2012.0.1x0.1.nc
#&gt; voc20 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc20_2012.0.1x0.1.nc
#&gt; vpc21 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc21_2012.0.1x0.1.nc
#&gt; voc22 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc22_2012.0.1x0.1.nc
#&gt; voc23 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc23_2012.0.1x0.1.nc
#&gt; voc24 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc24_2012.0.1x0.1.nc
#&gt; voc25 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc25_2012.0.1x0.1.nc
#&gt; co                 EDGAR/V50_432_AP/TOT/v50_CO_2014.0.1x0.1.nc
#&gt; nox               EDGAR/V50_432_AP/TOT/v50_NOx_2014.0.1x0.1.nc
#&gt; nmvoc           EDGAR/V50_432_AP/TOT/v50_NMVOC_2014.0.1x0.1.nc
#&gt; so2               EDGAR/V50_432_AP/TOT/v50_SO2_2014.0.1x0.1.nc
#&gt; nh3               EDGAR/V50_432_AP/TOT/v50_NH3_2014.0.1x0.1.nc
#&gt; pm10             EDGAR/V50_432_AP/TOT/v50_PM10_2014.0.1x0.1.nc
#&gt; pm25            EDGAR/V50_432_AP/TOT/v50_PM2.5_2014.0.1x0.1.nc
#&gt; bc                 EDGAR/V50_432_AP/TOT/v50_BC_2014.0.1x0.1.nc
#&gt; oc                 EDGAR/V50_432_AP/TOT/v50_OC_2014.0.1x0.1.nc
#&gt; EDGAR data: voc1  voc2  voc3  voc4  voc5  voc6  voc7  voc8  voc9  voc10  voc11  voc12  voc13  voc14  voc15  voc16  voc17  voc18  voc19  voc20  voc21  voc22  voc23  voc24  voc25  co  nox  nmvoc  so2  nh3  pm10  pm2.5  bc  oc  units of gases: mol/km2/h
#&gt; units of aerosols: ug/m2/s
# just for the plot, replaces 0 with NA

a<span class="math-container">$E_CO[] &lt;- ifelse(a$</span>E_CO[] &lt;= 0, NA, a<span class="math-container">$E_CO[])
colors &lt;- c(cpt(pal = "mpl_viridis", rev = F, n = 200), 
            cpt(n = 100, rev = T))
levelplot(a$</span>E_CO, 
          col.regions = colors,
          zscaleLog = T)
</code></pre>
<p><img src="https://i.sstatic.net/I7CZr.png" alt="" /></p>
<p><sup>Created on 2020-10-15 by the <a href="https://reprex.tidyverse.org" rel="nofollow noreferrer">reprex package</a> (v0.3.0)</sup></p>
<p>Carter, W. P. (2015). Development of a database for chemical mechanism assignments for volatile organic emissions. Journal of the Air &amp; Waste Management Association, 65(10), 1171-1184.</p>
<p>Lopez-Norena, Ana and Fernandez, Rafael &amp; Puliafito, SALVADOR. (2019). ESPECIACION DE INVENTARIOS DE EMISIONES DE AEROSOLES Y COMPUESTOS ORGANICOS VOLATILES PARA EL MODELO WRF-CHEM, APLICADO A LOS ESQUEMAS RADM-2, CBM-Z Y MOZART</p>
<p>Ibarra-Espinosa et al., (2018). eixport: An R package to export emissions to atmospheric models. Journal of Open Source Software, 3(24), 607, <a href="https://doi.org/10.21105/joss.00607" rel="nofollow noreferrer">https://doi.org/10.21105/joss.00607</a></p>

CC BY-SA 4.0
2020-10-15T03:35:08.140Z
2020-10-15T03:35:08.140Z
Sergio
<p>I have an EDGAR emissions data-set. I would like to speciate the VOC emissions for CBMZ mechanism. Could anybody help? thanks</p>

CC BY-SA 3.0
2018-02-15T04:29:08.150Z
Have you seen this? http://math.ucdenver.edu/~mvejmelka/wrf-browsers/chem/html_code/chem/module_cbmz.F.html
f.thorpe
<air-quality><emissions><r>
How to speciate EDGAR emissions for CBMZ?
Sergio
# How to speciate EDGAR emissions for CBMZ?

(Asked by: username_0 on 2018-02-15)

I have an EDGAR emissions data-set. I would like to speciate the VOC emissions for CBMZ mechanism. Could anybody help? thanks

**Tags:** air-quality, emissions, r

> **Comments:**
> **username_1**: Have you seen this? http://math.ucdenver.edu/~mvejmelka/wrf-browsers/chem/html_code/chem/module_cbmz.F.html  

---

## 1 answers

### Answer by username_0 on 2020-10-15. Score: 2

I used the R package [eixport](https://atmoschem.github.io/eixport/index.html) (Ibarra-Espinosa et al., 2018) to download EDGAR data (5 and spec voc 4.3.2) and then include several speciations for chemical mechanisms according to Carter (2015) and Lopez-Norena et al (2019).

The functions to download EDGAR are commented. This means that you must download all NetCDF files before running [chem\_edgar](https://atmoschem.github.io/eixport/reference/chem_edgar.html).

```
library(eixport)
library(rasterVis)
#> Loading required package: raster
#> Loading required package: sp
#> Loading required package: lattice
#> Loading required package: latticeExtra
library(cptcity)
# 1 Get EDGAR ####
# get_edgar(dataset = "v432_VOC_spec",
#           destpath = "V50_432_AP/TOT/",
#           sector = c( "TOTALS"),
#           type = "nc",
#           year = 2012)
#
# get_edgar(dataset = "v50_AP",
#           destpath = "V50_432_AP/TOT",
#           sector = c( "TOTALS"),
#           type = "nc",
#           year = 2014)
#
# get_edgar(dataset = "v432_VOC_spec",
#           destpath = "V50_432_AP/TRO/",
#           sector = c( "TRO"),
#           type = "nc",
#           year = 2012, ask = F)
#
# get_edgar(dataset = "v50_AP",
#           destpath = "V50_432_AP/TRO",
#           sector = c( "TRO_RES", "TRO_noRES"),
#           type = "nc",
#           year = 2014)
#
# totals <- list.files(path = "V50_432_AP/TOT/",
#                      full.names = TRUE,
#                      pattern = ".zip")
# lapply(totals, unzip, exdir = "V50_432_AP/TOT//")
#
#
# tros <- list.files(path = "V50_432_AP/TRO",
#                      full.names = TRUE,
#                      pattern = ".zip")
# lapply(tros, unzip, exdir = "V50_432_AP/TRO/")
a <- chem_edgar(path = "EDGAR/V50_432_AP/TOT", chem = "cbmz_mosaic")
#> units:  kg m-2 s-1 
#> Detecting the following files:
#>                                                           lncs
#> voc1   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc1_2012.0.1x0.1.nc
#> voc2   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc2_2012.0.1x0.1.nc
#> voc3   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc3_2012.0.1x0.1.nc
#> voc4   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc4_2012.0.1x0.1.nc
#> voc5   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc5_2012.0.1x0.1.nc
#> voc6   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc6_2012.0.1x0.1.nc
#> voc7   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc7_2012.0.1x0.1.nc
#> voc8   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc8_2012.0.1x0.1.nc
#> voc9   EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc9_2012.0.1x0.1.nc
#> voc10 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc10_2012.0.1x0.1.nc
#> voc11 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc11_2012.0.1x0.1.nc
#> voc12 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc12_2012.0.1x0.1.nc
#> voc13 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc13_2012.0.1x0.1.nc
#> voc14 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc14_2012.0.1x0.1.nc
#> voc15 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc15_2012.0.1x0.1.nc
#> voc16 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc16_2012.0.1x0.1.nc
#> voc17 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc17_2012.0.1x0.1.nc
#> voc18 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc18_2012.0.1x0.1.nc
#> voc19 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc19_2012.0.1x0.1.nc
#> voc20 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc20_2012.0.1x0.1.nc
#> vpc21 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc21_2012.0.1x0.1.nc
#> voc22 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc22_2012.0.1x0.1.nc
#> voc23 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc23_2012.0.1x0.1.nc
#> voc24 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc24_2012.0.1x0.1.nc
#> voc25 EDGAR/V50_432_AP/TOT/v432_VOC_spec_voc25_2012.0.1x0.1.nc
#> co                 EDGAR/V50_432_AP/TOT/v50_CO_2014.0.1x0.1.nc
#> nox               EDGAR/V50_432_AP/TOT/v50_NOx_2014.0.1x0.1.nc
#> nmvoc           EDGAR/V50_432_AP/TOT/v50_NMVOC_2014.0.1x0.1.nc
#> so2               EDGAR/V50_432_AP/TOT/v50_SO2_2014.0.1x0.1.nc
#> nh3               EDGAR/V50_432_AP/TOT/v50_NH3_2014.0.1x0.1.nc
#> pm10             EDGAR/V50_432_AP/TOT/v50_PM10_2014.0.1x0.1.nc
#> pm25            EDGAR/V50_432_AP/TOT/v50_PM2.5_2014.0.1x0.1.nc
#> bc                 EDGAR/V50_432_AP/TOT/v50_BC_2014.0.1x0.1.nc
#> oc                 EDGAR/V50_432_AP/TOT/v50_OC_2014.0.1x0.1.nc
#> EDGAR data: voc1  voc2  voc3  voc4  voc5  voc6  voc7  voc8  voc9  voc10  voc11  voc12  voc13  voc14  voc15  voc16  voc17  voc18  voc19  voc20  voc21  voc22  voc23  voc24  voc25  co  nox  nmvoc  so2  nh3  pm10  pm2.5  bc  oc  units of gases: mol/km2/h
#> units of aerosols: ug/m2/s
# just for the plot, replaces 0 with NA

a$E_CO[] <- ifelse(a$E_CO[] <= 0, NA, a$E_CO[])
colors <- c(cpt(pal = "mpl_viridis", rev = F, n = 200), 
            cpt(n = 100, rev = T))
levelplot(a$E_CO, 
          col.regions = colors,
          zscaleLog = T)

```

![](https://i.sstatic.net/I7CZr.png)

Created on 2020-10-15 by the [reprex package](https://reprex.tidyverse.org) (v0.3.0)

Carter, W. P. (2015). Development of a database for chemical mechanism assignments for volatile organic emissions. Journal of the Air & Waste Management Association, 65(10), 1171-1184.

Lopez-Norena, Ana and Fernandez, Rafael & Puliafito, SALVADOR. (2019). ESPECIACION DE INVENTARIOS DE EMISIONES DE AEROSOLES Y COMPUESTOS ORGANICOS VOLATILES PARA EL MODELO WRF-CHEM, APLICADO A LOS ESQUEMAS RADM-2, CBM-Z Y MOZART

Ibarra-Espinosa et al., (2018). eixport: An R package to export emissions to atmospheric models. Journal of Open Source Software, 3(24), 607, <https://doi.org/10.21105/joss.00607>


---

