load_nc
Load variables from a NetCDF archive file.
Syntax
load_nc(fname) %Matlab & Octave X=load_nc(fname) %Matlab & Octave X <- load_nc(file, which_vars=NULL) #R
Description
Load variables from a NetCDF archive file. The file is assumed to be in the current working directory unless a pathname is added to the beginning of fname. If no output argument is given, the variables will be created in the current workplace, overwriting any variables with the same name that are already there. If an output argument is given, the variables will be stored as fields of a structure.
Inputs
Input var | Description | Default |
---|---|---|
fname | is the name of the metadata file. If the name does not include a .nc suffix, this will be added automatically | N/A |
which_vars (#R) | (Optional) A list of quoted character strings giving the exact names of variables to be read in. Default is to read all variables present in the file. parameters should be read in. | all variables |
Outputs
Output var | Description |
---|---|
X | if specified, is a structure/list containing sensor and metadata structures. The field names in X will be the same as the names of the variables in the NetCDF file, e.g., if the file contains A and P, X will have fields X.A, X.P and X.info (the file metadata) in Matlab/Octave or X$A , X$P, X$info in R. |
Example
Matlab & Octave
load_nc('testset1')
R
load_nc('testset1.nc')
About
bugs@animaltags.org Last modified: 27 July 2017