Debian Codegraph @

packages/seacas/applications/explore/exp_rdqa.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 C=======================================================================
7 SUBROUTINE RDQA (NDB, NQAREC, NINFO, KQAREC, KINFO, C)
8 C=======================================================================
9
10 C --*** RDQA *** (EXPLORE) Read QA and information records
11 C --
12 C --RDQA reads the QA records and the information records.
13 C --An error message is displayed if the end of file is read, unless
14 C --end of GENESIS file.
15 C --
16 C --Parameters:
17 C -- NDB - IN - the database number
18 C -- NQAREC - OUT - the number of QA records
19 C -- NINFO - OUT - the number of information records
20
21 include 'exodusII.inc'
22
23 CHARACTER*1 C(*)
24
25 CHARACTER*80 ERRMSG
26
27 NQAREC = 0
28 NINFO = 0
29
30 call exinq(ndb, EXQA, nqarec, rdum, cdum, ierr)
31 call exinq(ndb, EXINFO, ninfo, rdum, cdum, ierr)
32 call mcrsrv('QAREC', kqarec, nqarec*4*MXSTLN)
33 call mcrsrv('INFREC', kinfo, ninfo*MXLNLN)
34 CALL MCSTAT (NERR, MEM)
35 IF (NERR .GT. 0) GOTO 160
36
37 if (nqarec .gt. 0) then
38 C ... Wrapper to get strings the right length
39 call exgqaw(ndb, c(kqarec), ierr)
40 if (ierr .ne. 0) go to 180
41 end if
42 if (ninfo .gt. 0) then
43 C ... Wrapper to get info record the right length
44 call exginw(ndb, c(kinfo), ierr)
45 if (ierr .ne. 0) go to 190
46 end if
47
48 RETURN
49
50 160 CONTINUE
51 WRITE (ERRMSG, 10000, IOSTAT=IDUM) 'Memory Allocation'
52 GOTO 210
53 180 CONTINUE
54 WRITE (ERRMSG, 10000, IOSTAT=IDUM) 'QA RECORDS'
55 GOTO 210
56 190 CONTINUE
57 WRITE (ERRMSG, 10000, IOSTAT=IDUM) 'INFORMATION RECORDS'
58 GOTO 210
59 210 CONTINUE
60 CALL WDBERR (IERR, ERRMSG)
61
62 RETURN
63
64 10000 FORMAT (A)
65 END
66
67 subroutine exgqaw(ndb, qarec, ierr)
68 include 'exodusII.inc'
69 character*(mxstln) qarec(4, *)
70 call exgqa(ndb, qarec, ierr)
71 return
72 end
73
74 subroutine exginw(ndb, info, ierr)
75 include 'exodusII.inc'
76 character*(mxlnln) info(*)
77 call exginf(ndb, info, ierr)
78 return
79 end