Description Usage Arguments Details Value Author(s) See Also Examples
mHM_extrapolMat
extrapolates matrix values in invalid and border locations, e.g. originating from
meteorological input fields for mHM (netCDF format).
1 | mHM_extrapolMat(data, ext)
|
data |
matrix. |
ext |
radius within grid cells are extended, starting from valid values. |
Runing mHM the first time for some netCDF products (e.g. Spain02, E-OBS) the warning
no meteorological input available for whole simulation domain will be printed.
This function extrapolates grids in invalid locations within a radius given by the ext
argument.
Extrapolation is performed by a mean value of the surrounding cells of the invalid location.
matrix.
Johannes Brenner johannes.brenner@ufz.de
1 2 3 4 5 6 7 8 9 10 11 12 | # read netcdf file minimum air temperature
pkg_path <- path.package("mHMr")
tmin_netcdf <- file.path(pkg_path, "data", "tmin.nc")
tmin_op <- RNetCDF::open.nc(tmin_netcdf)
tmin <- RNetCDF::var.get.nc(tmin_op,"tmin")
image(tmin[,,1], zlim = c(2.5,4.5))
tmin1 <- mHM_extrapolMat(tmin[,,1], ext=1)
image(tmin1, zlim = c(2.5,4.5))
tmin2 <- mHM_extrapolMat(tmin[,,1], ext=2)
image(tmin2, zlim = c(2.5,4.5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.