Learn R Programming

eva3dm (version 0.99.1)

atr: 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)

Value

string with the NetCDF attribute value

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

Examples

Run this code
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')

Run the code above in your browser using DataLab