Downscale NetCDF file

Share:

Description

Downscale NetCDF file

Usage

1
2
downscaleNcdf(gridData, year = NULL, month = NULL, lon = NULL,
  lat = NULL)

Arguments

gridData

A hyfo list file from loadNcdf

year

A vector of the target year. e.g. year = 2000, year = 1980:2000

month

A vector of the target month. e.g. month = 2, month = 3:12

lon

A vector of the range of the downscaled longitude, should contain a max value and a min value. e.g. lon = c(-1.5, 2,5)

lat

A vector of the range of the downscaled latitude, should contain a max value and a min value. e.g. lat = c(32,2, 36)

Value

A downscaled hyfo list file.

References

  • Santander MetGroup (2015). ecomsUDG.Raccess: R interface to the ECOMS User Data Gateway. R package version 2.2-6. http://meteo.unican.es/ecoms-udg

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# 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)

# Then write to your work directory

nc1 <- downscaleNcdf(nc, year = 2006, lon = c(-2, -0.5), lat = c(43.2, 43.7))
nc2 <- downscaleNcdf(nc, 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/

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.