isolines: Interpolate isolines from ocean data

View source: R/isolines.R

isolinesR Documentation

Interpolate isolines from ocean data

Description

User defined isolines are interpolated from ocean data stored in a satin object and returned as polylines.

Usage

isolines(X, levels, period = 1, depth = 1, plot = TRUE)

Arguments

X

a satin object as returned by read.nasaoc, read.ghrsst, read.osunpp, or read.cmems.

levels

a vector of desired isolines in data units.

period

an integer referring to the image number to process.

depth

an integer referring to a depth level. Only for Copernicus data that includes variables at different depths.

plot

logical, if TRUE a plot is produced (the default).

Details

Polyline coordinates of desired isolines are calculated via contourLines and convCP (from PBSMapping package). Perhaps only interesting with sea surface temperatures (isotherms). For smoother isolines, the function pixelate can be used to spatialy re-scale the data. In order to use this function with Copernicus data returned from read.cmems, the appropriate indexing should be previously done.

Value

A list with two data frames of class "PolySet" and "PolyData". See help(PolySet) and help(PolyData) for a complete description.

Author(s)

Héctor Villalobos, from code in examples of PBSMapping package

References

Schnute, J. T., Boers, N. M., Haigh, R. and Couture-Beil, A. 2011 PBS Mapping 2.62: user's guide revised from Canadian Technical Report of Fisheries and Aquatic Sciences 2549:vi + 112 p. Last updated Feb 29, 2011.

See Also

contourLines, convCP, PolySet

Examples

library(PBSmapping)
data(dsst)

# spatial re-scaling of the sst data for smoother isotherms
sst <- pixelate(dsst, extent = 0.2) 
isotherms <- isolines(sst, levels = c(13, 17, 21))
plot(dsst, colbar = FALSE)
addLines(isotherms$PolySet, col = "black", lwd = 1.5)

satin documentation built on Sept. 23, 2022, 1:06 a.m.