<div dir="ltr"><p>
The script<b> </b>would require a substantive time investment to understand it.</p><p>---<br></p><p><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/filwgts_lanczos.shtml"><b>filwgts_lanczos</b></a><br></p><p><b>---<br></b></p><p><b>re: <span lang="EN-GB">"As far I understand Lanczos filter by default
replace missing values with fill value."</span></b><span lang="EN-GB">. <br></span></p><p><span lang="EN-GB">NCL has a nice feature where upon input if a variable has a missing_value attribute and no _FillValue attribute, NCL will 'dynamically' add a _FillValue attribute. I believe that CRU datasets have both _FillValue and missing_value attributes so this language feature is not applied.<br></span></p><p><span lang="EN-GB">The Lanczos filter only recognizes the _FillValue attribute. <br></span></p><p><span lang="EN-GB">ncl 0>     nwt = 9<br>ncl 1>     fca = 0.2<br>ncl 2>     ihp = 0          <br>ncl 3>     nsigma = 1.<br>ncl 4>     wgt = <b>filwgts_lanczos</b> (nwt, ihp, fca, -999., nsigma)  <br>ncl 5>     N = 120               <br>ncl 6>     x = <b>random_normal</b>(0,5,N)<br>ncl 7>     xFilter = <b>wgt_runave</b> ( x, wgt, 0 )         <br>ncl 8>     print(x+"   "+xFilter)<br></span></p><p><span lang="EN-GB">(0)     4.35164   <b>9.96921e+36</b><br>(1)     4.36462   9.96921e+36<br>(2)     9.73397   9.96921e+36<br>(3)     4.91265   9.96921e+36<br>(4)     1.76982   1.85172<br>(5)     -0.634983   -0.730493<br>(6)     -4.29466   -0.420796</span></p><p><span lang="EN-GB">[SNIP]</span></p><p><span lang="EN-GB">(114)   -0.780523   0.369537<br>(115)   -5.00307   -1.90461<br>(116)   3.39464   <b>9.96921e+36</b><br>(117)   -5.93985   9.96921e+36<br>(118)   -1.86471   9.96921e+36<br>(119)   -2.42371   9.96921e+36<br></span></p><p><span lang="EN-GB">So the beginning and ending (nwgt/2=4) of the filtered series are padded with _FillValue.<br></span></p><p><span lang="EN-GB">Since NCL's SVD does not allow _FillValue, you must input just the temporal segment that has no _FillValue.</span></p><p><span lang="EN-GB">===========<br></span></p><p><b></b></p><p><b>PLEASE NOTE: </b> Cherry (1996) discusses Singular Value Decomposition (SVD) and Canonical Correlation Analysis (CCA). 
Cherry's summary comment is: "Both methods have a high potential to produce spurious spatial patterns. 
Caution is always called for in interpreting results from either method." Newman and Sardeshmukh (1995) 
came to a similar conclusion in their paper which focused on SVD: "These results suggest that any physical
interpretation of SVD pairs may be unjustified."
</p><pre><b>REFERENCES:</b>

Cherry, S. (1996): <a href="https://doi.org/10.1175/1520-0442(1996)009<2003:SVDAAC>2.0.CO;2"> <b>Singular Value Decomposition Analysis and Canonical Correlation Analysis</b></a>. 
J. Climate: pp 2003-2009.

Newman, M. and Sardeshmukh, P.D. (1995): <a href="https://doi.org/10.1175/1520-0442(1995)008<0352:ACCSVD>2.0.CO;2"><b>A Caveat Concerning Singular Value Decomposition</b></a> 
J. Climate: pp 352-360.
</pre></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 11, 2019 at 5:44 AM dickson mbigi via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@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"><p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">Dear concerned expert(s),</span></p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">I am running decadal SVD between rainfall and SST. The script (attached)
works well without filtering(smoothing) but once Lanczos low pass filter is
applied I get the following error.  The
problem occur in the place of dealing with missing values because the variable
NMS1 has  [1]dimensions and  sizes . Without filtering NMS1 had [657].  As far I understand Lanczos filter by default
replace missing values with fill value. Could be that be the reason and if that
is the case how could I run the SVD without the aspect of missing values?</span></p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">Any help/guidance will highly be appreciated.</span></p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB"> </span></p><p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB"></span></p><div><img src="cid:ii_k41abqxn1" alt="image.png" width="542" height="154"><br></div><p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">Regards,</span></p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">Dickson Mbigi,</span></p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">Institute of Atmospheric Physics,</span></p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">University of Chinese Academy of Sciences,</span></p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-GB">Beijing, China.</span></p></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailman/listinfo/ncl-talk</a></blockquote></div>