7.3.1 VRRNM/VRRNM0/VRRNM1

1.
Function
Calculates the moving average. VRRNM performs missing-value handling when the internal variable 'LMISS' handled by GLpGET/GLpSET is .TRUE.; when 'LMISS' is .FALSE., missing -value handling is not performed. VRRNM0 does not perform missing-value handling, while VRRNM1 performs missing value-handling.. The missing-value is set by the internal variable 'RMISS handled by GLpGET/GLpSET.
2.
Call
CALL VRRNM(RX,RY,N,JX,JY,NB)
CALL VRRNM0(RX,RY,N,JX,JY,NB)
CALL VRRNM1(RX,RY,N,JX,JY,NB)
3.
Explanation of Parameters
RX (R) The floating-point array for calculating the moving average.
RY (R) An floating-point array for storing the calculation results.
N (I) The number of array elements to process.
JX, JY (I) The interval of the array elements to process for arrays RX and RY.
NB (I) The length of data to calculate the moving average.
4.
Notes
(a)
NB must be greater than 1 and less than N, and be an odd number.
(b)
When RXi , RYi, represent the ith elements of arrays RX and RY to process  and M=(NB-1), the calculation result for the moving average is RYi = (¦²Mi =-MRXi ) from i =M+1 to N-M, and for data outside this range, the missing value (set by the internal variable 'RMISS' handled by GLRGET/GLRSET) is substituted. When subroutines that perform missing-value handling are selected, the average is calculated for data that are not missing value. In this case, NB that appears in the denominator will be the number of data that are not missing value. When the array for moving average calculation only contains missing-value elements, the missing value is returned.