<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 class="gmail-p1" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">; spectrally filter out the field, which is prime<span class="gmail-Apple-converted-space"> </span></span><span class="gmail-s1" style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">dims=</span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">dimsizes</span><span class="gmail-s1" style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">(prime)</span></p>
<p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">nt=dims(0)</span></p>
<p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">nlev=dims(1)</span></p>
<p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">nlat=dims(2)</span></p>
<p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">nlon=dims(3)</span></p>
<p class="gmail-p3" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">N = nlat</span></p>
<p class="gmail-p1" 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 class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">if</span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> (nlon%2 </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">.eq.</span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">0) </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">then</span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><span class="gmail-Apple-converted-space"> </span></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">; note % is NCL's modulus operator <span class="gmail-Apple-converted-space"> </span></span><span class="gmail-s1" style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">N = </span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">min</span><span class="gmail-s1" style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">(</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">(/</span><span class="gmail-s1" style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures"> nlat, (nlon+2)/2 </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">/)</span><span class="gmail-s1" style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">)</span></p>
<p class="gmail-p1" 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 class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">else</span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"><span class="gmail-Apple-converted-space"> </span></span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">; nlon must be odd <span class="gmail-Apple-converted-space"> </span></span><span class="gmail-s1" style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">N = </span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">min</span><span class="gmail-s1" style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">(</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">(/</span><span class="gmail-s1" style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures"> nlat, (nlon+1)/2 </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">/)</span><span class="gmail-s1" style="color:rgb(0,0,0);font-variant-ligatures:no-common-ligatures">)</span></p>
<p class="gmail-p4" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">end</span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)"> </span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">if</span></p>
<p class="gmail-p3" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">T<span class="gmail-Apple-converted-space"> </span>= 31</span></p>
<p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">a = </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">new</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> ( </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">(/</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">nt,nlev,nlat,N</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">/)</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">, </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">float</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">)</span></p>
<p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">b = </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">new</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> ( </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">(/</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">nt,nlev,nlat,N</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">/)</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">, </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">float</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">)</span></p>
<p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">h = </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">new</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> ( </span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">(/</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">nt,nlev,nlat,nlon</span><span class="gmail-s3" style="font-variant-ligatures:no-common-ligatures;color:rgb(194,0,255)">/)</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">, </span><span class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">typeof</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(prime))</span></p>
<p class="gmail-p5" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">copy_VarMeta</span><span class="gmail-s4" style="font-variant-ligatures:no-common-ligatures;color:rgb(0,0,0)">(prime,h)</span></p>
<p class="gmail-p3" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span><br></p>
<p class="gmail-p2" 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 class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">shaec</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(prime,a(:,:,:,0:N-1),b(:,:,:,0:N-1))</span></p>
<p class="gmail-p2" 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 class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">exp_tapersh</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"> (a, b, T, 5)</span></p>
<p class="gmail-p2" 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 class="gmail-s2" style="font-variant-ligatures:no-common-ligatures;color:rgb(64,11,217)">shsec</span><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">(a(:,:,:,0:N-1),b(:,:,:,0:N-1),h)</span></p><p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p><p class="gmail-p2" 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 class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></p></div></div>