5.7.1 Define a Variable Length Array (VLEN): NF90_DEF_VLEN
Use this function to define a variable length array type.
Usage
function nf90_def_vlen(ncid, name, base_typeid, xtypeid)
integer, intent(in) :: ncid
character (len = *), intent(in) :: name
integer, intent(in) :: base_typeid
integer, intent(out) :: xtypeid
integer :: nf90_def_vlen
NCID
- The ncid of the file to create the VLEN type in.
NAME
- A name for the VLEN type.
BASE_TYPEID
- The typeid of the base type of the VLEN. For example, for a VLEN of
shorts, the base type is NF90_SHORT. This can be a user defined type.
XTYPEP
- The typeid of the new VLEN type will be set here.
Errors
NF90_NOERR
- No error.
NF90_EMAXNAME
- NF90_MAX_NAME exceeded.
NF90_ENAMEINUSE
- Name is already in use.
NF90_EBADNAME
- Attribute or variable name contains illegal characters.
NF90_EBADID
- ncid invalid.
NF90_EBADGRPID
- Group ID part of ncid was invalid.
NF90_EINVAL
- Size is invalid.
NF90_ENOMEM
- Out of memory.
Example