daymet_index: Compute indices into daymet arrays from lon/lat or from the...

View source: R/grid.R

daymet_indexR Documentation

Compute indices into daymet arrays from lon/lat or from the native daymet Lambert conformal conic coordinates

Description

Compute indices into daymet arrays from lon/lat or from the native daymet Lambert conformal conic coordinates

Usage

daymet_index(
  lon,
  lat,
  bag,
  crs = c("longlat", "daymet", "native")[1],
  bbox = FALSE
)

Arguments

lon

vector of longitudes

lat

vector of latitudes

bag

a list containing look up values of daymet array lons and lats

crs

character indicating what proj the inputs belong to "longlat" or "daymet"

bbox

logical if TRUE assume we are trying to find the enclosing bbox, which trims the result to the maximum range in x and.

Value

a two column vector of closest indices in [x,y] order


BigelowLab/daymet documentation built on Aug. 29, 2023, 8:21 a.m.