ocean (version 0.2-4)

interp: Convert a single scalar or node based quantity to element based.

Description

The length of x determines how it will be treated. If x has length 1, it is returned as a single color. If the length of x is the number of nodes in the grid, its value for each element is calculated as the average of the value at the adjoining nodes. If the length of x is the number of elements in the grid, it is returned as is. Any other values throw an error.

Arguments

grid
An fvcom.grid instance.
x
A vector of length 1 or length get.nnodes(grid)

Value

A vector of length get.nelems(grid)