c---------------------------------------- c c this will perform the inverse c distortion correction... c subroutine wfc3ir_cg(xc,yc,xr,yr) implicit none real*8 xc,yc real*8 xr,yr real*8 xt, yt real*8 dx, dy, dd integer NIT real*8 xru, yru xr = xc yr = yc NIT = 0 1 continue NIT = NIT + 1 call wfc3ir_gc(xru,yru,xt,yt) dx = xc-xt dy = yc-yt dd = sqrt(dx**2+dy**2) xru = xru + (xc-xt)*0.5 yru = yru + (yc-yt)*0.5 if (dd.gt.0.001.and.NIT.lt.99) goto 1 11 continue xr = xru yr = yru return end