1580 DT=0 



1590 DB=a 



1600 DO 20 K=2,N 



1610 YSUM=YSUM+YH(K) 



1620 DT=DT+Y(K)*(X(K)-X(1)) 



1630 20 DB=DB+(X(K)-X(1))»*2 



1640 V1=X(1) 



1650 V2=DT/DB 



1660C CALCULATE CORRELATION COEFFICIENT (R»»2) 



1670 YAV6=YSUM/N 



1680 ST=0 



1690 SB=0 



1700 DO 70 1 = 1, N 



1710 Z1(I)=G(X(I)) 



1720 Dl (1)=(YH(I)-Z1 (I) )*«2 



1730 D2=(YH(I)-YAV6)*»2 



1740 ST=ST+D1(I) 



1750 70 SB=SB+D2 



1760 IF( (1-ST/SB) .LT. 0) C0RR=1-ST/SB 



1770 IF( (1-ST/SB) .LT. 0) GO TO 157 



1780 CORR=SQRT(1.0-ST/SB) 



1790C PRINT OUT PARAMETERS AND OTHER DATA 



1800 157 WRITE(6,80) 



1810 80 F0RMAT(//,1X,"DATA ON EXPONENTIAL CURVE. ..",/, 1 X , 



1820 !< "CURVE HAS FORM: *L (Hs ) =$Lmax ♦{ 1-exp [ A* (Hs-HLo) ] } " ) 



1830 WRITE(6,82) W,V1,V2 



1840 82 FORMAT(lX,"$Lmax=",F14.7,/,lX,"HLo=",3X,F10.4,/,lX,"A=",4X,F14.7 



1850 ii ,/, IX, "«L(Hs)=",4X, "LOSSES",/, IX, "Hs = ",8X, "SIGNIFICANT WAVE HEIGHT") 



1860 WRITE(6,84) CORR 



1870 84 FORMATdX, "NON-LINEAR CORRELATION IS",3X,F9.7) 



1880 WRITE(6,86) ST 



1890 86 FORMATdX, "SUM SQR RESIDUALS ",4X,F11.7) 



1900 35 WRITE(6,37) 



1910 37 FORMAT(////, IX, "PRINT RESIDUAL TABLE ( Y/N) "^ " ) 



1920 CALL ANS(L) 



1930 IF(L .EQ. 'Y') K=l 



1940 IF( L .NE. 'N .AND. L .NE. 'Y') GO TO 35 



1950 IF( K .EQ. 1) WRITE(6,45) 



1960 45 F0RMAT(///,1X," XVALUE YVALUE YEST DIFF") 



1970 DO 60 1=1, N 



1980 IF( K.EQ. 1) WRITE(6,51) X ( I ) , YH ( I ) , Z 1 ( I ) , SQRT (Dl ( I ) ) 



1990 51 F0RMAT(F11.4,F11.4,F11.4,F11.4) 



2000 60 CONTINUE 



2010 RETURN 



2020 END , 



2030 , ■ 



2040 . , ' 



2050 SUBROUTINE EXPCK W , V2 , CUT) 



2060 DOUBLE PRECISION BU 



2070 REAL LAMBDA 



2080 FDl (X)=-(AL0G(-AL06(X) )»PHI)+EPSI 



