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: costmb.f,v 1.2 2004/06/15 21:29:19 rodney Exp $ |
---|
11 | ! |
---|
12 | !CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC |
---|
13 | |
---|
14 | SUBROUTINE COSTMB (LOT, JUMP, N, INC, X, LENX, WSAVE, LENSAV, & |
---|
15 | & WORK, LENWRK, IER) |
---|
16 | INTEGER LOT, JUMP, N, INC, LENX, LENSAV, LENWRK, IER |
---|
17 | REAL X(INC,*), WSAVE(LENSAV), WORK(LENWRK) |
---|
18 | LOGICAL XERCON |
---|
19 | ! |
---|
20 | IER = 0 |
---|
21 | ! |
---|
22 | IF (LENX .LT. (LOT-1)*JUMP + INC*(N-1) + 1) THEN |
---|
23 | IER = 1 |
---|
24 | CALL XERFFT ('COSTMB', 6) |
---|
25 | GO TO 100 |
---|
26 | ELSEIF (LENSAV .LT. 2*N + INT(LOG(REAL(N))) +4) THEN |
---|
27 | IER = 2 |
---|
28 | CALL XERFFT ('COSTMB', 8) |
---|
29 | GO TO 100 |
---|
30 | ELSEIF (LENWRK .LT. LOT*(N+1)) THEN |
---|
31 | IER = 3 |
---|
32 | CALL XERFFT ('COSTMB', 10) |
---|
33 | GO TO 100 |
---|
34 | ELSEIF (.NOT. XERCON(INC,JUMP,N,LOT)) THEN |
---|
35 | IER = 4 |
---|
36 | CALL XERFFT ('COSTMB', -1) |
---|
37 | GO TO 100 |
---|
38 | ENDIF |
---|
39 | ! |
---|
40 | IW1 = LOT+LOT+1 |
---|
41 | CALL MCSTB1(LOT,JUMP,N,INC,X,WSAVE,WORK,WORK(IW1),IER1) |
---|
42 | IF (IER1 .NE. 0) THEN |
---|
43 | IER = 20 |
---|
44 | CALL XERFFT ('COSTMB',-5) |
---|
45 | ENDIF |
---|
46 | ! |
---|
47 | 100 CONTINUE |
---|
48 | RETURN |
---|
49 | END |
---|