integer I,I1,I2,I3,NROWS,RBIN,VRBIN,VPHIBIN
real VR,VPHI,RR,NUMBER
REAL DISTRIB (11,11,11)
OPEN(1000,FILE='bin0d3new.DAT',STATUS = 'OLD')
OPEN(1001,FILE='DISTRIB.DAT')
NROWS = 121
DO 20 I = 1, NROWS
READ (1000, '(4g14.6)' ) VR, VPHI, RR, NUMBER
VRBIN = INT (VR/0.3) + 6
IF (VRBIN < 1) THEN
VRBIN = 1
ELSE IF (VRBIN > 11) THEN
VRBIN = 11
END IF
VPHIBIN = INT (VPHI/0.3) + 6
IF (VPHIBIN < 1) THEN
VRBIN = 1
ELSE IF (VPHIBIN > 11) THEN
VRBIN = 11
END IF
RBIN = INT (RR/0.8) + 1
IF (RBIN < 1) THEN
RBIN = 1
ELSE IF (RBIN > 11) THEN
RBIN = 11
END IF
DO 10 I1 = 1, 11
DO 10 I2 = 1, 11
DO 10 I3 = 1, 11
DISTRIB (I1,I2,I3) = 0
DISTRIB (RBIN, VRBIN, VPHIBIN) = DISTRIB (RBIN, VRBIN, VPHIBIN) +
$NUMBER
write ( 1001, '(3g14.6)' ) DISTRIB (RBIN, VRBIN, VPHIBIN)
10 CONTINUE
20 CONTINUE
end
real VR,VPHI,RR,NUMBER
REAL DISTRIB (11,11,11)
OPEN(1000,FILE='bin0d3new.DAT',STATUS = 'OLD')
OPEN(1001,FILE='DISTRIB.DAT')
NROWS = 121
DO 20 I = 1, NROWS
READ (1000, '(4g14.6)' ) VR, VPHI, RR, NUMBER
VRBIN = INT (VR/0.3) + 6
IF (VRBIN < 1) THEN
VRBIN = 1
ELSE IF (VRBIN > 11) THEN
VRBIN = 11
END IF
VPHIBIN = INT (VPHI/0.3) + 6
IF (VPHIBIN < 1) THEN
VRBIN = 1
ELSE IF (VPHIBIN > 11) THEN
VRBIN = 11
END IF
RBIN = INT (RR/0.8) + 1
IF (RBIN < 1) THEN
RBIN = 1
ELSE IF (RBIN > 11) THEN
RBIN = 11
END IF
DO 10 I1 = 1, 11
DO 10 I2 = 1, 11
DO 10 I3 = 1, 11
DISTRIB (I1,I2,I3) = 0
DISTRIB (RBIN, VRBIN, VPHIBIN) = DISTRIB (RBIN, VRBIN, VPHIBIN) +
$NUMBER
write ( 1001, '(3g14.6)' ) DISTRIB (RBIN, VRBIN, VPHIBIN)
10 CONTINUE
20 CONTINUE
end