### NDF_NBLOC

Determine the number of blocks of adjacent pixels in an NDF

#### Description:

The routine determines the number of "blocks" (i.e. sections) of adjacent pixels that can be obtained from an NDF, subject to the constraint that no block should exceed a specified maximum number of pixels in any dimension. More specifically, given the maximum size in pixels of a block in each dimension (MXDIM), this routine returns the maximum value which can be supplied for the IBLOCK argument of the routine NDF_BLOCK if a valid NDF identifier for a block of adjacent pixels is to be returned.

#### Invocation

CALL NDF_NBLOC( INDF, NDIM, MXDIM, NBLOCK, STATUS )

#### Arguments

NDF identifier.
##### NDIM = INTEGER (Given)
Number of maximum dimension sizes.
##### MXDIM( NDIM ) = INTEGER (Given)
Array specifying the maximum size of a block in pixels along each dimension.
##### NBLOCK = INTEGER (Returned)
Number of blocks which can be obtained from the NDF.
##### STATUS = INTEGER (Given and Returned)
The global status.

#### Notes:

• This routine is provided to calculate an upper bound on the number of blocks for DO-loops which process NDFs by dividing them into separate blocks by means of calls to the routine NDF_BLOCK.

• If the number of maximum dimension sizes supplied (NDIM) is less than the number of NDF dimensions, then a value of 1 will be used for the extra dimension sizes. If the value of NDIM is larger than this number, then the excess dimension sizes will be ignored.

• A value of zero will be returned for the NBLOCK argument if this routine is called with STATUS set. The same value will also be returned if the routine should fail for any reason.