atr: Read and write attributes on a NetCDF file

View source: R/atr.R

atrR Documentation

Read and write attributes on a NetCDF file

Description

Read and write metadata information of a NetCDF files

Usage

atr(file = NA, var = "?", att = NA, action = "get", value = NA, verbose = TRUE)

Arguments

file

file name

var

variable name, 0 to global and "?" to show options

att

attribute names (NA for get all attnames)

action

"get" (default), "write" or "print" (return the value) of an attribute

value

value to write

verbose

display additional information

Value

string with the NetCDF attribute value

Examples

nc <- paste0(system.file("extdata",package="eva3dm"),'/wrfinput_d01')
atr(nc,0)
atr(nc,'Times')
atr(nc,'XLAT')
atr(nc,'XLONG')

atr(nc,'XLONG','MemoryOrder')
atr(nc,'XLONG','description')
atr(nc,'XLONG','units')
atr(nc,'XLONG','stagger')
atr(nc,'XLONG','FieldType')


eva3dm documentation built on April 4, 2025, 5:11 a.m.