Extract, create or assign ocean/land masks.

mask(x, ...)

# S3 method for class 'grid'
mask(x, n = 2, thr = 0.8, hires = FALSE, ocean = TRUE, ...)

# S3 method for class 'gts'
mask(x, n = 2, thr = 0.8, hires = FALSE, ocean = TRUE, ...)

# S3 method for class 'array'
mask(x, ...)

mask(x) <- value

Arguments

x

An object containing a mask.

...

Additional arguments, currently not used.

n

Number of internal points used to calculate the mask.

thr

Threshold to assign a point to the ocean.

hires

Boolean, use high-resolution coastline?

ocean

Boolean, are valid points in the ocean? Default is TRUE. FALSE for land.

object

The object to add or replace the mask.

mask

A mask.

Value

The mask.