greatly simplify trilinear interp using per(ix,nx) function (periodization in x-direction), all working in true 2D now (nx=1)