Re: band pass filter

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Dec 14 2009 - 07:41:40 MST

Li Richard wrote:
> 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.

Did you "look at your data" ?

As indicated below, what did

>
> %> ncl_filedump olr.day.mean.nc
>

show for the olr variables. The file I have by the same name as yours

Variable: f (file variable)

filename: olr.day.mean
path: olr.day.mean.nc
    file global attributes:
       title : Daily Mean Interpolated OLR
[SNIP]
       short olr ( time, lat, lon )
          long_name : Daily OLR
          valid_range : ( 0, 500 )
          actual_range : ( 93, 325 )
          units : W/m^2
          add_offset : 327.65
          scale_factor : 0.01
          missing_value : 32766
          var_desc : Outgoing Longwave Radiation
          precision : 2
          dataset : NOAA Interpolated OLR
          level_desc : Other
          statistic : Mean
          parent_stat : Individual Obs
          _FillValue : 32766

If your variables is type short, then I have no idea why "short2flt"
would fail.

If the variable is "float" or "double"
          float olr ( time, lat, lon )
          double olr ( time, lat, lon )

then you do not need to use "short2flt"

> 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>
> <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
>
>
> ------------------------------------------------------------------------
> Yahoo!香港提供網上安全攻略,教你如何防範黑客!*了解更多*
> <http://hk.promo.yahoo.com/security/>
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Dec 14 07:42:46 2009

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