Calling Statement : WVLEN (DPT, PER, XKH) (see Fig. 6). 



DPT = water depth (from main program) 



PER = wave period (from main program) 



XKH = wave number * water depth (calculated in subroutine) 



WAVE LENGTH ITERATION SUBROUT INE..TH18 SUBKOUTINE CALCULATES WAVELENGTH 



VU NEWTON. RAPH80N ITERATION U8INQ PERJOOiHATER DEPTH INPUT 

 PEH««AVE PERIOD 

 DPTinATER DEPTH 

 XKHawAVE NUHHER*"ATER DEPTH 

 8UHRUUTINE wvLENCDPTtPERtXKH) 

 XKHO«(6,28JlB53/ , 'ER)»*J*DPT/»2.2 

 IF(XKH0-*,3>2»1»I 



1 X*H«XKHO 

 GO TO 9 



2 XKM«3UHT(XKH0) 

 S 8HBS1NH(XKH) 



CHPCUSH(XKH) 



EP8bXKhO.XKH»SH/CH 



SLOPE". XKH/CH»*J«8H/CH 



UXKH».tP8/8L0PE 



IF(AB8(DXKH/XKH)«0 ( 0001)9«9ttt 

 4 XKH»XKHtDKKH 



GO TU 1 

 9 CONTINUE 



RETURN" 



END 



Figure 6. Listing of WVLEN subroutine. 



5. BUF Subroutine . 



This subroutine is set up to read in wave gage files from magnetic tape. 

 The data records consist of arrays of 4,100 values, the first four of which 

 are the gage number, month, day, and time of wave record. The remaining 4,096 

 values represent pressures in thousandths of a foot (head) water. The data 

 are returned to main program as a wave gage number-date series and a time 

 series of 4,096 values of pressure in feet (head) of water. Two records are 

 processed in one pass. 



Calling Statement : BUF (MGAGE, MONTH, MDAY, MTIME, CNTL, IDATE, END) (see 

 Fig. 7). 



MGAGE = number of gage (read from tape) 



MONTH = month of observation (read from tape) 



MDAY = day 



MTIME = time 



CNTL = control array of 4,096 pressure values in feet (head) of water 

 returned to main program 



IDATE = summed time group for time comparison between gages 



END = logical end 



28 



