merge_emission: Function to merge two different emissions

View source: R/merge_emissions.R

merge_emissionR Documentation

Function to merge two different emissions

Description

Merge different emissions, the main emission or background emission (usually from a global inventory) and an auxiliary emission. The resulting emissions has the values of the auxiliar emissions for grid points with emissions and background emission for grid points with zero emissions.

Usage

merge_emission(
  background,
  auxiliar,
  output = NA,
  name,
  coef_backgroud = 1,
  coef_auxiliar = 1,
  aux_n2 = NA,
  coe_n2 = 1,
  plot = T,
  verbose = T,
  ...
)

Arguments

background

main input file (WRF-Chem emission file)

auxiliar

auxliar input file (WRF-Chem emission file)

output

output file (WRF-Chem emission file), or NA to return the emission array

name

variable/pollutant name

coef_backgroud

coefficient to multiply main input

coef_auxiliar

coefficient to multiply auxliar input

aux_n2

extra auxliar input file (will be merged with auxliar)

coe_n2

coefficient for to multiply extra auxliar input

plot

to plot from output file

verbose

display additional information

...

param for plot function

Value

if output is NA, returns an array or a matrix

Examples

## Not run: 
NEW_e <- merge_emission(background = 'base/wrfchemi_00z_d01',
                        auxiliar   = 'extra/wrfchemi_00z_d01',
                        name       = 'E_NO')

## End(Not run)

Schuch666/hackWRF documentation built on June 9, 2025, 1:46 p.m.