ypos: Interpolation selecting the nearest neighbor

View source: R/ypos.R

yposR Documentation

Interpolation selecting the nearest neighbor

Description

This function get the position in a vector of a given latitute y.

Usage

ypos(y, lat, yk, mercator = FALSE)

Arguments

y

numeric value of one latitude

lat

numeric vector of latitudes from minor to major

yk

numeric vector to be approximated

mercator

Logical. Is it require to transform the final data in mercator coordinates? Default is FALSE.

Value

The position where the latitude y has the minor difference with lat

See Also

Other Interpolation: trin()

Examples

{
input <- system.file("extdata",
                     "uwnd.mon.mean_200hPa_2014JFM.nc",
                      package = "raytracing")
b <- betaks(u = input)
ykk <- rev(colMeans(b$betam))
ypos(y = -30, lat = seq(90, -90, -2.5), yk = ykk)

}

raytracing documentation built on June 7, 2022, 1:09 a.m.

Related to ypos in raytracing...