subroutine gel_hv(output_file,smv,smn,sme,fre,buf,nf,n_win, # sv,sn,se,nfft,jmin,jmax,ierr) c c for each window c merging horizontal component + c compute H/V + c [optional] write single component file --> h/v + spectra c c a.tento 05/03 v.1.0. c implicit none c include 'parameters.h' c character*200 output_file real sv,sn,se, smv, smn, sme, buf, fre integer ierr, jmin, jmax, nf, n_win, nfft dimension fre(nf), sv(nfft), sn(nfft), se(nfft), buf(nf), # smv(nf,n_win),smn(nf,n_win),sme(nf,n_win) c c integer jlen, j1, j2, ifsw, nw, i, l, nunit c real character sep2*1, swin_outf*200 parameter (sep2 = ':') character*200 argout(20) c c c call split3(single_win_out,argout,sep2,nw) if( argout(1) .eq. 'no' ) then ifsw = 0 else ifsw = 1 call glun(nunit,ierr) if (ierr .eq. 1) then write (*,*) ' ERROR: GEL_HV could not find free unit number' ierr=1 return endif swin_outf = output_file j1 = jlen(swin_outf) j1 = j1 + 1 j2 = j1 + 5 swin_outf(j1:j2)='_win_' endif c do 1 l = 1, n_win if ( ifsw .eq. 1 ) then do 20 i = jmin, jmax sv(i) = smv(i,l) sn(i) = smn(i,l) se(i) = sme(i,l) 20 continue endif c call merge_hv(l,smv,smn,sme,nf,n_win,buf,jmin,jmax,ierr) call ckerr(ierr) c if ( ifsw .eq. 1 ) then call swin_write(nunit,swin_outf,l,fre,smv,smn,sme,nf, # n_win,sv,sn,se, nfft,jmin,jmax,ierr) call ckerr(ierr) endif c 1 continue c c return c end