sl.shift: Shift Point on Sphere

View source: R/sl.shift.R

sl.shiftR Documentation

Shift Point on Sphere

Description

Shift a point on a sphere based on zonal and meridional velocities (times dt).

Usage

sl.shift(lon, lat, udt, vdt, Rsphere)

Arguments

lon

a scalar giving the longitude of the start point.

lat

a scalar giving the latitude of the start point.

udt

a scalar giving the zonal velocity (times dt). Units should be consistent with the argument Rsphere.

vdt

a scalar giving the meridional velocity (times dt). Units should be consistent with the argument Rsphere.

Rsphere

a scalar giving the radius of the sphere according to which the units of udt and vdt are interpreted. Default is 1 (unit sphere).

Details

The shift is along a great circle that matches the tangent defined by udt and vdt at the start location and assuming that udt and vdt are valid at the start point; the total 'speed' is then kept constant and is assumed to always point along the great circle. This means that the corresponding 'u' and 'v' computed along the 'trajectory' are actually different from the values provided for the start location.

The computation is carried out linearly in xyz-space (with an appropriate stretching factor to account for the curvature of the great circle); therefore, shifts only up to 90 degree are possible (i.e., sqrt((udt/Rsphere)^2+(vdt/Rsphere)^2) < pi/2).

Value

lon

a scalar giving the longitude of the shifted point.

lat

a scalar giving the latitude of the shifted point.

Author(s)

Helge Goessling

See Also

sl.p2p, sl.fillequidist

Examples

sl.shift(lon=9,lat=50,u=1000,v=1000,Rsphere=6371)
## Should return:
## $lon
## [1] 26.04508
## 
## $lat
## [1] 57.92084

FESOM/spheRlab documentation built on April 6, 2024, 6:52 p.m.