View source: R/metab_model_interface.R
predict_DO | R Documentation |
A function in the metab_model_interface. Returns predictions of dissolved oxygen.
predict_DO(
metab_model,
date_start = NA,
date_end = NA,
...,
attach.units = deprecated(),
use_saved = TRUE
)
## S3 method for class 'metab_Kmodel'
predict_DO(metab_model, date_start = NA, date_end = NA, ..., use_saved = TRUE)
## S3 method for class 'metab_model'
predict_DO(
metab_model,
date_start = NA,
date_end = NA,
...,
attach.units = deprecated(),
use_saved = TRUE
)
## S3 method for class 'metab_night'
predict_DO(metab_model, date_start = NA, date_end = NA, ..., use_saved = TRUE)
## S3 method for class 'metab_sim'
predict_DO(metab_model, date_start = NA, date_end = NA, ...)
metab_model |
A metabolism model, implementing the metab_model_interface, to use in predicting metabolism |
date_start |
Date or a class convertible with as.Date. The first date (inclusive) for which to report DO predictions. If NA, no filtering is done. |
date_end |
Date or a class convertible with as.Date. The last date (inclusive) for which to report DO predictions. If NA, no filtering is done. |
... |
Other arguments passed to class-specific implementations of
|
attach.units |
(deprecated, effectively FALSE in future) logical. Should units be attached to the output? |
use_saved |
logical. Is it OK to use predictions that were saved with the model? |
A data.frame of dissolved oxygen predictions at the temporal resolution of the input data
metab_Kmodel
: Throws an error because models of type 'Kmodel' can't
predict DO. metab_Kmodel
predicts K at daily timesteps and usually
knows nothing about GPP or ER. So it's not possible to predict DO from this
model. Try passing the output to metab_mle and THEN predicting DO.
metab_model
: This implementation is shared by many model types
metab_night
: Generate nighttime dissolved oxygen predictions from a
nighttime regression model. metab_night
only fits ER and K, and only
for the darkness hours, so predictions are only generated for those hours.
metab_sim
: Simulate values for DO.obs (with process and
observation error), DO.mod (with process error only), and DO.pure (with no
error). The errors are randomly generated on every new call to predict_DO.
Other metab_model_interface:
get_data_daily()
,
get_data()
,
get_fitting_time()
,
get_fit()
,
get_info()
,
get_param_names()
,
get_params()
,
get_specs()
,
get_version()
,
predict_metab()
dat <- data_metab('3', day_start=12, day_end=36)
mm <- metab_night(specs(mm_name('night')), data=dat)
preds <- predict_DO(mm, date_start=get_fit(mm)$date[3])
head(preds)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.