makeGridMask: Create a grid mask

View source: R/gridMask.R

makeGridMaskR Documentation

Create a grid mask

Description

This function takes supplied longitude, latitude along with the grid spacing, and creates an equally spaced rectangular grid mask.

Usage

makeGridMask(
  gridLongitudeOriginal,
  gridLatitudeOriginal,
  gridPtLongitude,
  gridPtLatitude,
  gridDiffLongitude,
  gridDiffLatitude,
  useCtd = FALSE,
  ctdLongitude = NULL,
  ctdLatitude = NULL,
  ctd = NULL,
  ctdDistance = 30
)

Arguments

gridLongitudeOriginal

a numerical vector of the unique grid longitude values

gridLatitudeOriginal

a numerical vector of the unique grid latitude values

gridPtLongitude

a numerical vector of the grid point longitude values

gridPtLatitude

a numerical vector of the grid point latitude values

gridDiffLongitude

a numerical value indicating the delta value between gridLongitude

gridDiffLatitude

a numerical value indicating the delta value between gridLatitude

useCtd

a logical value indicating whether or not to use ctd data when making the mask, default is FALSE.

ctdLongitude

a numerical vector of the ctd longitude, ignored if useCTD = FALSE, default is NULL.

ctdLatitude

a numerical vector of the ctd latitude, ignored if useCTD = FALSE, default is NULL.

ctd

a list of ctd objects, default is NULL

ctdDistance

a numerical value indicating the minimum distance, in kilometers, that grid points should be to a ctd profile, default is 30.

Value

a list containing the gridmask, which is a vector of TRUE/FALSE values,the expanded grid, and the gridLongitude and gridLatitude

Author(s)

Chantelle Layton


clayton33/csasMarPhys documentation built on June 8, 2025, 3:10 a.m.