interp_btw_hours | R Documentation |
This function linearly interpolates an FVCOM prediction between hours.
interp_btw_hours(x, h1, h2, p1, p2)
x |
A number which specifies the fractional hour for which a prediction is desired. |
h1 |
An integer which specifies the hour of the first FVCOM prediction. |
h2 |
An integer which specifies the hour of the surrounding FVCOM prediction. |
p1 |
A number which specifies the FVCOM prediction at |
p2 |
A number which specifies the FVCOM prediction at |
The function returns an interpolated FVCOM prediction for a time between two hours at which FVCOM predictions are available.
Edward Lavender
#### Example (1): Interpolate environmental conditions between hours # Imagine we want to know the predicted temperature at 10:10 am on a given day. # FVCOM outputs the predictions on every hour, so we have predictions for # ... 10 am and 11 am of 12 and 13 dg C respectively. Then, the interpolated # ... temperature at 10:10 am is interp_btw_hours(10+10/60, 10, 11, 12, 13)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.