integer function kf0(x,n,m,k,jmin,jmax) c c kf0: index of the maximum of relative_max(x(i,k)); jmin <= i <= jmax c [ dimenion of x : n,m ] c a.tento 5/2003 v.1.0 c implicit none integer n, m, k, jmin, jmax real x dimension x(n,m) c integer i, j real p c j = jmin p = -1.0e+20 do 1 i = jmin + 1, jmax - 1 if ( x(i,k) .gt. p ) then if ( x(i,k) .gt. x(i-1,k) .and. x(i,k) .ge. x(i+1,k) ) then p = x(i,k) j = i endif endif 1 continue c kf0 = j c return c c end