R/wrf_put.R
Extract variable
wrf_put(file = file.choose(), name = NA, POL)
file | name of file interactively (default) or specified |
---|---|
name | name of the variable (any variable) |
POL | input |
{ # create the folder and emission file dir.create(file.path(tempdir(), "EMISS")) wrf_create(wrfinput_dir = system.file("extdata", package = "eixport"), wrfchemi_dir = file.path(tempdir(), "EMISS")) # get the name of created file files <- list.files(path = file.path(tempdir(), "EMISS"), pattern = "wrfchemi", full.names = TRUE) # open, put some numbers and write CO <- wrf_get(file = files[1], name = "E_CO") CO[] = rnorm(length(CO)) wrf_put(file = files[1], name = "E_CO", POL = CO) }#> Warning: '/tmp/Rtmp9mjUIK/EMISS' already exists