5.6.3 Inserting an Array Field into a Compound Type: NF90_INSERT_ARRAY_COMPOUND
Insert a named array field into a compound type.
Usage
function nf90_insert_array_compound(ncid, xtype, name, offset, field_typeid, &
ndims, dim_sizes)
integer, intent(in) :: ncid
integer, intent(in) :: xtype
character (len = *), intent(in) :: name
integer, intent(in) :: offset
integer, intent(in) :: field_typeid
integer, intent(in) :: ndims
integer, intent(in) :: dim_sizes
integer :: nf90_insert_array_compound
NCID
- The ID of the file that contains the array type and the compound type.
XTYPE
- The typeid for this compound type, as returned by nf90_def_compound, or
nf90_inq_var.
NAME
- The name of the new field.
OFFSET
- Offset in byte from the beginning of the compound type for this
field.
FIELD_TYPEID
- The base type of the array to be inserted.
NDIMS
- The number of dimensions for the array to be inserted.
DIM_SIZES
- An array containing the sizes of each dimension.
Errors
NF90_NOERR
- No error.
NF90_EBADID
- Bad group id.
NF90_ENAMEINUSE
- That name is in use. Field names must be unique within a compound type.
NF90_EMAXNAME
- Name exceed max length NF90_MAX_NAME.
NF90_EBADNAME
- Name contains illegal characters.
NF90_ENOTNC4
- Attempting a netCDF-4 operation on a netCDF-3 file. NetCDF-4
operations can only be performed on files defined with a create mode
which includes flag NF90_NETCDF4. (see NF90_OPEN).
NF90_ESTRICTNC3
- This file was created with the strict netcdf-3 flag, therefore
netcdf-4 operations are not allowed. (see NF90_OPEN).
NF90_EHDFERR
- An error was reported by the HDF5 layer.
NF90_ENOTINDEFINE
- Not in define mode.
NF90_ETYPEDEFINED
- Attempt to change type that has already been committed. The first time
the file leaves define mode, all defined types are committed, and
can't be changed. If you wish to add an array to a compound type, you
must do so before the compound type is committed.
Example