-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHYPLOT.FOR
187 lines (186 loc) · 5.82 KB
/
HYPLOT.FOR
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
C ./ i 0
$STORAGE:2
SUBROUTINE HYPLOT (*)
C
C HYPOXIA ANALYSIS STUDY PLOT ROUTINE 6/20/80 (1-SEP-81)
C GARY KESSLER KUMQUAT VERSION 2.10
C MODIFIED FROM XEROX SIGMA 6 (UVM) FOR STANDARD FORTRAN AND
C IBM SYSTEM/34 (SMC). SOME MODS TO CODE TO CONVERT FROM
C OUTPUT DESIGNED FOR CALCOMP PLOTTER TO PROVIDE LP OUTPUT.
C MODIFIED FOR IBM PC 6-8-85 BY DAVE WORMUTH: CHANGES IN COMMON
C VARIABLES AND OUTPUT OF UNITS - NOW A SUBROUTINE OF MAIN PROGRAM
C
C MODS 9/1/81 FOR PDP-11/44
C
IMPLICIT INTEGER (F-R)
CHARACTER*1 CHAR(15), PAD(70,56), YLBL(56), BLANK
INTEGER CRTI,CRTO,FPLOT,FORM
CHARACTER*4 NAME
CHARACTER*6 UNITS
CHARACTER*8 LABEL
CHARACTER*8 PLBL1(2), PLBL2(2), LABV, UNITV
DIMENSION XSCL(8), YSCL(8), ZSCL(15), NAME(7), VAL(2)
EQUIVALENCE (LABV,YLBL(20)), (UNITV,YLBL(29))
COMMON /PHRED1/ LABEL(75)
COMMON /PHRANK/ UNITS(75)
COMMON /LIMITS/ YLO(75), YHI(75)
C
DATA CHAR /'1','2','3','4','5','6','7','8','9',
A 'A','B','C','D','E','F'/
DATA BLANK,YLBL /57*' '/
DATA CRTI,CRTO,FORM,FPLOT,IPRN /0,0,50,12,99/
DATA PAD /3920*' '/
C
F (XY,XYMIN,DXY) = IFIX ((XY - XYMIN) / DXY + 0.5)
C
107 FORMAT (I3,2F10.2)
117 FORMAT (3F10.2)
127 FORMAT (/' Y-axis Parameter #',I3,' has no established',
A ' min/max values.'///' *** Plot Action Cancelled ***')
137 FORMAT (I6 / 7A4)
147 FORMAT (/)
207 FORMAT (/' Set-Up Complete')
217 FORMAT (' Curve',I3)
227 FORMAT (/' Scaling: 0 = Standard, 1 = Data')
307 FORMAT (/1X,7A4,35X,'Study No.',I8//)
317 FORMAT (1X,2(A,F8.1,1X,A,27X))
327 FORMAT (// 89X,'Z =',2A9 //)
337 FORMAT (1X,A1,10X,'I',71A1,5X,'Curve ',A1,' =',F12.2)
347 FORMAT (1X,A1,F9.2,' +',71A1,5X,'Curve ',A1,' =',F12.2)
357 FORMAT (F11.2,' +',7('---------+') / F15.2,3F20.2 / 5X,4F20.2 //
A 25X,2A9)
C
REWIND FPLOT
READ (FPLOT,137,END=9900) ISTUDY,NAME
WRITE (FORM,307) NAME,ISTUDY
WRITE (IPRN,307) NAME,ISTUDY
K2 = 0
J = 1
C
C SET-UP LABELS & TITLES
C
50 READ (FPLOT,107) PARA,VAL(J)
IF (PARA .EQ. -99) GO TO 100
PLBL1 (J) = LABEL (PARA)
PLBL2 (J) = UNITS (PARA)
J = J + 1
K2 = K2 + 1
IF (K2/2*2 .NE. K2) GO TO 50
WRITE (FORM,317) (PLBL1(J),VAL(J),PLBL2(J), J=1,2)
WRITE (IPRN,317) (PLBL1(J),VAL(J),PLBL2(J), J=1,2)
J = 1
GO TO 50
C
C SET-UP SCALES
C
100 IF (K2/2*2 .NE. K2) WRITE (FORM,317) PLBL1(1),VAL(1),PLBL2(1)
IF (K2/2*2 .NE. K2) WRITE (IPRN,317) PLBL1(1),VAL(1),PLBL2(1)
READ (FPLOT,107) PARAX,XMIN,XMAX
XSCL (8) = XMAX
XSCL (1) = XMIN
XDEL = (XMAX - XMIN) / 7
DO 120 J = 2,7
XSCL (J) = XSCL (J-1) + XDEL
120 CONTINUE
C
C FOR CONSISTENCY, ALL Y-AXES USE THE SAME MAX/MIN FOR A GIVEN
C PARAMETER. SET THAT UP HERE, ENSURING THAT THE MAX/MIN EXISTS.
C
READ (FPLOT,107) PARAY
YMIN = YLO (PARAY)
IF (YMIN .EQ. 999.0) GO TO 600
YMAX = YHI (PARAY)
LABV = LABEL (PARAY)
UNITV = UNITS (PARAY)
READ (FPLOT,107) PARAZ
WRITE (FORM,327) LABEL(PARAZ),UNITS(PARAZ)
WRITE (IPRN,327) LABEL(PARAZ),UNITS(PARAZ)
C
C ASK USER IF WE ARE TO USE STANDARD SCALING (FROM ABOVE) OR
C DATA-BASED SCALING. IF Y SCALE BASED UPON Y DATA, FIND MAX/
C MIN Y VALUES, THEN REWIND AND RE-LOCATE FILE.
C
WRITE (CRTO,227)
READ (CRTI,*) IOPT
IF (IOPT .NE. 1) GO TO 170
YMIN = 9999.0
YMAX = -9999.0
C
140 READ (FPLOT,117,END=150) X,Z,Y
IF (Y .GT. YMAX) YMAX = Y
IF (Y .LT. YMIN) YMIN = Y
GO TO 140
C
150 YMIN = FLOAT (IFIX (YMIN) / 5 * 5)
YMAX = FLOAT ((IFIX (YMAX) + 5) / 5 * 5)
REWIND FPLOT
K2 = K2 + 5
DO 160 J = 1,K2
READ (FPLOT,147)
160 CONTINUE
C
C SET UP X,Y SCALING FACTORS FOR PLOT
C
170 DX = (XMAX - XMIN) / 70.0
DY = (YMAX - YMIN) / 56.0
YSCL (1) = YMAX
YSCL (8) = YMIN
YDEL = (YMAX - YMIN) / 7
DO 180 J = 2,7
YSCL (J) = YSCL (J-1) - YDEL
180 CONTINUE
WRITE (CRTO,207)
K2 = 0
ZOLD = -9999.0
C
C PLACE DATA IN OUTPUT ARRAY, 'PAD'
C
200 READ (FPLOT,117,END=250) X,Z,Y
IF (Z .EQ. ZOLD) GO TO 210
K2 = K2 + 1
ZSCL (K2) = Z
ZOLD = Z
WRITE (CRTO,217) K2
C
210 IF (Y .EQ. -1.0) GO TO 200
FX = F (X,XMIN,DX)
FY = 57 - F (Y,YMIN,DY)
IF (FX .GE. 1 .AND. FX .LE. 70 .AND.
A FY .GE. 1 .AND. FY .LE. 56) PAD (FX,FY) = CHAR (K2)
GO TO 200
C
C OUTPUT
C
250 DO 500 J = 1,56
IF ((J-1)/8*8 .EQ. (J-1)) GO TO 400
IF (J .LE. K2) WRITE (FORM,337) YLBL(J), (PAD(I,J), I=1,70),
A BLANK, CHAR(J), ZSCL(J)
IF (J .LE. K2) WRITE (IPRN,337) YLBL(J), (PAD(I,J), I=1,70),
A BLANK, CHAR(J), ZSCL(J)
IF (J .GT. K2) WRITE (FORM,337) YLBL(J), (PAD(I,J), I=1,70)
IF (J .GT. K2) WRITE (IPRN,337) YLBL(J), (PAD(I,J), I=1,70)
GO TO 500
C
400 K = (J - 1) / 8 + 1
IF (J .LE. K2) WRITE (FORM,347) YLBL(J), YSCL(K), (PAD(I,J),
A I=1,70), BLANK, CHAR(J), ZSCL(J)
IF (J .LE. K2) WRITE (IPRN,347) YLBL(J), YSCL(K), (PAD(I,J),
A I=1,70), BLANK, CHAR(J), ZSCL(J)
IF (J .GT. K2) WRITE (FORM,347) YLBL(J), YSCL(K), (PAD(I,J),
A I=1,70)
IF (J .GT. K2) WRITE (IPRN,347) YLBL(J), YSCL(K), (PAD(I,J),
A I=1,70)
500 CONTINUE
WRITE (FORM,357) YSCL(8), (XSCL(J), J=1,7,2),(XSCL(J), J=2,8,2),
A LABEL(PARAX), UNITS(PARAX)
WRITE (IPRN,357) YSCL(8), (XSCL(J), J=1,7,2),(XSCL(J), J=2,8,2),
A LABEL(PARAX), UNITS(PARAX)
GO TO 9900
C
C ERROR
C
600 WRITE (CRTO,127) PARA
C
9900 RETURN 1
END