RF_Weights {CSTools} | R Documentation |
Compute climatological ("orographic") weights from a fine-scale precipitation climatology file.
RF_Weights( zclim, latin, lonin, nf, lat, lon, fsmooth = TRUE, lonname = "lon", latname = "lat", ncores = NULL )
zclim |
a multi-dimensional array with named dimension containing at least one precipiation field with spatial dimensions. |
latin |
a vector indicating the latitudinal coordinates corresponding to the |
lonin |
a vector indicating the longitudinal coordinates corresponding to the |
nf |
Refinement factor for downscaling (the output resolution is increased by this factor). |
lat |
Vector of latitudes. The number of longitudes and latitudes is expected to be even and the same. If not the function will perform a subsetting to ensure this condition. |
lon |
Vector of longitudes. |
fsmooth |
Logical to use smooth conservation (default) or large-scale box-average conservation. |
lonname |
a character string indicating the name of the longitudinal dimension set as 'lon' by default. |
latname |
a character string indicating the name of the latitudinal dimension set as 'lat' by default. |
ncores |
an integer that indicates the number of cores for parallel computations using multiApply function. The default value is one. |
An object of class 's2dv_cube' containing in matrix data
the weights with dimensions (lon, lat).
Jost von Hardenberg - ISAC-CNR, j.vonhardenberg@isac.cnr.it
Terzago, S., Palazzi, E., & von Hardenberg, J. (2018). Stochastic downscaling of precipitation in complex orography: A simple method to reproduce a realistic fine-scale climatology. Natural Hazards and Earth System Sciences, 18(11), 2825-2840. http://doi.org/10.5194/nhess-18-2825-2018 .
a <- array(1:2500, c(lat = 50, lon = 50)) res <- RF_Weights(a, seq(0.1 ,5, 0.1), seq(0.1 ,5, 0.1), nf = 5, lat = 1:5, lon = 1:5)