What you have to do is use the Fortran INTEGER type in memory and use h5tset_size_f on H5T_INTEGER_NATIVE (or another INTEGER type) to set the size to 2 bytes. The library will store 16-bit integers instead of 32-bits.

Currently the F90 APIs do not support INTEGER*2 in memory.

See the example, h516bit.f90.