nc.get.coordinate.axes {ncdf4.helpers}R Documentation

Get a list of dimension variables and axes for a variable's coordinate variable

Description

Get a list of dimension variables and axes for a variable's coordinate variable.

Usage

nc.get.coordinate.axes(f, v)

Arguments

f

The file (an object of class ncdf4)

v

The name of a variable

Details

The CF metadata standard defines a convention for definining 2-dimensional variables to accompany pairs of dimension variables. Usually these are latitude and longitude variables, and accompany projected grids. This function returns a named list of axes, the names of which are the associated dimension variables.

Value

A named character vector containing axes, the names of which are the corresponding dimension variables.

References

http://cfconventions.org/Data/cf-conventions/cf-conventions-1.8/cf-conventions.html#_two_dimensional_latitude_longitude_coordinate_variables

Examples

## Get coordinate axes from file.
## Not run: 
f <- nc_open("pr.nc")
coord.axes <- nc.get.coordinate.axes(f, "pr")
nc_close(f)

## End(Not run)


[Package ncdf4.helpers version 0.3-6 Index]