The proper spatial aliasing frequency to correspond with the spacial aliasing 

 wave number cutoff is found from the normal wave dispersion relationship. 



Calling Statement : HFC (DEPTH, S, DELTT, N, NSALFR) (see Fig. 4). 



DEPTH = depth of water at gage site (from main program) 



S = spacing of wave gage pair (from main program) (= % in text) 



DELTT = time-step increment between values in time series analyzed 

 (from main program) 



N = exponent of 2 describing number of time series values 

 (from main program) 



NSALFR = integer number for spatial aliasing frequency cutoff 



5UBHUUTINE HFCCHIGH FREOUENCY CUTOFF/SP At 1 AL ALIASING FREQUENCY) 



RESET8 ALIASING CUTOFF TO HIGHER FREQUENCY 



BSSto UN ASSUMED MAXIMUM «AVi ANGLE 

 SUBROUTINE HFC ( DEPTH* S.OELTT |Ni N8ALTR) 



SPACIAL ALIASING ASSUMES "AVE ANGLES LESS THAN U% DEGREES 

 XK8a3,l«l?<>/0,707 

 XKH«XKg»DEPTH/S 



8IGSU»ja.?*(XKH/DEPTH)»TANH{XKH) 

 SIUHF«80RT(SIGSQJ 

 RECLN»FLOAT(N)»DELTT 

 NSALFHaSIGHF»RECLN/6.2el 

 RETURN 

 END 



Figure 4. Listing of HFC subroutine. 



3. SWITCH Subroutine . 



This subroutine is set up to interchange time-series data arrays in the 

 instance when gage 2 data are processed before gage 1 data (see Fig. 5). If 

 the first gage record processed is not equal to the appropriate number of the 

 gage, as specified in main program, data arrays of first and second gage 

 records are interchanged . 



l? 



5UBRUUTINE SWITCH EXCHANGES LOCATIONS OF TIME SERIES DATA TO ASSURE 



GAGE! IS STORED IN FIRST ARRAY AND GAGE2 IN SECOND 

 SUBROUTINE SWITCH(M1,M2,F1R|F2R) 

 DIMENSION F1R(102»),F2R(102H)iF3R(102«) 

 M3»M1 

 H1«MJ 

 M2«MJ 



DO 10 I»l, 102U 

 F3K(IJfFlR(I) 

 F1K(I)»FJR(I) 

 F2H(I)»F3R(I) 

 10 CONTINUE 

 RETURN 

 END 



Figure 5. Listing of SWITCH subroutine. 



4. WVLEN Subroutine . 



This subroutine accepts wave period and water depth as input and calcu- 

 lates wave number as output via a Newton-Raphson iteration. 



27 



