39 subroutine bicubic(z,glamn,glomn,dla,dlo,
40 *nla,nlo,maxla,maxlo,xla,xlo,val)
43 implicit real*8 (a-h,o-z)
47 real*4 x,y,fx0,fx1,fx2,fx3,cubterp
56 if(jla.gt.nla-3)jla = nla-3
65 if(jlo.gt.nlo-3)jlo = nlo-3
74 x=(xlo-dlo*(jlo-1)-glomn)/dlo
81 *
'FATAL in bicubic: x<0 : ',f20.10)
88 *
'FATAL in bicubic: x>3 : ',f20.10)
97 y=(xla-dla*(jla-1)-glamn)/dla
104 *
'FATAL in bicubic: y<0 : ',f20.10)
111 *
'FATAL in bicubic: y>3 : ',f20.10)
124 fx0=cubterp(x,z(jla ,jlo ),z(jla ,jlo+1),
125 * z(jla ,jlo+2),z(jla ,jlo+3))
127 fx1=cubterp(x,z(jla+1,jlo ),z(jla+1,jlo+1),
128 * z(jla+1,jlo+2),z(jla+1,jlo+3))
130 fx2=cubterp(x,z(jla+2,jlo ),z(jla+2,jlo+1),
131 * z(jla+2,jlo+2),z(jla+2,jlo+3))
133 fx3=cubterp(x,z(jla+3,jlo ),z(jla+3,jlo+1),
134 * z(jla+3,jlo+2),z(jla+3,jlo+3))
136 val=dble(cubterp(y,fx0,fx1,fx2,fx3))
152 1001
format(f14.10,1x,f14.10,1x,i8,1x,f8.5)
153 1002
format(f14.10,1x,f14.10,1x,i8,1x,f8.5)
154 1003
format(4(f15.8,1x))
subroutine bicubic(z, glamn, glomn, dla, dlo, nla, nlo, maxla, maxlo, xla, xlo, val)
Subroutine to perform a 2-D cubic ("bicubic") interpolation.