Learn R Programming

eixport (version 0.6.2)

to_as4wrf: Generates emissions dataframe to generate WRF-Chem inputs

Description

to_as4wrf returns a dataframes with columns lat, long, id, pollutants, local time and GMT time. This dataframe has the proper format to be used with WRF assimilation system: "Another Asimilation System 4 WRF (AAS4WRF)" as published by Vera-Vala et al (2016)

Usage

to_as4wrf(sdf, nr = 1, dmyhm, tz, crs = 4326, islist)

Value

data-frame of gridded emissions g/h

Arguments

sdf

Gridded emissions, which can be a SpatialPolygonsDataFrame, or a list of SpatialPolygonsDataFrame, or a sf object of "POLYGON". The user must enter a list with 36 SpatialPolygonsDataFrame with emissions for the mechanism CBMZ. When there are no emissions available, the SpatialPolygonsDataFrame must contain 0.

nr

Number of repetitions of the emissions period

dmyhm

String indicating Day Month Year Hour and Minute in the format "d-m-Y H:M" e.g.: "01-05-2014 00:00" It represents the time of the first hour of emissions in Local Time

tz

Time zone as required in for function as.POSIXct

crs

Coordinate reference system, e.g: "+init=crs:4326". Used to transform the coordinates of the output

islist

logical value to indicate if sdf is a list or not

See Also

wrf_create to_wrf

Examples

Run this code
{
if (FALSE) {
data(gCO)
df <- to_as4wrf(sdf = gCO,
                dmyhm = "29-04-2018 00:00",
                tz = "America/Sao_Paulo")
head(df)
df2 <- to_as4wrf(sdf = list(co = gCO, pm = gCO),
                 dmyhm = "29-04-2018 00:00",
                 tz = "America/Sao_Paulo")
head(df2)
}
}

Run the code above in your browser using DataLab