TO IMAXdF ALREADY DONE. WON'T HARM THINGS) 



too $RESET FREE 



200 C»*»*»*»»»»*»»*PROGRAM CIH/BVALUE1 



300 FILE 5(KIN0"PACK.TITLE-"CIH42076A".F1LETVPE"7> 



400 FILE 6(KINO'REI40TE) 



500 C»THIS PROGRAM USES THE INTERPOLATED PROFILES OF CIH. 



600 C*IT FINDS THE LOCATION OF THE SHORELINE. YDEL AND THE BEST 



700 C'FIT LEAST SQUARES "B" VALUE FOR H=BY**2/3 



800 C'USES LAGRANGE MULTIPLIERS TO CONSTRAIN THE VOLUMES(SO THEY ARE EQUAL) 



900 C'THEN IT USES NEWTON-RAPHSON ITER FOR NON-LIN EOS 



1000 DIMENSION X ( 40) 



1100 DIMENSION WKAREA(600) .AMATRX(23.23) .BMATRX(23. 1) 



1200 DIMENSION Y ( 40. 20) . Z( 40. 20 ) . YDEL ( 40) . JBEGINC 40) . YDELI ( 40) 



1300 DIMENSION DYTWO( 40. 20) . DYONE ( 40 . 20) . OYMTWO( 40. 20) .DYMONE ( 40. 20) 



1400 DIMENSION DVMF0R(4O.2O) . DYFOR ( 40 . 20 > . YDONE ( 40 . 20 ) . YDMTWO( 40. 20) 



1500 DIMENSION YDMONE ( 40, 20) . YETWO( 40) . YEONE ( 40) . YEMONE ( 40) 



1600 DIMENSION YEMTWO( 40) . YEMFOR( 40) . YEF I VE ( 40) 



1700 EXP0N=2./3. 



1BOO THIRD=0. 3333333333333333 



1900 C'FIRST READ IN THE PROFILES FROM DISKPACK. 



2000 DO 1 1=1.34 



210O DO 1 J=1 . 15 



2200 1 READ(5.100) X( I ) . Y( I . d ) , Z( I . d ) 



2300 100 F0RMAT( 14X.F6 .O.F5.0,F5.0) 



2400 C'NOW WE MUST GET A FIRST APPROX FOR YDEL 



2500 C*WE WILL USE LINEAR INTERPOLATION TO DETERMINE IT. 



2600 IBEGIN^I 



2700 IMAX=21 



2800 dMAX^'IS 



2900 C'CHANGE PROFILE TO SPAN 



3000 ITEMP1=1 



3100 ITEMP2=IMAX-IBEGIN+1 



3200 K=-1 



3300 DO 777 I-1.ITEMP2 



3400 K=K+1 



3500 DO 777 d=1.dMAX 



3600 Yd .d)="Y(IBEGIN+K.d) 



3700 777 2( I .d) = Z( IBEGIN+K.d) 



3800 IMAX=ITEMP2 



3900 DX=100.00 



4000 DO 2 1-1. I MAX 



4 100 DO 3 d=1 .dMAX 



4200 IF(Z( I ,d) GE .0.0) GO TO 3 



4300 C'FIRST NEG POINT ON THE PROFILE IS SEAWARD OF Z=0.0 



4400 C* WE MUST ALSO REMEMBER THIS LOCATION. 



4500 C*IF Z(I . 1 )<0. .CHOOSE ARBITRARY PT . ROUTINE ITERATES TO SOLN. 



4600 ZDUM=1.0 



4700 IF(d.NE.I) ZOUM=-Z( I .d-1 ) 



4800 YDUM-Yd ,d)-50.0 



4900 IF(d.NE.I) YDUM=Y( I .d-1 ) 



5000 DELY=ZDUM/( (ZDUM-Z( I , d) )/( Yd . d)-YDUM) ) 



5100 YDEL( I )-YDUM+DELY 



5200 dBEGINd)-d 



5300 GO TO 2 



5400 3 CONTINUE 



5500 2 CONTINUE 



5600 C'THE VALUES FOR Z 



5700 C*THE Z VALUES ARE ALSO 



580O 00 35 1-1 . IMAX 



5900 DO 35 d'dBEGINd ).dMAX 



6000 35 2(1 .d)'-2( I .d)/10.0 



6IOO C'MUST INITIALIZE "B" SO WILL MAKE 



6200 C'MUST ALSO GUESS LAMBDA (XLAMB) 



6300 B»0.30 



6400 XLAMB- -2. O 



6500 00 10 IT£R=1. 100 



6600 C'LET'S CALCULATE THE VOL OF WATER ABOVE THE PROF I LE . VMEAS . 



670O C'lTS OUR CONSTRAINT . BUT SINCE YDEL IS NOT KNOWN, A PRIORI. IT WILL CHANGE 



68C0 VMEAS-O.O 



6900 DO 200 1-1. IMAX 



7000 00 200 d-dBEGIN(I).dMAX 



7100 IF( J.NE.dBEGINd )) GO TO 201 



ARE NEG ON FILE. MUST NOW MAKE POS . 

 10. 



FIRST GUESS. 



108 



