loadNcdf function

Load NetCDF file

Load NetCDF file

loadNcdf(filePath, varname, tz = "GMT", ...)

Arguments

  • filePath: A path pointing to the NetCDF file, version3.
  • varname: A character representing the variable name, you can use getNcdfVar to get the basic information about the variables and select the target.
  • tz: A string representing the time zone, default is GMT, if you know what time zone is you can assign it in the argument. If tz = '', current time zone will be taken.
  • ...: Several arguments including Year, month, lon, lat type in ?downscaleNcdf for details.You can load while downscale, and also first load than use downscaleNcdf to downscale.

Returns

A list object from hyfo containing the information to be used in the analysis, or biascorrection.

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) nc <- loadNcdf(filePath, varname) # you can directly add your downscale information to the argument. nc1 <- loadNcdf(filePath, varname, year = 2006, lon = c(-2, -0.5), lat = c(43.2, 43.7)) nc2 <- loadNcdf(filePath, varname, year = 2005, month = 3:8, lon = c(-2, -0.5), lat = c(43.2, 43.7)) # More examples can be found in the user manual on http://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