slice_nc: Slice an nc object

View source: R/slice_nc.R

slice_ncR Documentation

Slice an nc object

Description

Extracts a single time step from an rbeni-nc object

Usage

slice_nc(obj, tstep)

Arguments

obj

a list returned from a rbeni::read_nc_onefile() function call.

tstep

an integer or vector of integers specifying which time step(s) (index starting at 1) to be extracted.

Value

A list, containing "lon" (vector of longitudes of gridcell mid-points), "lat" (vector of latitudes of gridcell mid-points), "time" (vector of lubridate::ymd dates), "varnams" (a vector of all variable names as strings), and a named (nested) list of the data arrays (lon x lat x time) for each variable.


stineb/rbeni documentation built on Feb. 24, 2023, 5:40 a.m.