closest_locid: Get MERRA-2 grid IDs closest to the given coordinates

View source: R/locid.R

closest_locidR Documentation

Get MERRA-2 grid IDs closest to the given coordinates

Description

Get MERRA-2 grid IDs closest to the given coordinates

Usage

closest_locid(lon, lat, asList = FALSE)

Arguments

lon

longitude in degrees (-180 <= lon <= 180)

lat

latitude in degrees (-90 <= lat <= 90)

asList

Value

integer vector with locations IDs (locid) when 'asList' is FALSE (default). In the case of several values, only the first 'locid' will be returned. If 'asList' is TRUE, a list is returned with possible multiple values for each coordinate.

Examples

closest_locid(0, 0)
closest_locid(100.14, -85.145)
closest_locid(0, 89.5, asList = TRUE)


energyRt/merra2ools documentation built on May 2, 2024, 4:53 a.m.