Debian Codegraph @

packages/seacas/applications/blot/ckcntr.f

raw
1 C Copyright(C) 1999-2020 National Technology & Engineering Solutions
2 C of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 C NTESS, the U.S. Government retains certain rights in this software.
4 C
5 C See packages/seacas/LICENSE for details
6
7 C=======================================================================
8 SUBROUTINE CKCNTR (OK)
9 C=======================================================================
10
11 C --*** CKCNTR *** (DETOUR) Check the contour values
12 C -- Written by Amy Gilkey - revised 07/10/87
13 C --
14 C --CKCNTR checks that all specified contour values increase or decrease.
15 C --
16 C --Parameters:
17 C -- OK - OUT - true iff the contour values are consistent
18 C --
19 C --Common Variables:
20 C -- Uses CINTOK, LINCON, NCNTR, CINTV of /CNTR/
21
22 include 'cntr.blk'
23
24 LOGICAL OK
25
26 CHARACTER*80 ERRSTR
27
28 OK = .TRUE.
29
30 IF (CINTOK) THEN
31 IF (LINCON) THEN
32 NC = NCNTR
33 ELSE
34 NC = NCNTR+1
35 END IF
36
37 IF (CINTV(1) .LE. CINTV(2)) THEN
38 DO 100 I = 2, NC
39 IF (CINTV(I-1) .GE. CINTV(I)) THEN
40 WRITE (ERRSTR, 10000)
41 & 'Contour interval ', I-1, ' >= interval ', I
42 10000 FORMAT (A, I5, A, I5)
43 CALL SQZSTR (ERRSTR, LSTR)
44 CALL PRTERR ('CMDWARN', ERRSTR(:LSTR))
45 OK = .FALSE.
46 END IF
47 100 CONTINUE
48 ELSE
49 DO 110 I = 2, NC
50 IF (CINTV(I-1) .LE. CINTV(I)) THEN
51 WRITE (ERRSTR, 10000)
52 & 'Contour interval ', I-1, ' <= interval ', I
53 CALL SQZSTR (ERRSTR, LSTR)
54 CALL PRTERR ('CMDWARN', ERRSTR(:LSTR))
55 OK = .FALSE.
56 END IF
57 110 CONTINUE
58 END IF
59 END IF
60
61 RETURN
62 END