When a VLEN is read into user memory from the file, the HDF5 library performs memory allocations for each of the variable length arrays contained within the VLEN structure. This memory must be freed by the user to avoid memory leaks.
This violates the normal netCDF expectation that the user is responsible for all memory allocation. But, with VLEN arrays, the underlying HDF5 library allocates the memory for the user, and the user is responsible for deallocating that memory.
function nf90_free_vlen(vl) character (len = *), intent(in) :: vlen integer :: nf90_free_vlen end function nf90_free_vlen
VL
NF90_NOERR
NF90_EBADTYPE