[ncl-talk] Wheeler Kiladi Spectrum
Dennis Shea
shea at ucar.edu
Thu Aug 17 21:53:17 MDT 2017
The underlying fortran code uses FFTs at each latitude. It assumes the data
are global (cyclic in longitude). I am not sure you can modify the code to
do what you want.
If you work on non-global data, what does 'wave number' mean?
Here is a f77 code snippet:
========================================================
c--------------------------------------------------------------------
c---------------COMPUTING SPACE-TIME SPECTRUM for EE1----------------
DO T = 1, NT
DO N = 1, NL
c CEEa(n) contains the grid values around a latitude circle
CEEA(N) = EE1(N,T)
END DO
CALL CFFTF (NL, CEEA, WSAVE1)
DO N = 1, NL
c Normalize
EE1(N,T) = CEEA(N)/DBLE(NL)
END DO
END DO
c Now the array EE(n,t) contains the Fourier coefficients (in planetary
c wavenumber space) for each time.
DO N = 1, NL
DO T = 1, NT
c CEEb(t) contains a time-series of the coefficients for a single
c planetary zonal wavenumber
CEEB(T) = EE1(N,T)
END DO
CALL CFFTF (NT, CEEB, WSAVE2)
DO T = 1, NT
C Normalize
EE1(N,T) = CEEB(T)/DBLE(NT)
END DO
END DO
c Now the array EE1(n,t) contains the space-time spectrum.
====================================================
I do not think you can isolate a region for space-time spectra.
On Thu, Aug 17, 2017 at 7:53 AM, Adithyan Velloor <adtynvellooor at gmail.com>
wrote:
> Dear NCL users,
>
> I am trying to plot the wheeler killadi spectrum (wave number spectrum)
> for a specific region (Indian Ocean basin from 40-140 degree East). The in
> built script for the spectrum is for the entire longitude 0 to 360.
>
> Someone please tell me a way to take a specific longitude region to get
> the spectrum correctly.. Below is the script to get the wheeler kiladis
> spectra if I consider the entire longitudional belt. Kindly suggest the
> necessary changes to be made in the script to modify it for my purpose.
>
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
>
> case = "wheeler"
> diro = "./"
> latN = 15
> latS = -latN
>
> nDayWin = 96
> nDaySkip = 1
>
> opt = True
> opt at debug= True
> opt at pltType = "eps"
> opt at cnLinesOn = False ; turn off contour lines
>
> spd = 1
> var = "olr_fav"
>
> setfileoption("nc", "FileStructure", "Advanced")
>
> f = addfile("olr.nc", "r")
> olr_fav = f->olr(0:14457,{latS:latN},0:141)
>
> ;function ismissing (olr_fix)
> return_val [dimsizes(olr_fix)] : logical
>
> ;set_default_fillvalue("float", 1.e20)
>
>
> wkSpaceTime (olr_fav, diro, case, var \
> ,latN, spd, nDayWin, nDaySkip, opt )
>
>
> Thanks
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170817/3ba83394/attachment.html
More information about the ncl-talk
mailing list