pro zonalfreq0_nophaselimits,vn,ntime,nx,ny,nz,nshift,ntime2,uspc,uphs ;; Frequency-zonal wavenumber analyzer at a given time, altitude and latitude. ;; Hanli Liu, 7/99 uspc = fltarr(nx,ntime2,ny,nz) uphs = fltarr(nx,ntime2,ny,nz) for k = 0,nz-1 do begin for j = 0,ny-1 do begin tmpa = fltarr(nx,ntime) for it = 0,ntime-1 do begin for i=0,nx-1 do begin tmpa(i,it)=vn(i,j,k,it) endfor ; tmpa(*,it) = shift(tmpa(*,it),-nshift) ;;this is to put 0 deg at the first point(Not needed for WAM/WACCM) endfor fftmp = fft(tmpa) for it = 0,ntime2-1 do begin uspc(*,it,j,k) = shift(abs(fftmp(*,it)),nshift)*2. uphs(*,it,j,k) = -shift(atan(fftmp(*,it),/phase),nshift)*12./!pi if it ge 1 then uphs(*,it,j,k) = -shift(atan(fftmp(*,it),/phase),nshift)*12./!pi/it endfor endfor endfor for it = 0,ntime2-1 do begin uphase = REFORM(uphs[*,it,*,*]) if it le 1 then uphase(where(uphase lt 0))=uphase(where(uphase lt 0))+24. if MIN(uphase) lt 0.0 and it gt 1 then uphase(where(uphase lt 0))=uphase(where(uphase lt 0))+24./it uphs[*,it,*,*] = uphase[*,*,*] endfor uspc(*,0,*,*)=uspc(*,0,*,*)/2. end