DIMENSION KO(20),CBI(20),CBP(20),AI(20),BI(20), *DI(20),AP(20),BP(20),DP(20) DIMENSION CPI(20,20),SI(20),CI(20),CP(20),SP(20) DIMENSION SIMAX(20),SPMAX(20),SIB(20),SPB(20) COMMON /ARX/AIM(20,90),APM(20,90),CBIM(20,12),CBPM(20,12), *CIM(20,12),CPM(19,12),C12,R1 DIMENSION T1(90),NOM(20) INTEGER GODP,MECP character stat1*3, f_name*4,INGR*6,II(20)*1 ? REAL M1(20),M2(20),M3(20),M4(19) INTEGER D1 INTEGER CPR,CN DIMENSION S3(2000) ? INTEGER D3(2000) COMMON/UR/CBI,CBP,INGR(80),POST1,POST2 COMMON/URN/AI,AP,A DIMENSION CBIG(20),CBPG(20),CIMG(20),CPMG(19),AIG(20),BIG(20), *DIG(20),APG(20),BPG(20),DPG(20),CIMAX(20),CPMAX(19),DEI(20), *DEP(20) INTEGER Q(20,20),PDK(20) INTEGER QM(20) INTEGER SICP(20),SPCP(20),SCP INTEGER SUM INTEGER P,C,P1 INTEGER PH(20),GOD,MEC,DATA,CPOK COMMON GOD, MECP, godp, gorod, bt(20) character gorod*12 ! название города в родительном падеже INTEGER SCCP, kon(20,20) logical log1 character*17 POST1(20),POST2(20) * --------------------------- data k8,k9/0,0/ * open system file 5 and 6 open(5, file='inpvx.zag') open(6, file='output.zag') * DEFINE FILE 1(1,7200,E,II) READ(5,27)I,P,C,L4,L6 READ(5,301)GOROD ? DO 303 L=1,4 ? READ(5,300)(INGR(K),II(K),K=(L-1)*I+1,L*I) ? 303 CONTINUE DO 304 M=1,P ? write(*,*)'1' READ(5,302)POST1(M),PH(M) ? 304 READ(5,305)POST2(M) ? READ(5,100)CB,CB1,A,B,D,R,R1,C7,C8,C9,C10,C11,C12,C13 READ(5,101)(CBI(K),K=1,I) READ(5,101)(CBP(M),M=1,P) READ(5,101)(AI(K),K=1,I) READ(5,101)(BI(K),K=1,I) write(*,*)'2' READ(5,125)(DI(K),K=1,I) READ(5,101)(AP(M),M=1,P) READ(5,101)(BP(M),M=1,P) READ(5,101)(DP(M),M=1,P) READ(5,102)(PDK(K),K=1,I) read(5,202)(bt(k), k = 1, i) READ(5,104)(QM(K),K=1,I) READ(5,103)(KO(K),K=1,I) READ(5,103)SUM cpi(1,1)=9.99 si(1)=9.99 sp(1)=9.99 sicp(1)=90 sicp(2)=9 sicp(3)=99 s=9.99 scp=9 spcp(1)=9 spcp(2)=99 spcp(3)=90 write(*,*)'3' DO J1 =1,3 WRITE(*,*) CHAR(7) END DO WRITE(*,*) CHAR(7) call PECPOK(s1,i,k,m,p,s,mec,sc,data,scp,sccp,cpok, & c2,c5,c6,c9,cpi,ph,q,si,sicp,sp,spcp) 202 format(20f6.5) 300 FORMAT (20(A6,A1)) ? 301 FORMAT (A12) ? 302 FORMAT (A17,I4) ? 305 FORMAT (A17) ? 27 FORMAT (2I3,I5,I3,I5) ? 100 FORMAT(7F3.2,7F3.1) 101 FORMAT(20F3.2) 102 FORMAT(20I3) 103 FORMAT(20I1) 104 FORMAT(20I4) 125 FORMAT(20F4.2) 120 FORMAT(I4,I2,I2,I2) write(*,*)'4' END *********************************************************************** * Программа печати оперативных данных * *********************************************************************** subroutine PECPOK(s1,i,k,m,p,s,mec,sc,data,scp,sccp,cpok, & c2,c5,c6,c9,cpi,ph,q,si,sicp,sp,spcp) DIMENSION CPI(20,20),SI(20),CI(20),CP(20),SP(20) COMMON /ARX/AIM(20,90),APM(20,90),CBIM(20,12),CBPM(20,12), *CIM(20,12),CPM(19,12),C12,R1 INTEGER MECP COMMON/UR/CBI(20),CBP(20),INGR(80),POST1,POST2 COMMON/URN/AI(20),AP(20),A INTEGER Q(20,20) INTEGER SICP(20),SPCP(20),SCP INTEGER P INTEGER PH(20),GOD,MEC, *DATA,CPOK character INGR*6,GOROD*12 ? COMMON GOD, MECP, godp, gorod, bt(20) INTEGER SCCP character*17 POST1(20),POST2(20) character*136 string character*6 srf1 character*7 ZVEZD(20),CHERT(20),PROB(20),PROBI(20) ******************** конец данных ************ DO 1 K=1,I ZVEZD(K)='*******' CHERT(K)='-------' PROB(K)= ' ' 1 PROBI(K)=' I' * IF(C9.NE.1.) GO TO 41 ? WRITE(6,52)(ZVEZD(K),K=6,I) WRITE(6,5201)(PROB(K),K=7,I) WRITE(6,51)GOROD,DATA,MEC,GOD,CPOK,(PROB(K),K=7,I) WRITE(6,5201)(PROB(K),K=7,I) write(6,52)(ZVEZD(K),K=6,I) write(6,5253)(PROB(K),K=7,I) WRITE(*,*)'7' write(6,53)(PROB(K),K=8,I) write(6,5353)(CHERT(K),K=8,I) WRITE(*,*)'71' write(6,54)(INGR(K),K=1,I) ? write(6,5454)(INGR(K),K=I+1,I*2) ? write(6,56)(INGR(K),K=I*2+1,I*3) ? write(6,5656)(INGR(K),K=I*3+1,I*4) ? WRITE(6,52)(ZVEZD(K),K=6,I) DO 60 M=1,P WRITE(*,*)'72' WRITE(string,57)POST1(M),PH(M),(CPI(M,K),K=1,I),SP(M), * SPCP(M) DO 4 K=1,I IF(CPI(M,K).NE.9.99) GO TO 4 LN=26+(K-1)*7 LK=30+(K-1)*7 STRING(LN:LK)=' - ' 4 CONTINUE IF(SP(M).NE.9.99) GO TO 5 LN=26+I*7 LK=30+I*7 STRING(LN:LK)=' - ' 5 CONTINUE LN=26+(I+1)*7 LK=30+(I+1)*7 SELECT CASE(SPCP(M)) CASE(99) STRING(LN:LK)=' н.ср.' CASE(9) STRING(LN:LK)=' в.ср.' CASE(90) STRING(LN:LK)=' - ' END SELECT write(6,10000) string write(6,9954) POST2(M),(PROBI(K),K=1,I+1) 60 CONTINUE write(*,*)'74' WRITE(6,52)(ZVEZD(K),K=6,I) WRITE(string,58) (SI(K),K=1,I) DO 6 K=1,I IF(SI(K).NE.9.99) GO TO 6 LN=26+(K-1)*7 LK=30+(K-1)*7 STRING(LN:LK)=' - ' 6 CONTINUE WRITE(*,*)'75' WRITE(6,10000) string WRITE(6,52)(ZVEZD(K),K=6,I) WRITE(STRING,59) (SICP(K),K=1,I) do k = 1,i i prizn = 0 LN = 26+(K-1)*7 LK = 30+(K-1)*7 if(sicp(k) .eq.9) then srf1 = ' в.ср.' i prizn = 1 end if if(sicp(k) .eq.99) then srf1 = ' н.ср.' i prizn = 1 end if if(sicp(k) .eq.90) then srf1 = ' - ' i prizn = 1 end if if ( i prizn .eq. 1 ) then string(LN:LK)=SRF1 END IF end do WRITE(*,*)'76' write(6,10000) string WRITE(6,52)(ZVEZD(K),K=6,I) WRITE(6,61)S,(PROB(K),K=8,I) WRITE(6,6100)(PROB(K),K=8,I) WRITE(6,62)S1,(PROB(K),K=8,I) WRITE(6,6200)(PROB(K),K=8,I) WRITE(*,*)'8' write(srf1,6363) scp 6363 format(i6) if(scp .eq.9) srf1 = ' в.ср.' if(scp .eq.99) srf1 =' н.ср.' if(scp .eq.90) srf1 =' - ' WRITE(*,*)'81' WRITE(6,63)Srf1,(PROB(K),K=8,I) WRITE(6,6300)(PROB(K),K=8,I) WRITE(6,6301)(PROB(K),K=8,I) WRITE(*,*)'82' IF(C6.EQ.1.) WRITE(6,110)C5, (PROB(K),K=8,I) WRITE(6,52)(ZVEZD(K),K=6,I) IF(C2.GT.0.0) GO TO 41 write(srf1,6363) sccp if(sccp .eq.9) srf1 = ' в.ср.' if(sccp .eq.99) srf1 =' н.ср.' if(sccp .eq.90) srf1 =' - ' WRITE(6,31) WRITE(6,32)SC,Srf1 WRITE(*,*)'83' WRITE(6,52)(ZVEZD(K),K=6,I) 41 CONTINUE 5757 format(a16) 31 FORMAT(' ',' Cредние за прошедшие 3 срока'/) 51 FORMAT(t2,'*',22X,'Загрязнение гор.',A12,3X,I2,'.',I2,'.',I4, *' г.',1X,'на ',I2,' час.',2A7,' *') 14 52 FORMAT(' ',73('*'),3A7) 15 5201 FORMAT(t2,'*'73(' '),2A7,' *') 14 5253 format(' ','*',t20,'I',' НомI',41X,2A7,'I Пока-I Уро- *') 13 53 FORMAT(' ','*',t20,'I п I',1A7,' Нормированные на ПДК концентр' 14 *,'ации,Cpi=Qpi/ПДКi',t81,'IзательI вень *') 5353 format(' ', '* А д р е с',t20,'I o I',48('-'),1A7,'I загр.I', 13 * ' загр.*') 54 FORMAT(' ','*',t20,'I с I',8(A6,'I'),' на I на *') 20 ? 9954 FORMAT(' ','*',A17,'I I',9A7,'I *') 20 5454 format(' ','*',t20,'I т I',8(A6,'I'),'пунктеIпункте*') 20 55 FORMAT(' ','*',6X,' Aдрес I / I',85X,'*') 56 FORMAT(' ','*',17X,'I o I',8(A6,'I'),' Sp I Spcp *') 20 5656 format(' ','*',t20,'I в I',8(A6,'I'),' I *') 20 57 FORMAT(' ','*',A17,'I',I3,1X,9('I',F5.2,1X),'I ', * I2,2X,'*') 58 FORMAT(' ','* ','Пок.загр.гор.ингр. Si',8('I',F5.2,1X), * 'I',13(' '),'*') 59 FORMAT(' ','* Ур.загр.гор.инград I',8(2X,I2, 20 *2X,'I'),13(' '),'*') 61 FORMAT(' ','* B целом по городу S=',F5.2,22x,1A7,'Обозначения:' *,24X,'*') 6100 FORMAT(t2,'*',47X,1A7,' S < 1 - загр. ниже среднего(н.ср.)*') 13 62 FORMAT(' ','* Показатель загрязнения с учетом суммации S1=',F5.2 * ,1A7,'S = 1 - равно среднему за год *') 13 6200 format(t2,'*',47X,1A7,'1 < S < A - загр. выше среднего(в.ср)', * ' *') 63 FORMAT(t2,'*',' Уровень загрязнения города= ',a6, *11X,1A7,'A < S < B - 1 уровень',17(' '),'*') 13 6300 format(t2,'*',47X,1A7,'B < S < D - 2 уровень',17(' '),'*') 13 6301 format(t2,'*',47X,1A7,' S > D - 3 уровень',17(' '),'*') 13 32 FORMAT(' ','Загрязнение города S=', F5.2,' Уровень загрязнения го *рода=',a1) 110 FORMAT(' ','* Bыделяющаяся концентрация в ',F6.1,' ПДК',44X, *1A7,'*') 13 10000 format(a136) return end