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)

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

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

Value

data-frame of gridded emissions g/h

Note

The user must produce a text file with the data-frame resulting of this function. Then, use this file with the NCL script AAS4WRF.ncl

The reference of the emissions assimilation system is Vara-Vela, A., Andrade, M. F., Kumar, P., Ynoue, R. Y., and Munoz, A. G.: Impact of vehicular emissions on the formation of fine particles in the Sao Paulo Metropolitan Area: a numerical study with the WRF-Chem model, Atmos. Chem. Phys., 16, 777-797, doi:10.5194/acp-16-777-2016, 2016. A good website with timezones is http://www.timezoneconverter.com/cgi-bin/tzc The crs is the same as used by sf package It returns a dataframe with id,, long, lat, pollutants, time_lt, time_utc and day-UTC-hour (dutch) The pollutants for the CBMZ are: e_so2, e_no, e_ald, e_hcho, e_ora2, e_nh3 e_hc3, e_hc5, e_hc8, e_eth, e_co, e_ol2, e_olt, e_oli, e_tol, e_xyl, e_ket e_csl, e_iso, e_no2, e_ch3oh, e_c2h5oh, e_pm25i, e_pm25j, e_so4i, e_so4j e_no3i, e_no3j, e_orgi, e_orgj, e_eci, e_ecj, e_so4c, e_no3c, e_orgc, e_ecc

See also

Examples

{
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)
}
#> old-style crs object detected; please recreate object with a recent sf::st_crs()
#> old-style crs object detected; please recreate object with a recent sf::st_crs()
#>   id      long    lat       co       pm    time_lt            time_utc dutch
#> 1  1 -46.80660 -23.62 8391.282 8391.282 2018-04-29 2018-04-29 03:00:00  2821
#> 2  2 -46.80172 -23.62 8340.653 8340.653 2018-04-29 2018-04-29 03:00:00  2821
#> 3  3 -46.79684 -23.62 8549.459 8549.459 2018-04-29 2018-04-29 03:00:00  2821
#> 4  4 -46.79196 -23.62 9055.417 9055.417 2018-04-29 2018-04-29 03:00:00  2821
#> 5  5 -46.78708 -23.62 8378.953 8378.953 2018-04-29 2018-04-29 03:00:00  2821
#> 6  6 -46.78220 -23.62    0.000    0.000 2018-04-29 2018-04-29 03:00:00  2821