1 subroutine da_find_fft_trig_funcs(n, trig_functs)
3 !---------------------------------------------------------------------------
4 ! Purpose: Set up constants required for Fourier, sine and cosine transforms
5 !---------------------------------------------------------------------------
9 integer, intent(in) :: n
10 real, intent(out) :: trig_functs(:)
12 integer :: k, nil, nhl
16 ! if (trace_use) call da_trace_entry("da_find_fft_trig_funcs")
18 !---------------------------------------------------------------------------
19 ! [1.0] Trig functions for real periodic transform:
20 !---------------------------------------------------------------------------
24 del=4.0*(pi/2.0)/float(n)
30 trig_functs(2*k+1)=cos(angle)
31 trig_functs(2*k+2)=sin(angle)
34 ! [1.1] extra trig functions for cosine transform:
39 trig_functs(2*n+k)=sin(angle)
42 ! [1.2] extra trig functions for shifted cosine transform:
47 trig_functs(n+k)=sin(angle)
50 !if (trace_use) call da_trace_exit("da_find_fft_trig_funcs")
52 end subroutine da_find_fft_trig_funcs