<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="gmail-Apple-tab-span" style="white-space:pre">        </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="gmail-Apple-tab-span" style="white-space:pre">        </span>Anomalies: GPCP: daily precipitation</div><div> units :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>mm/day</div><div> _FillValue :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span>-99999</div><div> missing_value :<span class="gmail-Apple-tab-span" style="white-space:pre">        </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="gmail-Apple-tab-span" style="white-space:pre">        </span>[61]</div><div>Coordinates: </div><div>Number Of Attributes: 2</div><div> resp :<span class="gmail-Apple-tab-span" style="white-space:pre">        </span><ARRAY of 125 elements></div><div> freq :<span class="gmail-Apple-tab-span" style="white-space:pre">        </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]:Execute: Error occurred at or near line 6753 in file /usr/local/ncl-6.3.0/lib/ncarg/nclscripts/csm/contributed.ncl</div><div>fatal:["Execute.c":8575]: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">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,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">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">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,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><div><br></div><div><div><div class="gmail_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></div>