<div dir="ltr"><div>I think you want to use:<br><br><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_runave_n_Wrap.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_runave_n_Wrap.shtml</a><br><br>----<br></div><div>Replace these two lines:<br> <br><div><b>prec_lz = wgt_runave_Wrap(ua, wgt,0)</b></div><div>copy_VarMeta(ua,prec_lz)<br><br></div><div>With:<br><br><div><b>prec_lz = wgt_runave_n_Wrap(ua, wgt,0,0)</b></div><div><br></div>Please read the documentation for:<br> <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_runave_n_Wrap.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/wgt_runave_n_Wrap.shtml</a><br></div></div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 16, 2017 at 4:34 AM, Lyndon Mark Olaguera <span dir="ltr"><<a href="mailto:olagueralyndonmark429@gmail.com" target="_blank">olagueralyndonmark429@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>I'm trying to do a 120 day lanczos highpass filter in ncl.</div><div><br></div><div><b>I'm getting the following errors:</b></div><div><br></div><div><div><div><br></div><div><div>Variable: ua</div><div>Type: float</div><div>Total Size: 22352400 bytes</div><div> 5588100 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:<span class="m_-8308643893126167972gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>[time | 6209] x [lat | 30] x [lon | 30]</div><div>Coordinates: </div><div> time: [2557.5..8765.5]</div><div> lat: [14.5..-14.5]</div><div> lon: [0.5..29.5]</div><div>Number Of Attributes: 4</div><div> long_name :<span class="m_-8308643893126167972gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>Anomalies: GPCP: daily precipitation</div><div> units :<span class="m_-8308643893126167972gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>mm/day</div><div> _FillValue :<span class="m_-8308643893126167972gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>-99999</div><div> missing_value :<span class="m_-8308643893126167972gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>-99999</div></div><div><br></div><div>Variable: wgt</div><div>Type: float</div><div>Total Size: 244 bytes</div><div> 61 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span class="m_-8308643893126167972gmail-Apple-tab-span" style="white-space:pre-wrap">        </span>[61]</div><div>Coordinates: </div><div>Number Of Attributes: 2</div><div> resp :<span class="m_-8308643893126167972gmail-Apple-tab-span" style="white-space:pre-wrap">        </span><ARRAY of 125 elements></div><div> freq :<span class="m_-8308643893126167972gmail-Apple-tab-span" style="white-space:pre-wrap">        </span><ARRAY of 125 elements></div></div><div><b>fatal:wgt_runave: The length of wgt must be less than or equal to the rightmost dimension of x</b></div><div>fatal:["Execute.c":8575]:<wbr>Execute: Error occurred at or near line 6753 in file /usr/local/ncl-6.3.0/lib/<wbr>ncarg/nclscripts/csm/<wbr>contributed.ncl</div><div>fatal:["Execute.c":8575]:<wbr>Execute: Error occurred at or near line 22 in file highpass.ncl</div></div><div><br></div><div><b><br></b></div><div><b>Question:</b></div><div>I'm getting the error at the wgt_runave_Wrap. I also tried using the wgt_runave_n_Wrap. No error but this function returns undefined values in the output netcdf file. </div><div>Has anyone experienced this problem before? I tried to look for this error over the net, but found no solution. Any suggestion on how to solve this?</div><div><br></div><div><br></div><div><b>Here's my code:</b></div><div><div>begin</div><div>f = addfile("<a href="http://test1.nc" target="_blank">test1.nc</a>", "r")</div><div>time = f->time<br></div><div>date = ut_calendar(time,-2)</div><div>ua = f->gpcp_anom(:,:,:)</div><div>printVarSummary(ua)<br></div><div>lat= f->lat</div><div>lon= f->lon</div><div><br></div><div>fcb= -999</div><div>fca=0.00833</div><div>nwt=61</div><div>ihp=1</div><div>nsigma=1.</div><div><br></div><div>wgt = filwgts_lanczos(nwt,ihp,fca,<wbr>fcb,nsigma)</div><div>printVarSummary(wgt)</div><div><b>prec_lz = wgt_runave_Wrap(ua, wgt,0)</b></div></div><div><div>copy_VarMeta(ua,prec_lz)</div><div>prec_lz@long_name = "Highpass Pass:120day"</div><div>ncdf = addfile("<a href="http://highfilt.nc" target="_blank">highfilt.nc</a>","c")</div><div>fAtt = True</div><div>fAtt@title = "61wgt HPass Filter"</div><div>fAtt@source_file = "<a href="http://gpcp_daily_1997-2013.nc" target="_blank">gpcp_daily_1997-2013.nc</a>"</div><div>fAtt@Conventions = "None"</div><div>fAtt@creation_date = systemfunc("date")</div><div>fileattdef(ncdf,fAtt) ; copy file attributes</div><div>filedimdef(ncdf,"time",-1,<wbr>True)</div><div>ncdf->prec_lz = prec_lz</div><div>end</div></div><div><br></div><div><br></div><div>Many thanks,</div><div><br></div><div>I'll appreciate any help.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div><div><div class="m_-8308643893126167972gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><font face="comic sans ms, sans-serif"><b><u>Lyndon</u></b></font><div><br></div></div></div></div></div></div></div></div></div></div>
</div></font></span></div>
<br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>