resample_to_field: Match GLM water temperatures with field observations

View source: R/resample_to_field.R

resample_to_fieldR Documentation

Match GLM water temperatures with field observations

Description

Match GLM water temperatures with field observations

Usage

resample_to_field(
  nc_file,
  field_file,
  method = "match",
  precision = "hours",
  var_name = "temp"
)

Arguments

nc_file

a string with the path to the netcdf output from GLM

field_file

a string with the path to the field observation file

method

'match' for exact match or 'interp' for temporal interpolation

precision

matching precision (must be 'secs', 'mins','hours', or 'days')

var_name

Name of variable to look for in field_obs file. Should match a GLM simulation variable (see output from sim_vars).

Value

validation a data.frame with DateTime and temperature at depth

Author(s)

Jordan S. Read

See Also

resample_sim, get_temp

Examples

nc_file <- system.file("extdata", "output/output.nc", package = "glmtools")
field_file <- system.file("extdata", "LakeMendota_field_data_hours.csv", package = "glmtools")
temps <- resample_to_field(nc_file, field_file)

buoy_file <- system.file('extdata', 'LakeMendota_buoy_data.csv', package = 'glmtools')
temps <- resample_to_field(nc_file, buoy_file)

USGS-R/glmtools documentation built on March 26, 2024, 5:43 p.m.