R/metnordic_extract_grid.R
metnordic_extract_grid.RdThis function takes the files from metnordic_merge_hourly() and extracts
timeseries at desired locations. If a polygon shapefile is passed to the
function, data will be extracted at each grid cells within the (buffered)
area. If a point geometry is supplied, data will be extracted at each point. A
file is written to disk with .csv file for each grid cell and a metadata file for each grid cell.
metnordic_extract_grid(
merged_path,
area,
buffer = 0,
mn_variables,
outdir,
meta_shp = FALSE,
verbose = FALSE
)String, Path to merged ncdf files from metnordic_merge_hourly()
Geo-referenced shapefile either of polygon or point geometry. Passing a polygon geometry will lead to a regular grid being extracted from all overlaying points.
Numeric, buffer in meters. Useful for getting grid cells just outside of catchment. Not used if a point geometry is passed.
Character Vector, Met Nordic variables to extract
String, Folder where data will be written
If set to TRUE, then a shapefile of the extracted grid points with ID will be written to the outdir
Boolean, print status
path to written files