isee 321 



1590 



uee 35 



161B 



1620 



16319 



U4I3 



1650 



1660 



1670 



1680 



1690 



1700 



1710 



1720 



1730 



1740 



1750 



1760 



1770 



1780 



1790 



1800 70 



1810 



1820 



1830 



1840 



1B50 



1860 



1870 



1880 104 



1890 



1900 



1910 114 



1920 



1930 



1940 124 



1950 



1960 



1970 5 



1980 



1990 



2000 



2010 



2020 



2030 



2040 



2050 



2060 



2080 



2090 



2100 



2110 



2120 



2130 



2140 



2150 



2160 



2170 



2180 



2190 



2200 



2210 



2220 



2230 



2240 



2260 10 



2270 11 



2280 



2290 



2300 



FORMAT(///, IX, "ANOTHER RUN (Y/N)?") 



READ(5,35) L 



FORIIAT(Al) 



IF(L .EQ. 'Y') GO TO 1 



IF(L .NE. 'N') 60 TO 31 



STOP 



END 



SUBROUTINE EXPCT (Tl , T2 , BL , BU, SUM, D2) 



COMMON EPSI.PHI ,A1,B1,A2,B2, ID, LAMBDA 



DOUBLE PRECISION BL,BU 



REAL LAMBDA 



FDl (X)=-(ALOG(-ALOG(X) )»PHI)+EPSI 



FD2(X)=((-AL0G(1-X))»»(1/A1) )»B1 



FD3(X)=B2/((-AL0G(X))«»(l/A2)) 



PDFl (X)=EXP(-EXP(-(X-EPSI)/PHI) )»EXP(-(X-EPSI) /PHI) /PHI 



PDF2(X)=Alt(X»«(Al-l))*EXP(-(X/Bl)**Al)/(Bl»»Al) 



PDF3(X)=A2»(B2»»A2)*EXP(-(B2/X)»»A2)/(X*»(A2+1)) 



CDFl (X>=EXP(-EXP( (EPSI-X)/PHI) ) 



CDF2(X)=1.0-EXP(-(X/B1)»»A1) 



CDF3(X)=EXP(-(B2/X)«*A2) 



G(X)=T1»EXP(T2»(X-1) ) 



PRINT, 'SELECT A DISTRIBUTION...' '''''' 



PRINT, 'EXTREMAL TYPE I. . . 1 ' 



PRINT, 'WEIBULL 2' 



PRINT, 'LOG-EXTREMAL 3' 



PRINT, 'SELECT 1 , 2, OR 3' 

 READ, ID 



IFMD .LT. 1 .OR. ID .GT. 3) GO TO 70 

 IF(ID .EQ. 1) WRITE(6, 104) 



FORMAT!/, IX, "INPUT EXTREMAL TYPE I EPSILON, AND PHI ") 

 IF(ID .EQ. 1) READ, EPSI, PHI 

 IF( ID .EQ. 2) WRITE(6, 114) 



FORMAT(/, IX, "INPUT WEIBULL ALPHA AND BETA") 

 IF( ID .EQ. 2) READ,A1,B1 

 IF( ID .EQ. 3) WRITE(6,124) 



FORMAT!/, IX, "INPUT LOG-EXTREMAL ALPHA AND BETA") 

 IF( ID .EQ. 3) READ,A2,B2 

 WRITE(6,5) 



FORMAT!/, IX, "INPUT AVERAGE NUMBER OF EXTREMAL EVENTS PER YEAR, 

 t, /,1X,"THE POISSON LAMBDA' PARAMETER") 

 READ, LAMBDA 



0000001) 



0000001) 



0000001) 



IF(ID .EQ. 

 IFIID 

 IF(ID 

 SUM = 

 D=BU-BL 

 IF( D .LE 

 K = -l 

 DO 10 

 K = -K 

 IF( K 

 IF( K 

 IF( I 



1) 



BU=FD1 (1-. 

 EQ. 2) BU=FD2(1-. 

 EQ. 3) BU=FD3(1-. 



)) GO TO 11 



1=1 , 101 



C = 4 

 )C = 2 

 .OR. 



.LT 

 .GT 

 .EQ 



ADD=FL0AT(I-1)«D/1 

 XV=BL+ADD 

 IF(ID .EQ. 1 

 EQ. 2 

 EQ. 3 



I .EQ. 101)C=-1 



IF(ID 

 IFIID 



, AND 

 • AND 

 .AND 



IF( ID .EQ. 1 

 IF( ID .EQ. 2 

 IF( ID 



.EQ. 3 

 FAC2=G(XV/BL)/100.0 

 IF( FAC2 .LT. ) FAC2=0 

 IF( FAC2 .ST. 1 ) FAC2=1 

 SUM=SUM+C»FAC1»FAC2 

 CONTINUE 



SUM=SUM/300.0»D»LAMBDft 

 D2=SUM»10a.B 

 RETURN 

 END 



EXP(-(XV-EPSI)/PHI) .GT. 82.0) GO TO IE 

 ( (XV/Bl)»tAl) .GT. 82.0) GO TO 10 

 (-(B2/XV)»#A2) .GT. 82.0) GO TO 10 



) FAC1=PDF1 (XV) 



) FAC1=PDF2(XV) 



) FAC1=PDF3(XV) 



D8. 



