closest_locid | R Documentation |
Get MERRA-2 grid IDs closest to the given coordinates
closest_locid(lon, lat, asList = FALSE)
lon |
longitude in degrees (-180 <= lon <= 180) |
lat |
latitude in degrees (-90 <= lat <= 90) |
asList |
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.
closest_locid(0, 0)
closest_locid(100.14, -85.145)
closest_locid(0, 89.5, asList = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.