att.get.ncv {ncvar}R Documentation

Get NetCDF Attributes (internal)

Description

Get all attributes for a given variable. For internal use only.

Usage

att.get.ncv(ncfile, variable, natts)

Arguments

ncfile Object of class "NetCDF", returned from open.nc.
variable ID or name of the variable from which the attribute will be read, or NC_GLOBAL for the global attributes.
natts The number of attributes to be read.

Details

Get all attributes for a given variable. For internal use only.

Value

List of objects of class "att.ncv". An empty list if no attributes exist.

Author(s)

Juerg Schmidli

Examples

## Create example file
foo.ncv()

## Open file
nc <- open.nc(paste(tempdir(),"/foo.nc",sep=""))

## Get attribute
att <- att.get.ncv(nc, "temperature", 1)

close.nc(nc)

[Package ncvar version 1.0-3 Index]