variableAtPositionWithName
Access dynamical variables at arbitrary positions in the domain.
Declaration
[varargout] = variableAtPositionWithName(x,y,z,variableNames,options)
Parameters
xarray of x-positionsyarray of y-positionszarray of z-positions, or empty for two-dimensional variablesvariableNamesstrings of variable names.options.interpolationMethodperiodiclinearor cubicsplineinterpolation; defaultlinear
Returns
varargoutinterpolated arrays in the requested order and query shape
Discussion
Computes (or retrieves from cache) any known state variables and computes their values at the requested positions (x,y,z). For two-dimensional variables, interpolation uses only (x,y), and z may be empty.
The interpolation method may be linear or spline. Horizontal
coordinates are wrapped periodically before interpolation.
[u,v] = wvt.variableAtPositionWithName(xParticle,yParticle,zParticle,'u','v',interpolationMethod='spline');