deriveInterface: Identification of interface for derived variables

View source: R/deriveInterface.R

deriveInterfaceR Documentation

Identification of interface for derived variables

Description

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

Usage

deriveInterface(dataset, var, dictionary, time)

Arguments

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.

Details

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.

Value

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

Author(s)

J Bedia


SantanderMetGroup/loadeR.ECOMS documentation built on July 4, 2023, 4:29 a.m.