<div dir="ltr">&quot;entire grid undefined&quot; 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">&lt;<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>&gt;</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 &#39;my&#39; script to produce the netCDF. &#39;ncdump -h&#39; 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 = &quot;Anomalies: mean Daily U-wind&quot; ;<br>        xBPF:units = &quot;m/s&quot; ;<br>        xBPF:wgt_runave_op_ncl = &quot;wgt_runave_n&quot; ;<br>    double time(time) ;<br>        time:units = &quot;hours since 1-1-1 00:00:0.0&quot; ;<br>        time:long_name = &quot;Time&quot; ;<br>        time:actual_range = 17259936., 17268672. ;<br>        time:delta_t = &quot;0000-00-01 00:00:00&quot; ;<br>        time:avg_period = &quot;0000-00-01 00:00:00&quot; ;<br>    float lat(lat) ;<br>        lat:units = &quot;degrees_north&quot; ;<br>        lat:actual_range = 90.f, -90.f ;<br>        lat:long_name = &quot;Latitude&quot; ;<br>    float lon(lon) ;<br>        lon:units = &quot;degrees_east&quot; ;<br>        lon:long_name = &quot;Longitude&quot; ;<br>        lon:actual_range = 0.f, 357.5f ;<br><br>// global attributes:<br>        :creation_date = &quot;Tue Sep 13 12:25:42 MDT 2016&quot; ;<br>        :Conventions = &quot;None&quot; ;<br>        :NCL = &quot;filwgts_lanczos: ihp=2 nWgt=201 sigma=1 fca=0.01  fcb=0.05&quot; ;<br>        :source_file = &quot;./xBPF.nc&quot; ;<br>        :title = &quot;Lanczos Band Pass Filtered&quot; ;<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">&lt;<a href="mailto:marilia.gregorio@cptec.inpe.br" target="_blank">marilia.gregorio@cptec.inpe.b<wbr>r</a>&gt;</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>
&quot;entire grid undefined&quot; .<br>
<br>
To write an output file I did this:<br>
<br>
;*****************************<wbr>**********************<br>
; Writing OUTPUT<br>
;*****************************<wbr>**********************<br>
<br>
       diro=&quot;/home2/valesca/Document<wbr>os/ncl_filtrolanczos/&quot;<br><br>
;      print(&quot;&quot;+eof_ts)<br>
<br>
      system(&quot;/bin/rm -f xBPF.nc&quot;) ; ao criar netcdf coloque sempre esta linha<br>
<br>
      fout=addfile(&quot;xBPF.nc&quot;,&quot;c&quot;)<br>
<br>
      ;fout-&gt;xVarWinterBPF= xVarWinterBPF<br>
      ;fout-&gt;xVarSummerBPF=xVarSumme<wbr>rBPF<br>
      ;fout-&gt;yVarWinterBPF=yVarWinte<wbr>rBPF<br>
      fout-&gt;xBPF=xBPF<br>
      ;fout-&gt; 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=&gt;band pass<br>
filter =&gt; (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    = &quot;uwnd.day.&quot;+plev+&quot;.<a href="http://anomalies.1980-2005.nc" rel="noreferrer" target="_blank">anomalies.1<wbr>980-2005.nc</a> [2]&quot;<div><div><br>
   f       = addfile (diri+fili , &quot;r&quot;)<br>
   TIME    = f-&gt;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-&gt;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 &#39;see&#39; the xBPF contains the Lanczos filtered daily values.<br>
<br>
========<br>
<br>
D<br>
<br>
On Mon, Sep 12, 2016 at 12:42 PM, &lt;<a href="mailto:marilia.gregorio@cptec.inpe.br" target="_blank">marilia.gregorio@cptec.inpe.b<wbr>r</a>&gt;<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&#39;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>