CDORemapper | R Documentation |
This is a transform function that uses CDO software to remap longitude-latitude
data subsets onto a specified target grid, intended for use as parameter
'transform' in a Start() call. This function complies with the input/output
interface required by Start() defined in the documentation for the parameter
'transform' of function Start().
This function uses the function CDORemap() in the package 's2dv' to
perform the interpolation, hence CDO is required to be installed.
CDORemapper(
data_array,
variables,
file_selectors = NULL,
crop_domain = NULL,
...
)
data_array |
A data array to be transformed. See details in the documentation of the parameter 'transform' of the function Start(). |
variables |
A list of auxiliary variables required for the transformation, automatically provided by Start(). See details in the documentation of the parameter 'transform' of the function Start(). |
file_selectors |
A charcter vector indicating the information of the path of the file parameter 'data_array' comes from. See details in the documentation of the parameter 'transform' of the function Start(). The default value is NULL. |
crop_domain |
A list of the transformed domain of each transform variable, automatically provided by Start(). |
... |
A list of additional parameters to adjust the transform process, as provided in the parameter 'transform_params' in a Start() call. See details in the documentation of the parameter 'transform' of the function Start(). |
An array with the same amount of dimensions as the input data array, potentially with different sizes, and potentially with the attribute 'variables' with additional auxiliary data. See details in the documentation of the parameter 'transform' of the function Start().
CDORemap
# Used in Start():
data_path <- system.file('extdata', package = 'startR')
path_obs <- file.path(data_path, 'obs/monthly_mean/$var$/$var$_$sdate$.nc')
sdates <- c('200011')
## Not run:
data <- Start(dat = list(list(path = path_obs)),
var = 'tos',
sdate = sdates,
time = 'all',
latitude = values(list(-60, 60)),
latitude_reorder = Sort(decreasing = TRUE),
longitude = values(list(-120, 120)),
longitude_reorder = CircularSort(-180, 180),
transform = CDORemapper,
transform_params = list(grid = 'r360x181',
method = 'conservative'),
transform_vars = c('latitude', 'longitude'),
return_vars = list(latitude = 'dat',
longitude = 'dat',
time = 'sdate'),
retrieve = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.