Debian Codegraph @

packages/seacas/applications/blot/scahis.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 SCAHIS (A, VAR, WHOTIM,
9 & VALMIN, ISTMIN, VALMAX, ISTMAX)
10 C=======================================================================
11
12 C --*** SCAHIS *** (BLOT) Scale all history variables
13 C -- Written by Amy Gilkey - revised 04/01/88
14 C --
15 C --SCAHIS reads the values for the history variables from the database
16 C --and finds the minimum and maximum values.
17 C --
18 C --Parameters:
19 C -- A - IN - the dynamic memory base array
20 C -- VAR - SCRATCH - the variable array
21 C -- WHOTIM - IN - true iff time step is a whole (versus history) time step
22 C -- VALMIN, VALMAX - OUT - the minimum and maximum value for each variable
23 C -- ISTMIN, ISTMAX - OUT - the step number of the minimum and maximum
24 C -- value for each variable
25 C --
26 C --Common Variables:
27 C -- Uses NVARHI, NSTEPS of /DBNUMS/
28
29 include 'dbnums.blk'
30
31 DIMENSION A(*)
32 REAL VAR(NVARHI)
33 LOGICAL WHOTIM(*)
34 REAL VALMIN(NVARHI), VALMAX(NVARHI)
35 INTEGER ISTMIN(NVARHI), ISTMAX(NVARHI)
36
37 CALL DBVIX_BL ('H', 1, IVAR)
38
39 DO 110 ISTEP = 1, NSTEPS
40
41 C --Read the variables
42
43 CALL GETVAR (A, IVAR, -999, ISTEP, NVARHI, VAR)
44
45 C --Find minimum and maximum variable values for each variable
46
47 DO 100 IXVAR = 1, NVARHI
48
49 IF (ISTEP .EQ. 1) THEN
50 VALMIN(IXVAR) = VAR(IXVAR)
51 ISTMIN(IXVAR) = ISTEP
52 VALMAX(IXVAR) = VAR(IXVAR)
53 ISTMAX(IXVAR) = ISTEP
54 ELSE IF (VALMIN(IXVAR) .GT. VAR(IXVAR)) THEN
55 VALMIN(IXVAR) = VAR(IXVAR)
56 ISTMIN(IXVAR) = ISTEP
57 ELSE IF (VALMAX(IXVAR) .LT. VAR(IXVAR)) THEN
58 VALMAX(IXVAR) = VAR(IXVAR)
59 ISTMAX(IXVAR) = ISTEP
60 END IF
61
62 100 CONTINUE
63 110 CONTINUE
64
65 RETURN
66 END