get_merra2_grid | R Documentation |
Get MERRA-2 grid
get_merra2_grid(
type = "polygons",
locid = NULL,
lon = c(-180, 180),
lat = c(-90, 90),
crs = 4326,
add_lonlat = FALSE,
add_poles_points = TRUE,
...
)
type |
type of grid-data to return, spatial points ("points") or polygons ("poly") |
locid |
(optional) integer vector of location identifiers for which the grid will be returned. |
lon |
numeric vector (min and max) with the range of longitude coordinates of the grid to return. Default 'c(-180, 180)'. |
lat |
numeric vector with the range of latitude coordinates of the grid to return. Default 'c(-180, 180)'. |
crs |
target coordinate reference system: object of class 'sf::crs', or input string for 'sf::st_crs'. Default '4326'. |
add_lonlat |
logical, should merra-points coordinates ('lon', 'lat') be added to the data. FALSE by default. |
add_poles_points |
logical, in the case of "polygons" grid, should points at poles be added to the data. TRUE by default. |
... |
Returns 'sf' object with MERRA-2 grid, points or polygons. If polygons requested, grid of will be returned where MERRA2 coordinates are considered as centers of every polygon, except cells with 'lat = -90' or 'lat = 90'. Spatial points will be returned for the cells near poles.
x <- get_merra2_grid()
head(x)
getGrid("poly", "sf")
getGrid(lon = c(-70, -60), lat = c(30, 40), class = "df")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.