KPG1_CMVVx

Compresses n-dimensional data and variance arrays by averaging in ‘rectangular boxes

Description:

This routine compresses an n-dimensional data array and its associated variance array by integer factors along each dimension by averaging the arrays values in a rectangular box. The output data array may be variance-weighted average.

Invocation

CALL KPG1_CMVVx( NDIM, DIMS, INARR, INVAR, COMPRS, NLIM, WEIGHT, OUTARR, OUTVAR, SUM, NUM, STATUS )

Arguments

NDIM = INTEGER (Given)
The dimensionality of the n-dimensional arrays. It must be greater than one. To handle one-dimensional arrays, give them a second dummy dimension of 1.
DIMS( NDIM ) = INTEGER (Given)
The dimensions of the input n-dimensional arrays.
INARR( ) = ? (Given)
The input n-dimensional data array.
INVAR( ) = ? (Given)
The input n-dimensional variance array.
COMPRS( NDIM ) = REAL (Given)
The factors along each dimension by which the input array is compressed to form the output array.
NLIM = INTEGER (Given)
The minimum number of good input elements in a compression box that permits the corresponding output array element to be good. If fewer than NLIM pixels participated in the sum, the output pixel will be bad.
WEIGHT = LOGICAL (Given)
If true, the summation is weighted by the corresponding variance. If false all the input good elements are given equal weight when forming the output data-array value.
OUTARR( ) = ? (Write)
The compressed n-dimensional data array. Its dimension I must be given by DIMS( I )/COMPRS( I ).
OUTVAR( ) = ? (Write)
The compressed n-dimensional variance array. Its dimension I must be given by DIMS( I )/COMPRS( I ).
SUM( ) = ? (Returned)
Workspace used for efficiency in computing the summations. This should have size at least equal to DIMS( 1 ) 2.
NUM( ) = ? (Returned)
Workspace used to count the number of good elements in the input box. This should have size at least equal to DIMS( 1 ) 2.
STATUS = INTEGER (Given and Returned).
Global status value

Notes:

Bugs:

{note_bugs_here}