getNcdfVar function

Get variable name of the NetCDF file.

Get variable name of the NetCDF file.

Get variable name in the NetCDF file. After knowning the name, you can use loadNcdf to load the target variable.

getNcdfVar(filePath)

Arguments

  • filePath: A path pointing to the netCDF file.

Returns

The names of the varialbes in the file.

Examples

# First open the test NETcDF file. filePath <- system.file("extdata", "tnc.nc", package = "hyfo") # Then if you don't know the variable name, you can use \code{getNcdfVar} to get variable name varname <- getNcdfVar(filePath) # More examples can be found in the user manual on https://yuanchao-xu.github.io/hyfo/

References

Other functions in hyfo

Related functions from the same R package

  • Maintainer: Yuanchao Xu
  • License: GPL-2
  • Last published: 2023-08-16