<div dir="ltr"><div>I see nothing wrong with the code segment.</div><div><br></div><div>Can you send me a simple version of your code?</div><div>Also, make the file available via (say) dropbox or ftp?</div><div><br></div><div>ftp <a href="http://ftp.cgd.ucar.edu">ftp.cgd.ucar.edu</a></div><div>anonymous</div><div>your_email</div><div>cd incoming</div><div>put the_data_file</div><div>quit</div><div><br></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 15, 2021 at 7:06 PM Hui Ding via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear Sir or Madam, <div>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. </div><div>Thank you very much!</div><div>Best regards, </div><div>Hui </div><div><br></div><div><br></div><div>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(203,36,24)"><span style="font-variant-ligatures:no-common-ligatures">; spectrally filter out the field, which is prime<span> </span></span><span style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">dims=</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">dimsizes</span><span style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">(prime)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">nt=dims(0)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">nlev=dims(1)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">nlat=dims(2)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">nlon=dims(3)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:19px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">N = nlat</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(203,36,24)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">if</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> (nlon%2 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">.eq.</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">0) </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">then</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><span> </span></span><span style="font-variant-ligatures:no-common-ligatures">; note % is NCL's modulus operator <span> </span></span><span style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">N = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">min</span><span style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">(/</span><span style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures"> nlat, (nlon+2)/2 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">/)</span><span style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(203,36,24)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">else</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><span> </span></span><span style="font-variant-ligatures:no-common-ligatures">; nlon must be odd <span> </span></span><span style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">N = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">min</span><span style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">(</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">(/</span><span style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures"> nlat, (nlon+1)/2 </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">/)</span><span style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(194,0,255)"><span style="font-variant-ligatures:no-common-ligatures">end</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span style="font-variant-ligatures:no-common-ligatures">if</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:19px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">T<span> </span>= 31</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">a = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">new</span><span style="font-variant-ligatures:no-common-ligatures"> ( </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">(/</span><span style="font-variant-ligatures:no-common-ligatures">nt,nlev,nlat,N</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">/)</span><span style="font-variant-ligatures:no-common-ligatures">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">float</span><span style="font-variant-ligatures:no-common-ligatures">)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">b = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">new</span><span style="font-variant-ligatures:no-common-ligatures"> ( </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">(/</span><span style="font-variant-ligatures:no-common-ligatures">nt,nlev,nlat,N</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">/)</span><span style="font-variant-ligatures:no-common-ligatures">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">float</span><span style="font-variant-ligatures:no-common-ligatures">)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures">h = </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">new</span><span style="font-variant-ligatures:no-common-ligatures"> ( </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">(/</span><span style="font-variant-ligatures:no-common-ligatures">nt,nlev,nlat,nlon</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">/)</span><span style="font-variant-ligatures:no-common-ligatures">, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">typeof</span><span style="font-variant-ligatures:no-common-ligatures">(prime))</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(97,182,180)"><span style="font-variant-ligatures:no-common-ligatures">copy_VarMeta</span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">(prime,h)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0);min-height:19px"><span style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">shaec</span><span style="font-variant-ligatures:no-common-ligatures">(prime,a(:,:,:,0:N-1),b(:,:,:,0:N-1))</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">exp_tapersh</span><span style="font-variant-ligatures:no-common-ligatures"> (a, b, T, 5)</span></p>
<p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">shsec</span><span style="font-variant-ligatures:no-common-ligatures">(a(:,:,:,0:N-1),b(:,:,:,0:N-1),h)</span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p><p style="margin:0px;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:16px;line-height:normal;font-family:Menlo;color:rgb(0,0,0)"><span style="font-variant-ligatures:no-common-ligatures"><br></span></p></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>