read.dmna {readmet}R Documentation

function to read contents of a file in DMNA-format

Description

reads gridded one to two dimensional data from a DMNA format that used for example by the German national dispersion model AUSTAL

Usage

read.dmna(file, val=1, debug=FALSE)

Arguments

file

name (and path if necessary) of the file to read

val

name (number of name of the variable to be extracted. Only needed in case the file contains gridded data and more than one variable)

debug

if TRUE shwon debugging information

Value

returns an object whos type depends on the data containt in the file.

If the file contains a timeseries, a data.frame is returned that contains each variable in the file as a column. Column names are taken from the format description embedded in the file. If a column for time (name "te") is present, times are returned as POSIXct.

If the file contains gridded data an array of numeric is returned. The number of dimensions of the array is the lowest needed to hold the data. If the file contains mor than one variable, the function will return only one variable with each call. Choose the varibale by providing paramter val (name or number of variable).

Note

Prior to version 1.2.4, this function did not arrays with more than two dimensions, or multiple variables in files of more than one dimension. Prior to version 1.5.0 timeseries were not implemented.

Author(s)

Clemens Druee

References

AUSTAL 3.1 model reference (by Ingenieurbuero Janicke)

Examples

so2 <- read.dmna(system.file("extdata", "example-grid.dmna", package="readmet"))
ax <- dmna.axes(system.file("extdata", "example-grid.dmna", package="readmet"))
filled.contour(ax$x, ax$y, so2)

monitor <- read.dmna(system.file("extdata", "example-monitor.dmna", package="readmet"))
plot(monitor$te, monitor$X2, type="l")

series <- read.dmna(system.file("extdata", "example-series.dmna", package="readmet"))
plot(series$te, series$ua, type="l")

[Package readmet version 1.7.1 Index]