12 real(r8) :: f_q_profile
14 integer(itm_i4) :: nint
18 dps = 1._r8 / dble(npts - 1)
19 nint = int((npts - 1) * sqrt(
flux)) + 1
20 if (
flux >= 1._r8) nint = npts - 1
21 f_q_profile = q_in(nint) + (sqrt(
flux) - dps * (nint - 1)) / dps &
22 * (q_in(nint + 1) - q_in(nint))
real(r8) function q_profile(flux)
subroutine flux(psitok, rk, zk, nk)