Learn R Programming

eixport (version 0.6.2)

chem_edgar: Agregate EDGAR emissions NetCDF files into a RasterStack by

Description

The Emissions Database for Global Atmospheric Research (EDGAR) is a project from the Joint Research Centre. This function reads the NetCDF and merge/aggregate into diferent chemical mechanisms

Usage

chem_edgar(path, chem, merge = FALSE, k = rep(1, 34), verbose = TRUE)

Value

RasterStack

Arguments

path

Character; path to the NetCDF files from EDGAR. The directory must have one file for each of the following pollutants: "voc" from 1 to 25, "co", "nox", "nmvoc","so2", "nh3", "pm10", "pm2.5", "bc" and "oc"

chem

Character; chemical mechanism: "edgar", "radm", "radmsorg", "cbmz_mosaic", "cptec", "ecb05_opt1", "neu_cb05" (thanks to Daniel Schuch) and "ufpr_cbmz" (thanks to Leila Martins).

  • When chem is "edgar" units are: "g km-2 h-1"

  • Other mechanisms: gases "mol km-2 h-1" and aerosols: "ug m-2 s-1"

merge

Logical; in the case that tehre are more than one NetCDF per pollutant, merge = TRUE will merge them with sum. Default is FALSE.

k,

Numeric; Value to factorize each pollutant.

verbose

Logical to print more information

Examples

Run this code
if (FALSE) {
# Not run
# Downloading EDGAR data ####
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/")
edgar_chem("V50_432_AP/TOT", "radm")
}

Run the code above in your browser using DataLab