interp_btw_depths | R Documentation |
This function linearly interpolates an FVCOM prediction between the depths of two layers.
interp_btw_depths(x, d1, d2, p1, p2)
x |
A number which specifies the depth for which a prediction is desired. |
d1 |
An integer which specifies the depth of the first FVCOM prediction. |
d2 |
An integer which specifies the depth of the second FVCOM prediction. |
p1 |
A number which specifies the FVCOM prediction at |
p2 |
A number which specifies the FVCOM prediction at |
This function implements linear interpolation between the depths of layers, rather than layer numbers, because the spacing between layers is non linear.
The function returns an interpolated FVCOM prediction for a depth between two depths (the depths of two layers at which FVCOM predictions are available).
Edward Lavender
#### Example (1): Interpolate environmental conditions between depths # Imagine we want to know the predicted temperature at depth 25 m on a given day. # For nodes, FVCOM outputs the predictions for each layer. Imagine that the nearest # ... predictions are for layers 2 and 3 which have depths 20 and 30 m respectively. # Imagine these predictions are 8 and 9 dg C. Then the interpolated temperature at # ... depth 25 m is: interp_btw_depths(25, 20, 30, 8, 9)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.