Learn R Programming

raytracing (version 0.6.0)

trin: 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

See Also

ypos ray ray_source

Other Interpolation: ypos()

Examples

Run this code
# NOT RUN {
{
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)
}
# }

Run the code above in your browser using DataLab