p.grid: Read and plot a grid-file output by WaSiM

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/p.grid.R

Description

These two functions help to read and plot grid-files created by WaSiM. You need the gridasci-executable if to convert binary grid data to ascii grid data.

Usage

1
2
p.grid(grid, ...)
read.grid(file, record_size=4, endian="little")

Arguments

grid

A grid read with the read.grid function

...

Additional arguments passed to plot

file

WASIM grid output file in ASCII or binary format.

record_size

number of bytes used to represent a float value in the binary grid. Usually 4, but may be platform-dependent.

endian

see readBin

Details

The file is opened as a binary grid unless the infile has one of the following extensions: *.asc, *.ascii, *.txt. Nodata values are represented by NAs.

Value

read.grid returns a list:

head

dataframe of header information containing the fields ncols, nrows, xllcorner, yllcorner, cellsize, nodata\_value.

tab

The actual grid

Author(s)

Dominik Reusser, Till Francke

References

WaSiM-ETH manual

See Also

read.results, p.flow_comp for more WaSiM related function. filled.contour for plotting options

Examples

1
2
3
4
5
6
  unzip(system.file("weisseritz.zip", package="wasim"))
  sd.grid <- read.grid( file= "weisseritz/sd__ww100.grd")  # Datumsreihe heisst jetzt d.datum
  p.grid(sd.grid, 
        color.palette=topo.colors,
	      zlim=c(-20,20),
        main="Saturation deficit at the Weisseritz")

Example output

Loading required package: MASS
Loading required package: qualV
Loading required package: KernSmooth
KernSmooth 2.23 loaded
Copyright M. P. Wand 1997-2009
Loading required package: tiger
Loading required package: e1071
Loading required package: hexbin
Loading required package: klaR
Loading required package: som
Loading required package: fast
Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric


Attaching package: 'wasim'

The following object is masked from 'package:fast':

    rerange

The following objects are masked from 'package:tiger':

    color.factor, k_hyd

wasim documentation built on May 1, 2019, 6:50 p.m.