subroutine fftrc (rldat,nrlpts,signex,hctrn,nhcpts,work,lwrk,ierr) real rldat(nrlpts) ,work(lwrk) complex hctrn(nhcpts) dimension nscrt(1) c the following call is for gathering statistics on library use at ncar c logical q8q4 c save q8q4 c data q8q4 /.true./ c if (q8q4) then c call q8qst4('loclib','fft','fftrc','version 08') c q8q4 = .false. c endif ierr = 0 if (nrlpts .lt. 2) go to 103 if (nhcpts .ne. nrlpts/2+1) go to 105 if (lwrk .lt. 4*nrlpts) go to 106 do 101 j=1,nrlpts work(2*j-1) = rldat(j) work(2*j) = 0. 101 continue isign = signex nscrt(1) = nrlpts call fourt (work,nscrt,1,isign,0,work(2*nrlpts+1)) do 102 k=1,nhcpts hctrn(k) = cmplx(work(2*k-1),work(2*k)) 102 continue return 103 if (nrlpts .lt. 1) go to 104 if (nhcpts .ne. 1) go to 105 hctrn(1) = cmplx(rldat(1),0.) return 104 ierr = 101 call uliber (ierr,25h fftrc nrlpts is .lt. 1,25) return 105 ierr = 102 call uliber (ierr,33h fftrc nhcpts is not nrlpts/2+1,33) return 106 ierr = 103 call uliber (ierr,55h fftrc insufficient workspace - lwrk is .lt 1. 4*nrlpts ,55) return end