config_preds_to_data_column: Get predictions of metabolism or DO from a model

View source: R/config_to_data.R

config_preds_to_data_columnR Documentation

Get predictions of metabolism or DO from a model

Description

Most of this code is the same whether it's a pred (the name of a model on sciencebase) or a pred_file (the name of a local file name)

Usage

config_preds_to_data_column(var, site, src, type)

Arguments

var

the variable name to retrieve

src

the model_name or model file name

type

character in c("SB","file") indicating whether src is a model on sciencebase or a local file name

Details

The trick is that model predictions only store the input time, with was either local.time (< streamMetabolizer 0.8.0) or solar.time (>=0.8.0) rather than UTC time. So this function draws on our knowledge of the site-specific mapping between UTC time and solar.time or date (as stored in sitetime and sitedate, respectively) to come up with the UTC DateTime stamps that correspond to these predictions. We could potentially just use convert_solartime_to_UTC, but I'm nervous about tiny imprecisions that would make these not match up to other DateTime stamps.


USGS-R/mda.streams documentation built on June 3, 2023, 8:43 a.m.