Re: band pass filter

From: Li Richard <lcy114_at_nyahnyahspammersnyahnyah>
Date: Sun Dec 13 2009 - 21:39:47 MST

Thank you very much for your help, Dennis. Please forgive me to ask some more questions. When I use the function short2flt, an error (could not coerce values for operation) is reported and I want to know why. Also, the later part of the e-mail you replied to me earlier is missing. So could you mind stating again my mistakes so that i can make improvement? Thank you.
Richard 

--- 2009年12月13日 星期日,Dennis Shea <shea@ucar.edu> 寫道﹕

寄件人: Dennis Shea <shea@ucar.edu>
主題: Re: [ncl-talk] band pass filter
收件人: "Li Richard" <lcy114@yahoo.com.hk>
副本(CC): ncl-talk@ucar.edu
日期: 2009年12月13日,星期日,下午2:55

The basic rule of data processing is to look at your data.

%> ncl_filedump olr.day.mean.nc

You would see that the variable is type short and it must be unpacked.

      short olr ( time, lat, lon )

Use
      x = short2flt( f->olr )     ; x(time,lat,lon)

=====================

Filter Example 3 reads the time series at *one* location

      x       = f->$vName$(:,{0},{120})  ; Example 3

You filter *all* grid point in a region

  xBPF    = wgt_runave_Wrap( x({lat|-20:20}, {lon|:}, time|:), wgt, 0)

  xBPF(lat,lon,time)

This is fine BUT later
you try to use an 'xy' plot function inappropriately

  plot(0) = gsn_csm_xy (wks,yrfrac(iStrt:iLast),x(iStrt:iLast,{-20:20},:),res)

  res@gsnCenterString  = "Band Pass Filtered: 20-100 day"
  plot(1) = gsn_csm_xy (wks,yrfrac(iStrt:iLast),xBPF(:,:,iStrt:iLast),res)

which

Li Richard wrote:
> Hello everyone,
> I have applied a band pass filter to the daily interpolated OLR obtained from NOAA in order to extract signals of the Madden Julian Oscillation (MJO). However, error occurs when I'm going to run it and I really want to know what mistakes I have made. Thanks in advance for any assistance and help. The script can be seen in the attachment and the data i use is from (http://www.esrl.noaa.gov/psd/cgi-bin/db_search/DBSearch.pl?Dataset=NOAA+Interpolated+OLR&Variable=Outgoing+Longwave+Radiation <http://www.esrl.noaa.gov/psd/cgi-bin/db_search/DBSearch.pl?Dataset=NOAA+Interpolated+OLR&Variable=Outgoing+Longwave+Radiation>). Thanks.
> Regards,
> Richard
>
>
> ------------------------------------------------------------------------
> Yahoo!香港提供網上安全攻略,教你如何防範黑客!*了解更多* <http://hk..promo.yahoo.com/security/>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

Received on Sun Dec 13 22:09:54 2009

This archive was generated by hypermail 2.1.8 : Thu Dec 17 2009 - 17:15:52 MST