CLOSED BOOK CLASS QUIZ GP211	January 14, 2009

your name_________________________________________

Answer on this sheet.  Duration 4 minutes.



# Nearest-neighbor interpolation would do this:  data = model( 1.5 + (t-t0)/dt)
#                             This is likewise but with _linear_ interpolation.
module lint1 {
real :: o1,d1
real, dimension (:), pointer :: coordinate
#%  _init ( o1,d1, coordinate)
#%  _lop  ( mm, dd)
integer i, im,  id
real    f, fx,gx
do id= 1, size(dd) {
        f = (coordinate(id)-o1)/d1;     i=f  ;   im= 1+i
        if( 1<=im && im< size(mm)) {   fx=f-i;   gx= 1.-fx
                if( adj) {

			************  WHAT GOES IN HERE ? *******************
			*                                                   *
			*                                                   *
			*                                                   *
			*                                                   *
			*                                                   *
			*                                                   *
			*                                                   *
			*                                                   *
			*                                                   *
			*                                                   *
			*                                                   *
			*                                                   *
			*****************************************************

			}
		else
                        dd(id) = dd(id) + gx * mm(im) + fx * mm(im+1)
		}
	}
}