This function accesses the THREDDS server of met.no with download queries formatted from user input. (to be expanded upon)

get_metno_reanalysis3(
  area,
  directory = NULL,
  fromdate = "2012-09-01 10:00:00",
  todate = "2012-09-01 20:00:00",
  area_buffer = 1500,
  preview = TRUE
)

Arguments

area

(string) path to geo-referenced shapefile covering the desired area

directory

(string) path to desired working directory (default: working directory)

fromdate

(string) date and time for start of time series (ie. "2012-09-01 10:00:00")

todate

(string) date and time for end of time series (ie. "2013-09-01 10:00:00")

area_buffer

desired buffer around the provided shapefile (in meters, default 1500)

preview

generate graphs showing previews of data download? (boolean)

Value

Writes .csv files into a folder located at the provided directory. One .csv file for each grid point within the (buffered) shape file area. Addtionally one metadata file (.csv) is written with the attributes of each other file

Author

Moritz Shore

Examples

 # for demonstration purposes, use path of package
 ##example_file_path <- system.file(package = "miljotools", "/extdata/metno_reanal/watershed.shp")

 ##get_metno_reanalysis3(
 ##area = example_file_path,
 ##fromdate = "2015-01-01",
 ##todate = "2015-01-02",
 ##area_buffer = 100,
 ##preview = TRUE
 ##)