* Last processed by NICE on 12-Jun-2000 15:54:00 * Customized for : IEEE, LINUX, UNIX, MOTIF, F77 C makplan_fungen.f * * SUBROUTINE FUNGEN(FUNC,IFUN) * c************************************************************************ c this subroutine sets up the convolving function used to * c filter and regrid temporal data. * c************************************************************************ * INCLUDE 'const.inc' REAL*8 FUNC(1), TAP, XF0, XF1 INTEGER I,IFUN * IF (IFUN.GT.2.OR.IFUN.LT.0) THEN WRITE (6,'(a)') 'No tapering function applied' ENDIF TAP = 1D0 XF0 = PI/5D1 XF1 = 0D0 FUNC(1) = 1D0 DO I = 2, 201 XF1 = XF1 + XF0 TAP = 1D0 * * ---- Tapering with a linear slope in the last quarter * * if (i.ge.151) then * tap = (201d0 - i)/5d1 * endif * * ---- Tapering with a parabolic profile * IF (IFUN.EQ.0) TAP = 1-((I-1)/2D2)**2 * * ---- Tapering with a gaussian profile * IF (IFUN.EQ.1) TAP = EXP(-((I-1)/1D2)**2) * * ---- Tapering with a linear slope * IF (IFUN.EQ.2) TAP = 1-((I-1)/2D2) * FUNC(I) = TAP * SIN(XF1)/XF1 ENDDO RETURN END