- BD_Insitu
`data.table` containing the ground truth measurements (dependent variable) used to train the RFplus model.
Each column represents a ground station, and station identifiers are stored as column names. The class of `BD_Insitu`
must be `data.table`. Each row represents a time step with measurements of the corresponding station.
- Cords_Insitu
`data.table` containing metadata for the ground stations. Must include the following columns:
- "Cod":
Unique identifier for each ground station.
- "X":
Latitude of the station in UTM format.
- "Y":
Longitude of the station in UTM format.
- "Z":
Altitude of the station in meters.
- Covariates
A list of covariates used as independent variables in the RFplus model. Each covariate should be a
`SpatRaster` object (from the `terra` package) and can represent satellite-derived weather variables or a Digital
Elevation Model (DEM). All covariates should have the same number of layers (bands), except for the DEM, which must have only one layer.
- ...
Additional arguments to pass to the underlying methods (e.g., for model tuning or future extensions).
- n_round
Numeric indicating the number of decimal places to round the corrected values. If `n_round` is set to `NULL`, no rounding is applied.
- wet.day
Numeric value indicating the threshold for wet day correction. Values below this threshold will be set to zero.
- `wet.day = FALSE`: No correction is applied (default).
- For wet day correction, provide a numeric threshold (e.g., `wet.day = 0.1`).
- ntree
Numeric indicating the maximum number trees to grow in the Random Forest algorithm. The default value is set to 2000. This should not be set to too small a number, to ensure that every input row gets predicted at least a few times. If this value is too low, the prediction may be biased.
- seed
Integer for setting the random seed to ensure reproducibility of results (default: 123).
- training
Numerical value between 0 and 1 indicating the proportion of data used for model training. The remaining data are used for validation. Note that if you enter, for example, 0.8 it means that 80
If you do not want to perform validation, set training = 1. (Default training = 1).
- Rain_threshold
A list of numeric vectors that define the precipitation thresholds for classifying rainfall events into different categories based on intensity.
Each element of the list should represent a category, with the category name as the list element's name and a numeric vector specifying the lower and upper bounds for that category.
Note: See the "Notes" section for additional details on how to define categories, use this parameter for validation, and example configurations.
- method
A character string specifying the quantile mapping method used for distribution adjustment. Options are:
- "RQUANT":
Robust quantile mapping to adjust satellite data distribution to observed data.
- "QUANT":
Standard quantile mapping.
- "none":
No distribution adjustment is applied. Only Random Forest-based bias correction and residual correction are performed.
- ratio
integer Maximum search radius (in kilometers) for the quantile mapping setting using the nearest station. (default = 15 km)
- save_model
Logical value indicating whether the corrected raster layers should be saved to disk. The default is `FALSE`.
If set to `TRUE`, make sure to set the working directory beforehand using `setwd(path)` to specify where the files should be saved.
- name_save
Character string. Base name for output file (default: NULL). The output file will be saved as "Model_RFplus.nc".
If you set a different name, make sure you do not set the ".nc" format,
as the code will internally assign it.