[ncl-talk] lanczos filter

marilia.gregorio at cptec.inpe.br marilia.gregorio at cptec.inpe.br
Tue Sep 13 07:07:09 MDT 2016


Oi Denis...

I did what you told to me. But when I try to open the nc file at GRADS, 
I have the message:

"entire grid undefined" .

To write an output file I did this:

;***************************************************
; Writing OUTPUT
;***************************************************

        diro="/home2/valesca/Documentos/ncl_filtrolanczos/"


;      print(""+eof_ts)

       system("/bin/rm -f xBPF.nc") ; ao criar netcdf coloque sempre esta 
linha

       fout=addfile("xBPF.nc","c")

       ;fout->xVarWinterBPF= xVarWinterBPF
       ;fout->xVarSummerBPF=xVarSummerBPF
       ;fout->yVarWinterBPF=yVarWinterBPF
       fout->xBPF=xBPF
       ;fout-> yVarSummerBPF= yVarSummerBPF


Thanks

Marilia


Em 2016-09-12 18:34, Dennis Shea escreveu:
> Oi Marilia
> 
> [SNIP]
> 
> ;************************************************
> ; create BandPass Filter
> ;************************************************
>   ihp      = 2                                    ; bpf=>band pass
> filter => (BPF)
>   nWgt     = 201
>   sigma    = 1.0                              ; Lanczos sigma
>   fca      = 1./100.
>   fcb      = 1./20.
>   wgt      = filwgts_lanczos (nWgt, ihp, fca, fcb, sigma )
> 
> ;***********************************************************
> ; Read daily U anomalies
> ;***********************************************************
> 
>    fili    = "uwnd.day."+plev+".anomalies.1980-2005.nc [2]"
>    f       = addfile (diri+fili , "r")
>    TIME    = f->time                          ; days since ...
>    YMD     = ut_calendar(TIME, -2)            ; entire (time,6)
> 
>    iStrt   = ind(YMD.eq.ymdStrt)              ; index start
>    iLast   = ind(YMD.eq.ymdLast)              ; index last
>    delete(TIME)
>    delete(YMD )
> 
>    x       = f->U_anom(iStrt:iLast,:,:)       ; U_anom_sm
>    printVarSummary(x)
>    printMinMax(x, True)
> 
>  [SNIP]
> 
> ;************************************************
> ; Apply the Lanczos band pass filter weights to the original anomalies
> (time,lat,lon)
> ;************************************************
> 
>   xBPF = wgt_runave_n_Wrap (x, wgt, 0, 0)     ; BPF (Band Pass
> Filtered)
> 
> [SNIP]
> 
> ==========
> 
> If you do a
> 
>   printVarSummary(xBPF)
> 
>   printMinMax(xBPF,0)
> 
> You will 'see' the xBPF contains the Lanczos filtered daily values.
> 
> ========
> 
> D
> 
> On Mon, Sep 12, 2016 at 12:42 PM, <marilia.gregorio at cptec.inpe.br>
> wrote:
> 
>> Hello, how are you?
>> 
>> I'm trying to use the mjoclivar_3.ncl script, but would like to
>> generate
>> a field filtered by lanczos of method for every day, you guys know
>> how I
>> do it?
>> 
>> Thank you.
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk [1]
> 
> 
> 
> Links:
> ------
> [1] http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> [2] http://anomalies.1980-2005.nc


More information about the ncl-talk mailing list