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

Description Usage Arguments Details Value References Examples

View source: R/helpers.r

Description

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

Usage

1

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

1
2
3
4
5
6
7
## 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)

ncdf4.helpers documentation built on Oct. 15, 2021, 5:19 p.m.