Debian Codegraph @

packages/seacas/applications/blot/sptrnd.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 SPTRND (A, MXSTEP, TYP, NWRDS, NVAR, DATA)
9 C=======================================================================
10
11 C --*** SPTRND *** (SPLOT) Transfer variables to random file
12 C -- Written by Amy Gilkey - revised 02/02/88
13 C --
14 C --SPTRND transfers needed variables from the sequential database to the
15 C --random file (using GETVAR).
16 C --
17 C --Parameters:
18 C -- A - IN - the dynamic memory base array
19 C -- MXSTEP - IN - the maximum time step number needed
20 C -- TYP - IN - the variable type ("N"odal or "E"lement)
21 C -- NWRDS - IN - the number of words in a data record
22 C -- NVAR - IN - the number of records to read
23 C -- DATA - SCRATCH - size = NWRDS
24 C --
25 C --Common Variables:
26 C -- Uses NSPVAR, ISVID of /SPVARS/
27
28 include 'params.blk'
29 include 'spvars.blk'
30
31 DIMENSION A(*)
32 CHARACTER TYP
33 REAL DATA(NWRDS)
34
35 LOGICAL NEED
36
37 CALL DBVIX_BL (TYP, 1, ISID)
38 CALL DBVIX_BL (TYP, NVAR, IEID)
39
40 DO 100 ID = ISID, IEID
41
42 C --Determine if variable is needed
43
44 NEED = (LOCINT (ID, NSPVAR, ISVID) .GT. 0)
45
46 C --If so, transfer variable to random file
47
48 IF (NEED) THEN
49 CALL GETVAR (A, ID, -1, -MXSTEP, NWRDS, DATA)
50 END IF
51 100 CONTINUE
52
53 RETURN
54 END