getSpatialMap: Get spatial map of the input dataset.

View source: R/getSpatialMap.R

getSpatialMapR Documentation

Get spatial map of the input dataset.

Description

Get spatial map of the input dataset.

Usage

getSpatialMap(dataset, method = NULL, member = "mean", ...)

Arguments

dataset

A list containing different information, should be the result of reading netcdf file using loadNcdf.

method

A string showing different calculating method for the map. More information please refer to details.

member

A number showing which member is selected to get, if the dataset has a "member" dimension. Default is NULL, if no member assigned, and there is a "member" in dimensions, the mean value of the members will be taken.

...

several arguments including x, y, title, catchment, point, output, name, info, scale, color, type in ?getSpatialMap_mat for details.

Details

There are following methods to be selected, "meanAnnual": annual rainfall of each year is plotted. "winter", "spring", "autumn", "summer": MEAN seasonal rainfall of each year is plotted. Month(number 1 to 12): MEAN month rainfall of each year is plotted, e.g. MEAN march rainfall of each year. "mean", "max", "min": mean daily, maximum daily, minimum daily precipitation.

Value

A matrix representing the raster map is returned, and the map is plotted.

Examples



## Not run: 
#gridData provided in the package is the result of \code {loadNcdf}
data(tgridData)
getSpatialMap(tgridData, method = 'meanAnnual')
getSpatialMap(tgridData, method = 'winter')


getSpatialMap(tgridData, method = 'winter', catchment = testCat)

file <- system.file("extdata", "point.txt", package = "hyfo")
point <- read.table(file, header = TRUE, sep = ',' )
getSpatialMap(tgridData, method = 'winter', catchment = testCat, point = point)

## End(Not run)


# More examples can be found in the user manual on http://yuanchao-xu.github.io/hyfo/


hyfo documentation built on Aug. 16, 2023, 5:08 p.m.