<div dir="ltr">The 2-d Fourier transform used in kf_filter assumes that the data are period in the zonal direction. That's pretty easy in the atmosphere, but not in the ocean. I think you would have to do some tapering in the x direction towards the coastlines, similar to what I had to do in time for kf_filter.<div><br></div><div>If you want to try adapting it, you can find the underlying code on your machine at <pre style="margin:0px;padding:0px;font-size:13.3333px;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0px;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">$NCARG_ROOT/lib/ncarg/nclscripts/contrib/kf_filter.ncl</pre><pre style="margin:0px;padding:0px;font-size:13.3333px;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0px;color:rgb(0,0,0);font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:left;text-transform:none;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">or </pre><pre style="margin:0px;padding:0px;line-height:12pt;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0px;text-align:left;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font color="#000000" face="courier"><span style="font-size:13.3333px"><a href="https://k3.cicsnc.org/carl/carl-ncl-library/blob/master/kf/kf_filter.ncl">https://k3.cicsnc.org/carl/carl-ncl-library/blob/master/kf/kf_filter.ncl</a><br></span></font></pre><pre style="margin:0px;padding:0px;line-height:12pt;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0px;text-align:left;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">Good luck!</font></pre><pre style="margin:0px;padding:0px;line-height:12pt;border-style:solid;border-width:0px 0px 15px;border-color:transparent;text-indent:0px;text-align:left;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><font face="arial, helvetica, sans-serif">Carl</font></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 2, 2018 at 5:17 AM, Wickramage Chathurika <span dir="ltr"><<a href="mailto:wickramagechathurika@rocketmail.com" target="_blank">wickramagechathurika@rocketmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px"><div><b>Hello,</b></div><div><br></div><div><b>I want to filter Rossby waves from zonal ocean velocities. can I use the function "kf_filter" and can I use zonal velocities to filter Rossby waves in ocean? I have tried to do and the script is below;</b></div><div><br></div><div><div><br></div><div>fi=addfile("/mnt/e/data/HYCOM/<wbr>u/<a href="http://2004_june.nc" target="_blank">2004_june.nc</a>","r")</div><div>vname=getfilevarnames(fi)</div><div>print(vname)</div><div><br></div><div>oc=fi->WATER_U(:,{0:200},{5.5}<wbr>,{76:86})</div><div>printVarSummary(oc)</div><div><br></div><div>t=fi->TIME</div><div>printMinMax(t, False)</div><div><br></div><div>obsPerDay=8</div><div>tMin=731734</div><div>tMax=731763.875</div><div>kMin = 1</div><div>kMax = 14</div><div>hMin=5</div><div>hMax=60</div><div>waveName="Kelvin"</div><div><br></div><div>x=oc(:,{40},:)</div><div>x!0="time"</div><div>x!1="lon"</div><div><br></div><div>kf=kf_filter(x(:,:), obsPerDay, tMin, tMax, kMin, kMax, hMin, hMax, waveName)</div><div><br></div><div>printMinMax(kf, False)</div><br></div><div><b>and the output information is below;</b></div><div><div><br></div><div>Variable: vname</div><div>Type: string</div><div>Total Size: 64 bytes</div><div>            8 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:   [8]</div><div>Coordinates:</div><div>(0)     LON2876_3501</div><div>(1)     LON2876_3501_bnds</div><div>(2)     LAT876_1251</div><div>(3)     LAT876_1251_bnds</div><div>(4)     LEV1_28</div><div>(5)     LEV1_28_bnds</div><div>(6)     TIME</div><div>(7)     WATER_U</div><div><br></div><div>Variable: oc</div><div>Type: float</div><div>Total Size: 2782080 bytes</div><div>            695520 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:   [TIME | 240] x [LEV1_28 | 23] x [LON2876_3501 | 126]</div><div>Coordinates:</div><div>            TIME: [731734..731763.875]</div><div>            LEV1_28: [   0.. 200]</div><div>            LON2876_3501: [  76..  86]</div><div>Number Of Attributes: 5</div><div>  LAT876_1251 : 5.51999998093</div><div>  missing_value :       -30000</div><div>  _FillValue :  -30000</div><div>  long_name :   eastward water velocity [m/s]</div><div>  history :     From 3hourly</div><div>(0)     time (days since 0001-01-01 00:00:00) : min=731734   max=731763.875</div><div>(0)     eastward water velocity [m/s] : min=-0.00192383   max=0.00160925</div><div><br></div><div><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px">P.S; When I try to filter "Mixed Rossby-Gravity" waves, all output results were "zero". In above script, I have filtered "Kelvin" waves. I really appreciate if anyone could help me to figure out this and any suggestion about how to filter "Rossby waves" is appreciated in advance.</span><br></div><div><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px"><br></span></div><div><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px">Kind Regard;</span></div><div><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px">Chathu</span></div><br></div><div><br></div></div></div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br><table border="0" cellpadding="2" cellspacing="2" style="background-color:transparent;max-width:100%;border-collapse:collapse;color:rgb(51,51,51);font-size:14px;border:3px solid rgb(170,170,170);font-family:Times;line-height:12px"><tbody><tr><td align="center" height="71" width="71"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><a href="https://ncics.org/" style="color:rgb(17,85,204)" target="_blank"><img src="https://ncics.org/ncics/img/NCICS_logo-131x131.png"></a></span></span></td><td valign="top"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><b>Carl J. Schreck III, PhD</b><br></span></span><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><b>Research Scholar</b></span></span><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><br></span></span><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif"><a href="http://ncsu.edu/" style="color:rgb(38,58,143);font-weight:bold" target="_blank">North Carolina State University</a><br></span></span><a href="https://ncics.org/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">North Carolina Institute for Climate Studies (NCICS)</a><br style="font-family:arial,helvetica,sans-serif;font-size:11px"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif">151 Patton Ave, Asheville, NC 28801<br>e: </span></span><a href="mailto:cjschrec@ncsu.edu" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">cjschrec@ncsu.edu</a><br style="font-family:arial,helvetica,sans-serif;font-size:11px"><span style="font-size:11px"><span style="font-family:arial,helvetica,sans-serif">o: <a href="tel:(828)%20257-3140" value="+18282573140" style="color:rgb(17,85,204)" target="_blank">+1 828 257 3140</a><br></span></span><span style="font-family:arial,helvetica,sans-serif;font-size:11px">c: <a href="tel:(828)%20484-1702" value="+18284841702" style="color:rgb(17,85,204)" target="_blank">+1 828 484 1702</a><br></span><a href="http://scholar.google.com/citations?hl=en&user=th8ONEcAAAAJ&view_op=list_works&sortby=pubdate" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">Publications</a><br><a href="https://ncics.org/mjo/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">ncics.org/mjo</a><br><a href="https://www.cyclonecenter.org/" style="color:rgb(38,58,143);font-family:arial,helvetica,sans-serif;font-size:11px;font-weight:bold" target="_blank">CycloneCenter.org</a><br></td></tr></tbody></table></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>