Convert climate4R grid object as spatial data frame.
Source:R/ext_climate4R_functions.R
grid2spatialdf.Rd
Convert climate4R grid object as spatial data frame.
Arguments
- grid
A climate4R grid object (see
loadeR::loadGridData()
,loadUerra()
,loadTrace()
, orloadCMIP5()
)
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)
} # }