<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.br</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc 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>
<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>
<br>
Thanks<br>
<br>
Marilia<span class=""><br>
<br>
<br>
Em 2016-09-12 18:34, Dennis Shea escreveu:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
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 class="h5"><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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
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>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
</div></div><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a> [1]<br>
</blockquote>
<br>
<br>
<br>
Links:<br>
------<br>
[1] <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
[2] <a href="http://anomalies.1980-2005.nc" rel="noreferrer" target="_blank">http://anomalies.1980-2005.nc</a><br>
</blockquote>
</blockquote></div><br></div>