program readdelilah c c This program has the FORTRAN codes to read DELILAH crest or trough array c directional spectral ASCII output files. This program simply reads the c ASCII file and converts the normalized input frequency-direction spectrum c (i.e., the directional distribution function) to dimensional form (i.e., c the frequency-direction spectrum). You will have to tune the I/O c statements to your own system... c c Variable names, units and meanings are: c c======================================================================== c c datetime...[character*10] Date and Eastern Standard Time of c beginning of data collection in the order year, c month, day, hour, minute and in the form c yymmddhhmm (2-digit year, no blanks in any field) c Hmo...[m] Energy-based characteristic wave height = c 4*sigma, where sigma^2 is the variance of sea c surface displacement = volume under frequency- c direction (f-d) spectrum c fp...[Hz] Frequency at the peak of the frequency spectrum c thp...[deg] Direction at the peak of the directional c distribution at f=fp c c ifimle...Algorithm flag: [1]=IMLE estimate, [0]=MLE estimate c c istot...[sec] Length of time series processed c sfrq...[Hz] Data sampling frequency in time series c c ifwindo...Windowing flag: [0]=data segments not windowed, c [1]=data segments windowed (Kaiser-Bessel window) c ifdtrnd...Detrending flag: [0]=data segments not detrended, c [1]=data segments detrended (linear trend removed) c nfft...Number of data points in a data segment c nensb...Number of half-lapped segments analyzed c nband...Number of frequency bands averaged for frequency c smoothing c idgfr...Degrees of freedom of final frequency spectral c estimates c c nofrq...Number of output frequency bands c delfs...[Hz] Width of an output frequency band c noang...Number of output direction bins (arcs) c odelang...[deg] Width of an output direction bin c c dmin...[m] Minimum 512-sec mean water depth during time c series at reference gauge 'rname' c dbar...[m] Mean water depth during time series at reference c gauge 'rname' c dmax...[m] Maximum 512-sec mean water depth during time c series at reference gauge c rname...Reference gauge ID for mean water depths (FRF gauge c name - get help if you need to know which DELILAH c gauge it was) c c zgain(ncm)...Multiplier for gain listed in raw data header of c ncm'th current meter (counting from north to south) c required for surface displacement variance from c current meter to match surface displacement variance c from pressure gauge c dfmsl(ncm)...[m] Water depth to NGVD at ncm'th current meter site c based on interpolated bathymetric survey data c pgain...Multiplier for gain listed in raw data header of c pressure gauge 'rname' c pbias...[m] Water depth added to mean pressure signal to c approximate correct height of mean water column above c pressure gauge c c oangle...[deg] Array of wave direction coordinates that c aligns with the f-d spectral array c c nof...(Within a loop) Frequency index c noa...(Within a loop) Direction index c of(nof)...[Hz] Frequency c osf(nof)...[m^2/Hz] Frequency spectral density at frequency c of(nof) c ogpat(nof)...[character*11] Encoded list of gauges used to compute c directional distribution of energy at this frequency c itero(nof)...Number of IMLE iterations used to compute directional c distribution of energy at this frequency c ospc(nof,noa)...[1/deg] Normalized frequency-direction spectral den- c sity at frequency of(nof) and direction oangle(noa). c Dimensional frequency-direction spectrum spc(nof,noa) c [in m^2/(Hz deg)] is found from replacement statement: c c ospc(nof,noa) = osf(nof)*ospc(nof,noa) c c======================================================================== c c links: none c character*4 rname character*10 datetime character*11 ogpat(29) character*80 infile dimension dfmsl(5), zgain(5) dimension of(29), osf(29), itero(29) dimension oangle(181), ospc(29,181) c c ask user for input file name c write(*,'(2x,''Enter input file name...: '')') read(*,'(a)') infile c c open input file and read data c open(10,file=infile,status='unknown',access='sequential', & form='formatted') c read(10,'(a10,f10.2,f10.5,f10.1,2i10,f10.2,i10)') & datetime, Hmo, fp, thp, & ifimle, istot, sfrq, ifwindo c read(10,'(6i10,f10.5,i10)') & ifdtrnd, nfft, nensb, nband, & idgfr, nofrq, delfs, noang c read(10,'(4f10.2,6x,a4,3f10.3)') & odelang, dmin, dbar, dmax, & rname, zgain(1), zgain(2), zgain(3) c read(10,'(8f10.3)') & zgain(4), zgain(5), dfmsl(1), dfmsl(2), & dfmsl(3), dfmsl(4), dfmsl(5), pgain c read(10,'(f10.3)') & pbias c read(10,'(10f8.1)') (oangle(noa),noa=1,noang) c do 700 nof=1,nofrq c read(10,'(i10,f10.5,e20.7,9x,a11,i10)') & iof, of(nof), osf(nof), ogpat(nof), & itero(nof) c read(10,'(8f10.7)') (ospc(nof,noa),noa=1,noang) c 700 continue c close(10) c c convert ospc(nof,noa) from directional distribution form in units of c deg**-1 to dimensional form (the frequency-direction spectrum) in units c of m**2/Hz*deg c do 720 nof=1,nofrq do 740 noa=1,noang ospc(nof,noa)=ospc(nof,noa)*osf(nof) 740 continue 720 continue c end