get_elem_var: Get variables for a set of elements. This is a convenience...

View source: R/nc.R

get_elem_varR Documentation

Get variables for a set of elements. This is a convenience function that provides a means for getting a vector of values at a given sigma layer (or level) and time. Note that the dimensions a variable uses varies - see list_vars.

Description

Get variables for a set of elements. This is a convenience function that provides a means for getting a vector of values at a given sigma layer (or level) and time. Note that the dimensions a variable uses varies - see list_vars.

Usage

get_elem_var(
  x,
  var = c("u", "v"),
  elem = seq_len(fvcom_count(x, "elems")),
  y = 1,
  time = 1,
  y_transform = FALSE
)

Arguments

x

FVCOM ncdf4 object

var

charcater the name of the variable. Not all variables are handled by this function.

elem

integer one or more 1-based node ID(s). These must form a contiguous sequence of elems identifers

y

integer a single 1-based index into siglay, or sigelev

time

either a single 1-based integer or POSIXct

y_transform

logical, if convert y from sigma to integer? Note that time is auto-converted

Value

tibble of element id and values - one row for each node


BigelowLab/fvcom documentation built on Nov. 8, 2024, 2:24 p.m.