50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

wasim (version 1.0)

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

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

p.grid(grid, ...)
read.grid(file, record_size=4)

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.

Value

  • read.grid returns a list:
  • headdataframe of header information containing the fields ncols, nrows, xllcorner, yllcorner, cellsize, nodata_value.
  • tabThe actual grid

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.

References

WaSiM-ETH manual

See Also

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

Examples

Run this code
sd.grid <- read.grid( file= system.file("weisseritz/sd__ww100.grd", package="wasim"))  # Datumsreihe heisst jetzt d.datum
  p.grid(sd.grid, 
        color.palette=topo.colors,
	      zlim=c(-20,20),
        main="Saturation deficit at the Weisseritz")

Run the code above in your browser using DataLab