nc_get: Helper to get a variable from NetCDF.

View source: R/netcdf-utils.R

nc_getR Documentation

Helper to get a variable from NetCDF.

Description

This exists so we can (internally) use a file path, uri, or open NetCDF connection (ncdf4 or RNetCDF) in a simpler way.

Usage

nc_get(x, v, test = FALSE)

Arguments

x

file path, uri, or NetCDF connection

v

variable name

test

if true we make sure the connection can be open, not applied for connections themselves

Details

This function just reads the whole array. It is equivalent to the angstroms package function 'rawdata(x, varname)'.


tidync documentation built on Sept. 11, 2024, 6:38 p.m.