I'm writing a code in Python that calls some subroutines written in Fortran. When the variables are defined in Fortran as:
real*8, intent(in) :: var1,var2
and, respectively in Python,
var1 = 1.0
var1 = 1.0
everything is fine. But if I define an extended real, that is:
real*16, intent(in) :: var1,var2
and in python use
import numpy as np
var1 = np.float16(2)
var2 = np.float16(2)
the variables take a strange number when passing them to the fortran routine. Can anyone see what I'm doing wrong?