Description Details Author(s) References See Also Examples
S3 implementation of the Random Forest MErging Procedure (RF-MEP), which combines two or more satellite-based datasets (e.g., precipitation products, topography) with ground observations to produce a new dataset with improved spatio-temporal distribution of the target field. In particular, this package was developed to merge different Satellite-based Rainfall Estimates (SREs) with measurements from rain gauges, in order to obtain a new precipitation dataset where the time series in the rain gauges are used to correct different types of errors present in the SREs. However, this package might be used to merge other hydrological/environmental satellite fields with point observations. For details, see Baez-Villanueva et al. (2020) <doi:10.1016/j.rse.2019.111606>. Bugs / comments / questions / collaboration of any kind are very welcomed.
Package: | RFmerge |
Type: | Package |
Version: | 0.1-10 |
Date: | 2020-05-21 |
License: | GPL >= 3 |
LazyLoad: | yes |
Packaged: | Thu May 21 12:28:07 -04 2020; MZB |
BuiltUnder: | R version 4.0.0 (2020-04-24) -- "Arbor Day" ; x86_64-pc-linux-gnu (64-bit) |
Mauricio Zambrano-Bigiarini, Oscar M. Baez-Villanueva
Maintainer: Mauricio Zambrano-Bigiarini <mzb.devel@gmail>
Baez-Villanueva, O. M.; Zambrano-Bigiarini, M.; Beck, H.; McNamara, I.; Ribbe, L.; Nauditt, A.; Birkel, C.; Verbist, K.; Giraldo-Osorio, J.D.; Thinh, N.X. (2020). RF-MEP: a novel Random Forest method for merging gridded precipitation products and ground-based measurements, Remote Sensing of Environment, 239, 111610. doi: 10.1016/j.rse.2019.111606. <https://authors.elsevier.com/c/1aKrd7qzSnJWL>.
Hengl, T., Nussbaum, M., Wright, M. N., Heuvelink, G. B., & Gr\"aler, B. (2018). Random forest as a generic framework for predictive modeling of spatial and spatio-temporal variables. PeerJ, 6, e5518.
https://cran.r-project.org/package=raster.
https://cran.r-project.org/package=hydroGOF.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | library(rgdal)
library(raster)
data(ValparaisoPPts)
data(ValparaisoPPgis)
data(ValparaisoSHP)
chirps.fname <- system.file("extdata/CHIRPS5km.tif",package="RFmerge")
prsnncdr.fname <- system.file("extdata/PERSIANNcdr5km.tif",package="RFmerge")
dem.fname <- system.file("extdata/ValparaisoDEM5km.tif",package="RFmerge")
CHIRPS5km <- brick(chirps.fname)
PERSIANNcdr5km <- brick(prsnncdr.fname)
ValparaisoDEM5km <- raster(dem.fname)
covariates <- list(chirps=CHIRPS5km, persianncdr=PERSIANNcdr5km,
dem=ValparaisoDEM5km)
# The following code assumes that the region is small enough for neglecting
# the impact of computing Euclidean distances in geographical coordinates.
# If this is not the case, please read the vignette 'Tutorial for merging
# satellite-based precipitation datasets with ground observations using RFmerge'
# without using parallelisation
rfmep <- RFmerge(x=ValparaisoPPts, metadata=ValparaisoPPgis, cov=covariates,
id="Code", lat="lat", lon="lon", mask=ValparaisoSHP, training=1)
# Detecting if your OS is Windows or GNU/Linux,
# and setting the 'parallel' argument accordingly:
onWin <- ( (R.version$os=="mingw32") | (R.version$os=="mingw64") )
ifelse(onWin, parallel <- "parallelWin", parallel <- "parallel")
#Using parallelisation, with a maximum number of nodes/cores to be used equal to 2:
par.nnodes <- min(parallel::detectCores()-1, 2)
rfmep <- RFmerge(x=ValparaisoPPts, metadata=ValparaisoPPgis, cov=covariates,
id="Code", lat="lat", lon="lon", mask=ValparaisoSHP,
training=0.8, parallel=parallel, par.nnodes=par.nnodes)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.