KKNT=KKNT+1 



C=(L-1)*.02 



B=ENERGY(L)*(1./AVENER) 



IF(L.EQ.(NTWICE+l)+(NFIT/2).AND.IPL0T.EQ.l) CALL PL0T(C,B,3) 



IF(IPLOT.EQ.l) CALL PL0T(C,B,2) 



IF(KKNT.LE.INWID2) GO TO 8781 



IF(L.GE.(XT-((NTWICE+NFIT/2+l)+INWI02))) GO TO 8781 



PREAV=0.0 



POSTAV=0,0 



DO 8771 KNB=INWID1,INWID2 



PREAV=PREAV+(ENERGY(L-KNB)/ENWID) 

 8771 POSTAV=POSTAV+(ENERGY(L+KNB)/ENWID) 



IF(ABS(POSTAV-PREAV).LT.ENWIN) GO TO 8781 



CALL SYMB0L(C,2., .2,16,180.0,-1) 



CALL PL0T(C,B,3) 

 8781 CONTINUE 



DO 879 I=(NTWICE+l)+(NFIT/2),JCT-((NTWICE+l)+(NFIT/2)) 



RMSSLP=RMSSLP+ABS((TZ(I,11)-AVSLP)**2)/(JCT-(4*NUMFIL+(NFIT-1))) 

 879 RMSENG=RMSENG+ABS( (ENERGY ( I )-AVENER)**2)/( JCT-(4*NUMFIL+(NFIT-1) ) ) 



RMSSLP=SQRT(RMSSLP) 



RMSENG=SQRT(RMSENG) 

 C WRITE(6,'(4(F8.3,2X))') AVSLP,RMSSLP,AVENER,RMSENG 



IST=(NTWICE+l)+(NFIT/2+l) 



IEND=JCT-(IST-1) 

 333 CONTINUE 

 C PICK PROVINCE BOUNDARIES, STORE PROVINCE NUMBER FOR EACH POINT IN X 



DO 34 I=IST,IEND 



X(I)=IFIX(SQRT(ENERGY(I))/PDEL)+1 

 34 CONTINUE 

 C OUTPUT POSITIONS Or- PROVINCE BOUNDARIES 

 C WRITE (06, 60) CUT 



C 60 FORMAT (' PROV.NO TYPE 1ST LAT LONG LAST LAT LONG 

 C 1 RMS-FILTERED CUT=',F7.5) 



IPNUM=X(IST) 



SUM=0.0 



JST=IST 



KST=1 



DO 35 I=IST,IEND 



JPNUM=X(I) 



SUM=SUM+X(I) 



IC=I-JST 



IF(JPNUM.EQ.IPNUM.AND.I.LT.IEND) GO TO 35 

 C IF((IC+1).LT.MIN) GO TO 35 



JJ=I 

 C COMPUTE AVERAGE PROVINCE NO. 



AC=IC+1 



AVE=SUM/AC 



IAVE=AVE 



BAVE=IAVE 



AVE=AVE-BAVE 



IF(AV£.GE.0.5) IAVE=IAVE+1 



IPNUM=IAVE 



155 



