Description Usage Arguments Details Value Author(s) See Also Examples
mHM_extrapolNetCDF uses mHM_extrapolMat to extrapolate its matrix values in invalid and border location, 
e.g. originating from meteorological input fields for mHM (netCDF format).
| 1 | mHM_extrapolNetCDF(netCDF, var, ext, return = FALSE)
 | 
| netCDF | netCDF file name (full path). | 
| var | character, name of variable to extrapolate. | 
| ext | integer, radius (number of grid cells) within grid cells are extended, starting from border grid cells. | 
| return | boolean, should extrapolated array be returned in console? default=FALSE | 
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 (number of grid cells) given by ext.
Extrapolation is performed by a mean value of the surrounding cells of the invalid location.
Caution: netCDF input file will be overwritten, backup original file before use.
netCDF file
Johannes Brenner johannes.brenner@ufz.de
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # read netcdf file minimum air temperature for JĂșcar domain
 pkg_path <- path.package("mHMr")
 tmin_netcdf <- file.path(pkg_path, "data", "tmin.nc")
# open connection to netCDF
 tmin_op <-  RNetCDF::open.nc(tmin_netcdf)
# retrieve min. air temp  
 tmin <- RNetCDF::var.get.nc(tmin_op,"tmin")
# visualise original field
 image(tmin[,,1], zlim = c(2.5,4.5))
# extrapolate (radius: 1 grid cell)
 tmin_ext <- mHM_tmin_netcdf(netCDF = tmin_netcdf, vat = "tmin", ext = 1)
# visualise extrapolated field
 image(tmin_ext[,,1], zlim = c(2.5,4.5))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.