Appendix C 



Listing of FORTRAN Computer 



Program 



program readascii 

 c 



c Sample FORTRAN program containing statements necessary to read 



c ASCII files of Harvest Platform frequency-direction spectra, 



c This example reads a file called HPyymmddhhmm.ASC, where the 



c string yymmddhhmm is a date/time group entered by the user, 



c In other applications, the I/O statements may need modification 



c to suit a user's system. 

 c 



c Variable names, units and meanings are: 



f(nf)..[Hz] frequency at index nf 

 angle(na). . [degrees CCW from true north] direction at index na from 

 which wave energy is arriving 

 sf (nf ). . [m"2/Hz] frequency spectral density at f(nf) 



ddf(nf ,na).. [deg"(-1)] directional distribution function at f(nf) 

 and angle(na), which is the frequency-direction 

 spectral density at f(nf) and angle(na) normalized by 

 sf(nf) 



fds(nf ,na). . [m"2/(Hz*deg)] frequency-direction spectrum at f(nf) 

 and angle(na), computed from ddf(nf ,na) and sf(nf ) 



gpat(nf).. gauge pattern used at f(nf) 

 iter(nf)..# of IMLE iterations for convergence at f(nf) 

 datetime.. [character*10] Date and Greenwich Mean Time of 

 beginning of data collection in the order year, 

 month, day, hour, minute, and in the form 

 yymmddhhmm (2-digit year, no blanks in any field) 



Hmo. 



fp. 

 thp. 



. tm] Energy-based characteristic wave height equal 

 to 4*sigma, where sigma"2 is the variance of sea 

 surface displacement 



. [Hz] frequency at peak of frequency spectrum 

 . [deg] direction at peak of directional distribution 

 at f(nf) = fp 



if imle.. algorithm flag: [1]=IMLE estimate, [0]=MLE estimate 

 istot..[sec] duration of data collection 

 sfrq..[Hz] data sampling frequency 



Figure C1 . Listing of FORTRAN Computer Program (Sheet 1 of 3) 



Appendix C Listing of FORTRAN Computer Program 



C1 



