Function(s) to import various ADMS file types into openair. Currently
handles ".met", ".bgd", ".mop" and ".pst" file structures. Uses
utils) to read in data, format for R and openair
and apply some file structure testing.
1 2 3 4 5 6 7 8 9 10 11 12 13
The ADMS file to be imported. Default,
Type of ADMS file to be imported. With default, "unknown",
the import uses the file extension to identify the file type and, where
recognised, uses this to identify the file structure and import method to
be applied. Where file extension is not recognised the choice may be
forced by setting
Option to convert all data names to lower case. Default,
Option to remove ADMS "hour", "day", and "year"
data columns after generating openair "date" timeseries. Default,
Option to retain ADMS data units. Default,
Option to simplify data names in accordance with
Option to test file structure before trying to
Option to remove delim columns from the data frame. ADMS
.mop files include two columns, "INPUT_DATA:" and "PROCESSED_DATA:", to
separate model input and output types. Default,
Option to add prefixes to data names. ADMS .mop files
include a number of input and process data types with shared names.
Prefixes can be automatically added to these so individual data can be
readily identified in the R/openair environment. Default,
Option applied by
Additional arguments, passed to
importADMS function were developed to help import various ADMS
file types into openair. In most cases the parent import function should
work in default configuration, e.g.
mydata <- importADMS(). The
function currently recognises four file formats:
.pst. Where other file extensions have been set but
the file structure is known, the import call can be forced by, e.g,
mydata <- importADMS(file.type="bgd"). Other options can be adjusted
to provide fine control of the data structuring and renaming.
In standard use
importADMS() returns a data frame for use in
openair. By comparison to the original file, the resulting data frame is
modified as follows:
Time and date information will combined in a single column "date",
formatted as a conventional timeseries (
drop.input.dates is enabled data series combined to generated the
new "date" data series will also be removed.
simplify.names is enabled common chemical names may be
simplified, and some other parameters may be reset to openair standards
(e.g. "ws", "wd" and "temp") according to operations defined in
simplifyNamesADMS. A summary of simplfication operations can be
obtained using, e.g., the call
drop.case is enabled all upper case characters in names will be
converted to lower case.
keep.units is enabled data units information may also be retained
as part of the data frame comment if available.
.mop files, input and processed data series names may also been
modified on the basis of
Times are assumed to be in GMT. Zero wind directions reset to 360 as
.mop file import.
Karl Ropkins, David Carslaw and Matthew Williams (CERC).
1 2 3 4 5 6 7 8 9 10 11 12
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.