[ncl-talk] how to spectrally filter the field by the Sardeshmukh and Hoskins approach

Dennis Shea shea at ucar.edu
Wed Jun 16 07:37:49 MDT 2021


I see nothing wrong with the code segment.

Can you send me a simple version of your code?
Also, make the file available via (say) dropbox or ftp?

ftp ftp.cgd.ucar.edu
anonymous
your_email
cd incoming
put the_data_file
quit




On Tue, Jun 15, 2021 at 7:06 PM Hui Ding via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear Sir or Madam,
> I am trying to filter out some small-scale waves using the method by the
> Sardeshmukh and Hoskins approach. Unfortunately, there is no change at all
> after filtering out the field. Did I miss anything or did I do anything
> wrong? Please see my code of filtering below.
> Thank you very much!
> Best regards,
> Hui
>
>
> ; spectrally filter out the field, which is prime    dims=dimsizes(prime)
>
> nt=dims(0)
>
> nlev=dims(1)
>
> nlat=dims(2)
>
> nlon=dims(3)
>
>
> N = nlat
>
> if (nlon%2 .eq.0) then    ; note % is NCL's modulus operator
>                                    N = min((/ nlat, (nlon+2)/2 /))
>
> else                      ; nlon must be odd            N = min((/ nlat,
> (nlon+1)/2 /))
>
> end if
>
>
> T  = 31
>
> a = new ( (/nt,nlev,nlat,N/), float)
>
> b = new ( (/nt,nlev,nlat,N/), float)
>
> h = new ( (/nt,nlev,nlat,nlon/), typeof(prime))
>
> copy_VarMeta(prime,h)
>
>
> shaec(prime,a(:,:,:,0:N-1),b(:,:,:,0:N-1))
>
> exp_tapersh (a, b, T, 5)
>
> shsec(a(:,:,:,0:N-1),b(:,:,:,0:N-1),h)
>
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210616/6b8d1b82/attachment.html>


More information about the ncl-talk mailing list