<div dir="ltr">"entire grid undefined" in Grads just means that the data grid at the current time step is all missing values.<div><br></div><div>With Lanczos filter, and more generally with running average filters, please remember that there is a spin-up time and a spin-down time, so to speak. With opt=0, the first (nwgts-1)/2 time steps will be all missing values. The last (nwgts-1)/2 time steps will also be all missing values.</div><div><br></div><div>So Marilia, you probably just need to look at your output starting at time step 101. HTH.</div><div><br></div><div>--Dave<br><div class="gmail_extra"><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 13, 2016 at 12:32 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div>Not sure what the issue is with GrADS. That is between you and GrADS.<br><br>==<br></div>Attached is 'my' script to produce the netCDF. 'ncdump -h' has no problem with the resulting file.<br><br>===<br>netcdf xBPF {<br>dimensions:<br> time = UNLIMITED ; // (3652 currently)<br> lat = 73 ;<br> lon = 144 ;<br>variables:<br> float xBPF(time, lat, lon) ;<br> xBPF:_FillValue = 32766.f ;<br> xBPF:long_name = "Anomalies: mean Daily U-wind" ;<br> xBPF:units = "m/s" ;<br> xBPF:wgt_runave_op_ncl = "wgt_runave_n" ;<br> double time(time) ;<br> time:units = "hours since 1-1-1 00:00:0.0" ;<br> time:long_name = "Time" ;<br> time:actual_range = 17259936., 17268672. ;<br> time:delta_t = "0000-00-01 00:00:00" ;<br> time:avg_period = "0000-00-01 00:00:00" ;<br> float lat(lat) ;<br> lat:units = "degrees_north" ;<br> lat:actual_range = 90.f, -90.f ;<br> lat:long_name = "Latitude" ;<br> float lon(lon) ;<br> lon:units = "degrees_east" ;<br> lon:long_name = "Longitude" ;<br> lon:actual_range = 0.f, 357.5f ;<br><br>// global attributes:<br> :creation_date = "Tue Sep 13 12:25:42 MDT 2016" ;<br> :Conventions = "None" ;<br> :NCL = "filwgts_lanczos: ihp=2 nWgt=201 sigma=1 fca=0.01 fcb=0.05" ;<br> :source_file = "./xBPF.nc" ;<br> :title = "Lanczos Band Pass Filtered" ;<br>}<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 13, 2016 at 7:07 AM, <span dir="ltr"><<a href="mailto:marilia.gregorio@cptec.inpe.br" target="_blank">marilia.gregorio@cptec.inpe.b<wbr>r</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Oi Denis...<br>
<br>
I did what you told to me. But when I try to open the nc file at GRADS, I have the message:<br>
<br>
"entire grid undefined" .<br>
<br>
To write an output file I did this:<br>
<br>
;*****************************<wbr>**********************<br>
; Writing OUTPUT<br>
;*****************************<wbr>**********************<br>
<br>
diro="/home2/valesca/Document<wbr>os/ncl_filtrolanczos/"<br><br>
; print(""+eof_ts)<br>
<br>
system("/bin/rm -f xBPF.nc") ; ao criar netcdf coloque sempre esta linha<br>
<br>
fout=addfile("xBPF.nc","c")<br>
<br>
;fout->xVarWinterBPF= xVarWinterBPF<br>
;fout->xVarSummerBPF=xVarSumme<wbr>rBPF<br>
;fout->yVarWinterBPF=yVarWinte<wbr>rBPF<br>
fout->xBPF=xBPF<br>
;fout-> yVarSummerBPF= yVarSummerBPF<br><br>
Thanks<br>
<br>
Marilia<span><br>
<br>
<br>
Em 2016-09-12 18:34, Dennis Shea escreveu:<br>
</span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span>
Oi Marilia<br>
<br>
[SNIP]<br>
<br>
;*****************************<wbr>*******************<br>
; create BandPass Filter<br>
;*****************************<wbr>*******************<br>
ihp = 2 ; bpf=>band pass<br>
filter => (BPF)<br>
nWgt = 201<br>
sigma = 1.0 ; Lanczos sigma<br>
fca = 1./100.<br>
fcb = 1./20.<br>
wgt = filwgts_lanczos (nWgt, ihp, fca, fcb, sigma )<br>
<br>
;*****************************<wbr>******************************<br>
; Read daily U anomalies<br>
;*****************************<wbr>******************************<br>
<br></span>
fili = "uwnd.day."+plev+".<a href="http://anomalies.1980-2005.nc" rel="noreferrer" target="_blank">anomalies.1<wbr>980-2005.nc</a> [2]"<div><div><br>
f = addfile (diri+fili , "r")<br>
TIME = f->time ; days since ...<br>
YMD = ut_calendar(TIME, -2) ; entire (time,6)<br>
<br>
iStrt = ind(YMD.eq.ymdStrt) ; index start<br>
iLast = ind(YMD.eq.ymdLast) ; index last<br>
delete(TIME)<br>
delete(YMD )<br>
<br>
x = f->U_anom(iStrt:iLast,:,:) ; U_anom_sm<br>
printVarSummary(x)<br>
printMinMax(x, True)<br>
<br>
[SNIP]<br>
<br>
;*****************************<wbr>*******************<br>
; Apply the Lanczos band pass filter weights to the original anomalies<br>
(time,lat,lon)<br>
;*****************************<wbr>*******************<br>
<br>
xBPF = wgt_runave_n_Wrap (x, wgt, 0, 0) ; BPF (Band Pass<br>
Filtered)<br>
<br>
[SNIP]<br>
<br>
==========<br>
<br>
If you do a<br>
<br>
printVarSummary(xBPF)<br>
<br>
printMinMax(xBPF,0)<br>
<br>
You will 'see' the xBPF contains the Lanczos filtered daily values.<br>
<br>
========<br>
<br>
D<br>
<br>
On Mon, Sep 12, 2016 at 12:42 PM, <<a href="mailto:marilia.gregorio@cptec.inpe.br" target="_blank">marilia.gregorio@cptec.inpe.b<wbr>r</a>><br>
wrote:<br>
<br>
</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Hello, how are you?<br>
<br>
I'm trying to use the mjoclivar_3.ncl script, but would like to<br>
generate<br>
a field filtered by lanczos of method for every day, you guys know<br>
how I<br>
do it?<br>
<br>
Thank you.<br></blockquote></blockquote></blockquote></div></div></blockquote></div></div></div></div>