KPG1_CROUT

Creates and returns locators to the top-level and data-array of an NDF-type structure

Description:

An NDF-type data structure, associated with the supplied parameter name is created. A locator for this structure is returned. A TITLE component, associated with another parameter name is created within the structure and a character value, is obtained from the parameter system and written to the TITLE component. A DATA_ARRAY component is created. If the supplied origins are all one, DATA_ARRAY is primitive, having the supplied dimensionality and dimensions, and is of type _REAL. Otherwise DATA_ARRAY is a simple ARRAY-type structure containing the primitive _REAL data array and origin information. The locator to the primitive data array is also returned.

Invocation

CALL KPG1_CROUT( PARNAM, TLENAM, NDIM, DIMS, ORIGIN, LOCAT, DATLOC, DNAME, STATUS )

Arguments

PARNAM = CHARACTER ( ) (Given)
Parameter name associated with the NDF-type structure to be created.
TLENAM = CHARACTER ( ) (Given)
Parameter name associated with the TITLE component created in the new NDF-type structure.
NDIM = INTEGER (Given)
Dimensionality of the data-array component of the new NDF-type structure.
DIMS( NDIM ) = INTEGER (Given)
Dimensions of the data-array component of the new NDF-type structure.
ORIGIN( NDIM ) = INTEGER (Given)
The origin information of the data array. If a primitive NDF is to be created these should all be set to 1. Note though if other ARRAY-type components—QUALITY and VARIANCE—are propagated, the origin data of ARRAY-type components must be consistent not to invalidate the NDF. Therefore use the values returned by KPG1_GETIM unless QUALITY and VARIANCE are not propagated.
LOCAT = CHARACTER ( ) (Returned)
Locator to the new NDF-type structure. If status is bad on exit this locator is annulled. If status is bad on exit this locator is annulled.
DATLOC = CHARACTER ( DAT__SZLOC ) (Returned)
The locator to the structure containing the primitive form of the data array. If it is the top-level of the NDF structure, it will be a clone of LOCAT. Either way it will require annulment. If status is bad on exit this locator is annulled.
DNAME = CHARACTER ( DAT__SZNAM ) (Returned)
The name of the data array as this will be needed for access, and it is different depending on its location. This argument is probably unnecessary, but it is here defensively, in case the origin is changed to or from the default.
STATUS = INTEGER (Given and Returned)
The global status.

Notes: