[2759] | 1 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 2 | ! |
---|
| 3 | ! FFTPACK 5.0 |
---|
| 4 | ! Copyright (C) 1995-2004, Scientific Computing Division, |
---|
| 5 | ! University Corporation for Atmospheric Research |
---|
| 6 | ! Licensed under the GNU General Public License (GPL) |
---|
| 7 | ! |
---|
| 8 | ! Authors: Paul N. Swarztrauber and Richard A. Valent |
---|
| 9 | ! |
---|
| 10 | ! $Id: cost1b.f,v 1.2 2004/06/15 21:14:57 rodney Exp $ |
---|
| 11 | ! |
---|
| 12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
| 13 | |
---|
| 14 | SUBROUTINE COST1B ( N, INC, X, LENX, WSAVE, LENSAV, & |
---|
| 15 | & WORK, LENWRK, IER) |
---|
| 16 | INTEGER N, INC, LENX, LENSAV, LENWRK, IER |
---|
| 17 | REAL X(INC,*), WSAVE(LENSAV), WORK(LENWRK) |
---|
| 18 | ! |
---|
| 19 | IER = 0 |
---|
| 20 | IF (LENX .LT. INC*(N-1) + 1) THEN |
---|
| 21 | IER = 1 |
---|
| 22 | CALL XERFFT ('COST1B', 6) |
---|
| 23 | GO TO 100 |
---|
| 24 | ELSEIF (LENSAV .LT. 2*N + INT(LOG(REAL(N))) +4) THEN |
---|
| 25 | IER = 2 |
---|
| 26 | CALL XERFFT ('COST1B', 8) |
---|
| 27 | GO TO 100 |
---|
| 28 | ELSEIF (LENWRK .LT. N-1) THEN |
---|
| 29 | IER = 3 |
---|
| 30 | CALL XERFFT ('COST1B', 10) |
---|
| 31 | GO TO 100 |
---|
| 32 | ENDIF |
---|
| 33 | ! |
---|
| 34 | CALL COSTB1 (N,INC,X,WSAVE,WORK,IER1) |
---|
| 35 | IF (IER1 .NE. 0) THEN |
---|
| 36 | IER = 20 |
---|
| 37 | CALL XERFFT ('COST1B',-5) |
---|
| 38 | ENDIF |
---|
| 39 | ! |
---|
| 40 | 100 CONTINUE |
---|
| 41 | RETURN |
---|
| 42 | END |
---|