ray {raytracing}R Documentation

Calculates the Rossby waves ray paths

Description

ray returns the Rossby wave ray paths (lat/lon) triggered from one initial source/position (x0, y0), one total wavenumber (K), and one direction set up when invoking the function. ray must ingest the meridional gradient of the absolute vorticity in mercator coordinatesbetam, the zonal mean wind u, and the latitude vector (lat). Those variables can be obtained (recommended) using betaks function. The zonal means of the basic state will be calculated along the ray program, as well as the conversion to mercator coordinates of u.

Usage

ray(
  betam,
  u,
  lat,
  x0,
  y0,
  K,
  dt,
  itime,
  direction,
  cx = 0,
  interpolation = "trin",
  tl = 1,
  a = 6371000,
  verbose = FALSE,
  ofile
)

Arguments

betam

matrix (longitude = rows x latitude from minor to major = columns) obtained with betaks. betam is the meridional gradient of the absolute vorticity in mercator coordinates

u

matrix (longitude = rows x latitude from minor to major = columns) obtained with betaks. Is the zonal wind speed in the appropriate format for the ray. It will be converted in mercator coordinates inside the ray

lat

Numeric vector of latitudes from minor to major (ex: -90 to 90). Obtained with betaks

x0

Numeric value. Initial longitude (choose between -180 to 180)

y0

Numeric value. Initial latitude

K

Numeric value; Total Rossby wavenumber

dt

Numeric value; Timestep for integration (hours)

itime

Numeric value; total integration time. For instance, 10 days times 4 times per day

direction

Numeric value (possibilities: 1 or -1) It controls the wave displacement: If 1, the wave goes to the north of the source; If -1, the wave goes to the south of the source.

cx

numeric. Indicates the zonal phase speed. The program is designed for eastward propagation (cx > 0) and stationary waves (cx = 0, the default).

interpolation

Character. Set the interpolation method to be used: trin or ypos

tl

Numeric value; Turning latitude. Do not change this! It will always start with a positive tl (1) and automatically change to negative (-1) after the turning latitude

a

Earth's radio (m)

verbose

Boolean; if TRUE (default) return messages during compilation

ofile

Character; Output file name with .csv extension, for instance, "/user/ray.csv"

Value

sf data.frame

See Also

ray_source

Examples

{
# For Coelho et al. (2015):
input <- system.file("extdata",
                     "uwnd.mon.mean_200hPa_2014JFM.nc",
                     package = "raytracing")
b <- betaks(u = input)
rt <- ray(betam = b$betam,
          u = b$u,
          lat = b$lat,
          K = 3,
          itime = 10 * 4,
          x0 = -130,
          y0 = -30,
          dt = 6,
          direction = -1,
          cx = 0,
          interpolation = "trin")
rp <- ray_path(rt$lon, rt$lat)
plot(rp,
     main = "Coelho et al. (2015): JFM/2014",
     axes = TRUE,
     cex = 2,
     graticule = TRUE)
}

[Package raytracing version 0.6.0 Index]