avmap: Create a difference map compared to average

View source: R/surfaceplot.R

avmapR Documentation

Create a difference map compared to average

Description

takes a survey date as input and searches the DF_Surfaces folder for maps of the same parameter within the range of 1-2 months from yearmon for each year. These surfaces are averaged and compared to the surface from yearmon.

Usage

avmap(yearmon, params, diffpath = NULL, avpath = NULL, percentcov = 0.6,
  tolerance = 1, fdir = getOption("fdir"))

Arguments

yearmon

survey of interest to compare against average

params

variable name generally choice of "sal" or "chlext"

diffpath

file.path to write output difference surface

avpath

file.path to write output average surface

percentcov

numeric account for the different raster extents by setting the percent of all surveys required before a pixel is included in difference from average computations

tolerance

numeric number of months on either side of yearmon to include in the set of surfaces averaged . defaults to 1.

fdir

character file path to local data directory

Details

resulting surfaces are written to disk if the avpath or diffpath arguments are specified

Examples

## Not run: 
avmap(yearmon = 201505, params = "sal", diffpath = file.path(getOption("fdir"),
"DF_Surfaces", 201505, paste0("diff", "sal", ".tif")),
 percentcov = 0.6, tolerance = 1)
avmap(yearmon = 201505, params = "sal")

## End(Not run)

jsta/DataflowR documentation built on Sept. 27, 2022, 11:13 p.m.