View source: R/deriveInterface.R
deriveInterface | R Documentation |
Determines whether a variable is derived or not and returns the interface name
if applicable, building on the information retrieved from the dictionary.
This is a subroutine of loadECOMS
deriveInterface(dataset, var, dictionary, time)
dataset |
character string indicating the dataset. See details. |
var |
character string defining the target variable. See details. |
dictionary |
Logical indicating if a dictionary is used. |
Currently in ECOMS there is only a reduced set of derived variables,
corresponding to the S4-seasonal-15-member model, all at surface level, but the
function is intended to handle other eventualities (derived 3D vars and/or
derived variables from other datasets/models). The underlying idea of the function is
first arbitrarily loading one of the input variables (the leadVar
), whose
geolocation and time subsetting definition are used subsequently for all other input
variables. For instance, if one needs the ‘original var’ surface wind speed ("wss"
),
the first variable being loaded (i.e., the ‘leading var’) is the eastward
wind component ("uas"
), and then all parameters are passed to the subsequent
functions for subsetting and are recicled for loading also the northward component "vas"
needed to compute the velocity module.
A list of length two:
deriveInterfaceEither a character string indicating the interface to derive the variable, or NULL if the variable is not derived
leadVarFirst variable that will be loaded and whose subsetting parameters and metadata will be used as reference for the derived variable. See details.
origVarName of the variable requested. In case of applying an approximation function, this is the requested variable
J Bedia
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.