View source: R/interpolate_DWD.R
interpolate_DWD | R Documentation |
This is a function to interpolate the DWD data downloaded. The meteorological variables are point values and coordinates converted to a grid based on raster.
interpolate_DWD(
var_DWD,
stations_DWD,
res_utm,
radius_km,
crop_extent,
vgm_model = c("Exp", "Mat", "Gau", "Sph")
)
var_DWD |
a numeric vector with the DWD values per station and timestamp |
stations_DWD |
the coordination of the DWD station |
res_utm |
resolution of the final raster |
radius_km |
the distance used in the get_dwd data to select the stations |
crop_extent |
the extent of the area to crop |
vgm_model |
the variagram theoretical model, default "Sph" |
stack raster with the climatological variable interpolated in space and time
# air temperature
krg_Ta <- lapply(1:n, FUN = function(i) Interp_DWD(var_DWD = as.numeric(Air_temp[[1]][i,-1]),
stations_DWD = Air_temp[[2]],
res = st_grid,
crop_extent = raster::extent(Berlin_border_utm)));
krg_Ta[[1]];
plot(krg_Ta[[1]]);
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.