extractWRF: Extract variables from WeStCOMS-WRF (Weather Research...

View source: R/loadAndExtract.R

extractWRFR Documentation

Extract variables from WeStCOMS-WRF (Weather Research Forecasting) model

Description

Given an input dataframe with site locations and dates, this function extracts the corresponding WeStCOMS-WRF data. Output is summarised for the day as given in 'daySummaryFn'.

Usage

extractWRF(sampling.df, wrf.dir, wrf_i, returnFullDf = FALSE)

Arguments

sampling.df

Dataframe with a row for each sample. Columns must include 'site.id', 'obs.id', 'date' (YYYYMMDD), 'wrf_i', 'lon', 'lat', where 'wrf_i' indicates the corresponding rownumber in the dataframe wrf_i

wrf.dir

Character vector with directory for WRF files

wrf_i

Dataframe with WRF filenames and date ranges in yyyy-mm-dd (required column names: fname, date_0, date_1)

returnFullDf

Logical: return full dataframe or only obs.id + hydrovars?

Value

dataframe with site.id, date, and WRF variables


Sz-Tim/WeStCOMS documentation built on April 17, 2025, 3:10 p.m.