The AIMAG function returns the imaginary part of a complex number.
Syntax
AIMAG (z)
z is an INTENT(IN) scalar or array of type COMPLEX.
A REAL number with the same kind as z. If z has the value (x,y) then the result has the value y.
Example
complex :: z=(-4.2,5.5) write(*,*) aimag(z) ! writes 5.500000