oph_expand

Description

Behaviour

It returns an array in which each element is copied from input measure if the corresponding element in the array ‘indexes’ is present in the set identified by subset string ‘start:stride:stop’. If the element is not present then a ‘filling’ item is put.

Parameters

  • input measure type : Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’;
  • output measure type : Ophidia typing. Supported types are: ‘oph_double’; ‘oph_float’;
  • measure : input measure.
  • indexes : input index array used to select data from input measure; lengths of both input arrays should be equal; supported type is only ‘oph_double’.
  • start : index of the first element of output array; if NULL it corresponds to the first index in ‘indexes’.
  • stride : step between successive elements in output array; if NULL it is set to 1.
  • stop : index of the last element of output array; if NULL it corresponds to the last index in ‘indexes’.
  • filling : item to be added or operation to be performed in case of empty elements; it can be set to: ‘NAN’, to fill empty elements with NAN (default); ‘interp’, to fill empty elements with the corrsponding value of the set identified by input subset string; a real number, to fill empty elements with a number.

Return type

Binary-array.

Examples

Fill monthly data with NAN when time dimension unit is ‘day’.

oph_expand('OPH_DOUBLE','OPH_DOUBLE',measure,dimension,NULL,30.4375)

Operation type

simple

Arguments

Argument name Type Mandatory Values Default Min/Max-value Min/Max-times
input measure type “oph_type” “yes” “‘oph_double’|’oph_float’ “     “1” / “1”
output measure type “oph_type” “yes” “‘oph_double’|’oph_float’ “     “1” / “1”
measure “binary-array” “yes”       “1” / “1”
indexes “binary-array” “no”   “NULL”   “0” / “1”
start “double” “no”   “NULL”   “0” / “1”
stride “double” “no”   “1”   “0” / “1”
stop “double” “no”   “NULL”   “0” / “1”
filling “string” “no”   “NAN”   “0” / “1”