trin {raytracing}R Documentation

Performs trigonometric interpolation

Description

This function performs trigonometric interpolation for the passed basic state variable and the requested latitude

Usage

trin(y, yk, mercator = FALSE)

Arguments

y

Numeric. The latitude where the interpolation is required

yk

Numeric vector of the data to be interpolated. For instance, umz or betam

mercator

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

Value

Numeric value

Note

This function is an alternative to ypos and is more accurate

See Also

ypos ray ray_source

Other Interpolation: ypos()

Examples

{
input <- system.file("extdata",
                     "uwnd.mon.mean_200hPa_2014JFM.nc",
                      package = "raytracing")
b <- betaks(u = input)
umz <- rev(colMeans(b$u, na.rm = TRUE))*cos(rev(b$lat)*pi/180)
betamz <- rev(colMeans(b$betam, na.rm = TRUE))
y0 <- -17
trin(y = y0, yk = umz)
}

[Package raytracing version 0.6.0 Index]