[ncl-talk] lanczos higpass filter in ncl

Lyndon Mark Olaguera olagueralyndonmark429 at gmail.com
Mon Jan 16 04:34:15 MST 2017


Hi All,

I'm trying to do a 120 day lanczos highpass filter in ncl.

*I'm getting the following errors:*


Variable: ua
Type: float
Total Size: 22352400 bytes
            5588100 values
Number of Dimensions: 3
Dimensions and sizes: [time | 6209] x [lat | 30] x [lon | 30]
Coordinates:
            time: [2557.5..8765.5]
            lat: [14.5..-14.5]
            lon: [0.5..29.5]
Number Of Attributes: 4
  long_name : Anomalies: GPCP: daily precipitation
  units : mm/day
  _FillValue : -99999
  missing_value : -99999

Variable: wgt
Type: float
Total Size: 244 bytes
            61 values
Number of Dimensions: 1
Dimensions and sizes: [61]
Coordinates:
Number Of Attributes: 2
  resp : <ARRAY of 125 elements>
  freq : <ARRAY of 125 elements>
*fatal:wgt_runave: The length of wgt must be less than or equal to the
rightmost dimension of x*
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
fatal:["Execute.c":8575]:Execute: Error occurred at or near line 22 in file
highpass.ncl


*Question:*
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.
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?


*Here's my code:*
begin
f = addfile("test1.nc", "r")
time = f->time
date = ut_calendar(time,-2)
ua = f->gpcp_anom(:,:,:)
printVarSummary(ua)
lat= f->lat
lon= f->lon

fcb= -999
fca=0.00833
nwt=61
ihp=1
nsigma=1.

wgt = filwgts_lanczos(nwt,ihp,fca,fcb,nsigma)
printVarSummary(wgt)
*prec_lz = wgt_runave_Wrap(ua, wgt,0)*
copy_VarMeta(ua,prec_lz)
prec_lz at long_name = "Highpass Pass:120day"
ncdf = addfile("highfilt.nc","c")
fAtt = True
fAtt at title         = "61wgt HPass Filter"
fAtt at source_file   = "gpcp_daily_1997-2013.nc"
fAtt at Conventions   = "None"
fAtt at creation_date = systemfunc("date")
fileattdef(ncdf,fAtt)            ; copy file attributes
filedimdef(ncdf,"time",-1,True)
ncdf->prec_lz = prec_lz
end


Many thanks,

I'll appreciate any help.

*Lyndon*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170116/2acab860/attachment.html 


More information about the ncl-talk mailing list