Skip to contents

Convert climate4R grid object as spatial data frame.

Usage

grid2spatialdf(grid)

Arguments

grid

A climate4R grid object (see loadeR::loadGridData(), loadUerra(), loadTrace(), or loadCMIP5())

Value

A dataframe with the format of a spatial data.frame: two columns with X and Y coordinates, and additional twelve columns for the value of the variable in each month of the year.

Examples

if (FALSE) { # \dontrun{
uerra <- dsclim::loadUerra(
  "Data/UERRA/UERRA-HARMONIE/2m_temperature/latlon/1961-90_2m_temperature.nc",
  "tas"
)

grid2spatialdf(uerra)
} # }