XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX SOURCE PROGRAM xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 



* 8 



c 

 c 

 c 

 c 



10 



20 



3000 

 5 



900 

 3 



2000 



100 



200 



300 



700 

 1000 



800 



* 8 a 



c 



104 



1620, FORTRAN II » COMPUTATION OF WAVE VELOCI T lES ( FEET/SECOND) AS COMPV 01 



A FUNCTION OF WATER DEPTH(FEET) AND WAVE PER IOD( SECONDS ) . COMPV 02 



THEORY FROM H. 0. PUB. 234 ( 1944) . PROGRAMED BY W.S.WILSON» COMPV 03 



JUNE 17» 1964. COMPV 04 



DIMENSION CXX (1025) COMPV 05 



TANHF(X) = (EXPF(X)-EXPF(-X) )/<EXPF(X)+EXPF(-X) ) COMPV 06 



P = 3.1415927 COMPV 07 



G = 32.2 COMPV 08 



READ 10,NOTT COMPV 09 



FORMAT (13) COMPV 10 



DO 1000 N0T=1,N0TT COMPV 11 



READ 20, TT COMPV 12 



FORMAT (F5.1) COMPV 13 



XL = 0.5*G»(TT*»2.0)/(2.0*P) COMPV 14 



L = XL COMPV 15 



CXXO = TT*G/(2.0*P) COMPV 16 



CCC = 5.5 COMPV 17 



BAR = 2.0*P/TT COMPV 18 



DO 2000 K=1,L COMPV 19 



DEP = K COMPV 20 



DO 3000 M=l,90 COMPV 21 



CXX(K) = CXXO»TANHF( (BAR*DEP)/CCC> COMPV 22 



IF (ABSF(CXX(K)-CCC)-.0005) 5,3000,3000 COMPV 23 



CCC = (CXX(K)+CCC)/2.0 COMPV 24 



IF (SENSE SWITCH 1) 4,3 COMPV 25 



TYPE 900, K,M COMPV 26 



FORMAT (2HK=,I5»3H,M=,I3) COMPV 27 



VALUE = CXX(K) COMPV 28 



CALL ROUND (VALUE.IOO.) COMPV 29 



CXX(K) = VALUE COMPV 30 



PUNCH 100, TT,L COMPV 31 



FORMAT (8HPERI0D =,F5.1,25H SECONDS, MAXIMUM DEPTH =,I5»7H» FEET.)COMPV 32 



PUNCH 200 COMPV 33 



FORMAT (/5(5HDEPTH,1X,6HVELCTY,3X)/) COMPV 34 



PUNCH 300, (K.CXXtK) ,K=1,L) COMPV 35 



FORMAT (5( I5,F7.2,3X) ) COMPV 36 



PUNCH 700 COMPV 37 



FORMAT (///) COMPV 38 



CONTINUE COMPV 39 



TYPE 800 COMPV 40 



FORMAT (16HTHIS IS THE END.) COMPV 41 



END COMPV 42 



SUBROUTINE ROUND (VALUE, DEC) ^ ROUND 01 



PROGRAMED BY W.S.WILSON, JULY 18, 1964. ' ROUND 02 



IVALUE = VALUE ♦ DEC * 10. ROUND 03 



IF (IVALUE) 100,104,100 ROUND 04 



VALUE = 0.0 ROUND 05 



32 



