Re: fourier_info

From: <whobbs_at_nyahnyahspammersnyahnyah>
Date: Tue, 26 Aug 2008 14:28:10 -0700

Justin

In that case, the plot you have is the zonal waves ascending order for
your give latitude. Remember that in NCL (as in fortran) the first
index of an array is always zero, so 0 on your x-axis actually means
zonal wave 1 (the first harmonic), 1 on your x-axis is zonal wave 2
and so on. You would have to add a dimension or axis label manually to
change this (e.g. xlabels = ispan(1, nhx, 1) ).

Without plotting a legend or explicitly defining the dash patterns
it's impossible to know for sure what the 3 lines correspond to, but
you're correct that they correspond to the amplitude (in this case in
gpm), phase (in this case a longitude) and percentage variance
explained. Because of their different units, I would suggest plotting
them seperately for clarity, so a very simple example ....

  tString = (/"amplitude","phase","variance"/)
  do i = 0, 2

     res_at_tiMainString = tString(i)
     plot = gsn_y(wks,finfo1(i,:),res)
end do

Hope that helps,

Will

>

Quoting Justin Glisan <justin.glisan_at_gmail.com>:

> Hi Will,
>
> Thank you for replying. Below, you will find the section of the script
> pertaining to the plot. What I'm doing is...
>
> 1) Taking 500-hPa heights (level = 1) from GFS
> 2) Performing the FT on a given latitude circle (45N => lat = 27) for a
> single time step (time = 0).
>
> ========================================================================
> begin
>
> res = True
>
> ; Read variable "Z" from netcdf file and store it in a variable
> ; called 'var'. This section also determines the dimensions of the
> ; variable and stores the dimension array in more easily understood
> ; variables.
>
> gpm = nc->Z(:,:,:,:) ; => (record, level, lat, lon)
> dims = dimsizes(gpm)
>
> ; Rename the "record" dimension to "time"
>
> gpm!0 = "time"
>
> ; This is where the Fourier analysis will be completed
>
> finfo1 = fourier_info (gpm(level|1,lat|27,lon|:,time|0), 0, 1.)
>
> printVarSummary(finfo1)
>
> plot = gsn_y(wks,finfo1,res)
>
>
> end
> =====================================================================
>
> Thanks again!
>
> Justin
>
> On Tue, Aug 26, 2008 at 3:43 PM, <whobbs_at_ucla.edu> wrote:
>
>> Justin
>>
>> Do you have the script that you used to create this plot? It's impossible
>> to know from the plot what part of the function's output is being plotted.
>>
>> Will
>>
>> Quoting Justin Glisan <glisanj_at_iastate.edu>:
>>
>> Hello group,
>>>
>>> I was wondering if anyone could help out with a few questions regarding
>>> the
>>> "fourier_info" function? Attached is a plot.
>>>
>>> 1) What do each of the three curves plotted represent? Are they amplitude
>>> (solid), phase (long dash) and variance (short dash)?
>>>
>>> 2) What wavenumber is represented at 0?
>>>
>>> Thank you,
>>>
>>> Justin
>>>
>>>
>>
>>
>
>
> --
> ________________________________
> Justin Glisan
> Doctoral Research Assistant
> Geological and Atmospheric Sciences
> Iowa State University
> glisanj_at_iastate.edu
> 636.795.8859
>

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 26 2008 - 15:28:10 MDT

This archive was generated by hypermail 2.2.0 : Wed Aug 27 2008 - 10:22:44 MDT