gshhsMask: A land mask based on the GSHHS data set

Description Usage Arguments Details Value References See Also Examples

View source: R/landmask.R

Description

Generate a land mask function based on the Global Self-consistent, Hierarchical, High-resolution Geography Database. The mask is provided at two (approximate) spatial resolutions: 0.1 degree and 0.05 degrees. The latter requires significantly more memory.

Usage

1
gshhsMask(res = c("0.1", "0.05"), land = FALSE, latmin = -90, latmax = 90)

Arguments

res

The spatial resolution of the mask, in degrees.

land

The logical value returned for land.

latmin

The minimum allowable latitude.

latmax

The maximum allowable latitude.

Details

Returns a function of three arguments

tm time
lon longitude
lat latitude

suitable for use with rwalcSimulate. This mask is actually independent of time and the tm argument to the mask is ignored.

Value

A function of three arguments (tm,lon,lat) that returns a logical indicating whether (lon,lat) is at sea or on land and inside the allowable latitude range.

References

Wessel, P., and W. H. F. Smith, A Global Self-consistent, Hierarchical, High-resolution Shoreline Database, J. Geophys. Res., 101, #B4, pp. 8741-8743, 1996. https://www.ngdc.noaa.gov/mgg/shorelines/gshhs.html

See Also

rwalc

Examples

1
2
mask  <- gshhsMask() ## initialize land mask function
mask(0,100,-65) ## test point - time lon,lat

SWotherspoon/RWalc documentation built on Feb. 25, 2021, 8:26 p.m.