C+ C NAME: C write_spec.f C PURPOSE: C write fft-spectral values and power into a data file C CATEGORY: C I/O C CALLING SEQUENCE: C call write_spec(cFile,specval,power,Ndat) C C INPUTS: C Read_fft: C cfile character The fft power spectrum input file C specval real the input spectral frequencies C power real the input spectral power C Ndat integer the number of input values C C OUTPUTS: C A data file C C MODIFICATION HISTORY: C November-2013, Bernard Jackson (UCSD) C- subroutine write_spec(cFile,specval,power,Ndat) character cFile*44 ! The fft power spectrum input file character cFmt8*8 /'(2F15.8)'/ ! the spectral output format real*8 specval (Ndat), ! The output spectral frequencies & power (Ndat) ! The output spectral power C print *, ' ' write (*,'(2A)') 'inside write_spec ',cFile open (iU, file=cFile,recl=120,access='sequential',form='formatted') do i=1,Ndat write(iU,cFmt8) specval(i),power(i) end do close(iU) C return end