program test_r_functions c tests subroutines and functions in the r-function package c compile and link with r-function.f parameter (narray=1400) common /lines/rline(12,narray,6),tmin(narray),tmax(narray) + ,phimin(narray),phimax(narray),dy,dd,npts c c notice common block above c c initialize arrays etc in the common block call init_r_function c c testing c write(6,*)"Type in y and delta" read(5,*)y,d c c test getindex subroutine (normally called from within rfunction) c call getindex(y,d,index) write(6,*)y,d,index do 10 i=-70,70,5 do 20 j=-32,32,2 theta=i*.001 phi=j*.001 c c sample rfunction call c y is in meters c d (delta) is a fraction c theta and phi are radians c answer=rfunction(y,d,theta,phi) c c answer is the distance in phi theta space of the given c theta and phi point from the edge of the acceptance for the given y and d. c negative numbers are outside the acceptance. c -1000. is the default outside value (you get it when you're outside the c lookup table) c write(7,*)theta,phi,answer 20 continue 10 continue stop end