<div>Thanks Will,</div><div><br></div><div>I think you've hit close to home. The first time step of the original fields, which are auto-covariances computed with escovc along the multimodel ensemble dimension, is shown in the attached plot. The resulting field is largely empty for the zonal wind stress and for the wind stress curl; their time auto-covariance is even emptier. Not surprisingly, the EOFs for those two variables are blank. MSLP and TAS look fine instead. Probably there is nothing wrong with eofunc, the problem is the input field.</div><div><br></div><div>Cheers,</div><div>Giorgio<br></div>
<br>
<blockquote>
----Messaggio originale----
<br> Da: will.hobbs@utas.edu.au
<br> Data: 31-mar-2021 0.55
<br> A: "Giorgio Graffino"<g.graffino@tim.it>, "ncl-talk@ucar.edu"<ncl-talk@ucar.edu>
<br> Ogg: Re: [ncl-talk] eofunc giving empty eigenvalues
<br>
<br>
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language: EN-US;">Hi Giorgio
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language: EN-US;">
<o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language: EN-US;">I don’t know the specific LAPACK code too well, but this could happen because of weak/zero covariances. There are a couple of things you may need to check with your data (if you haven’t already done so) ;
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language: EN-US;">
<o:p>
</o:p></span></p>
<ol style="margin-top: 0.0cm;" type="1" start="1">
<li class="MsoListParagraph" style="margin-left: 0.0cm;mso-list: l0 level1 lfo1;"><span style="mso-fareast-language: EN-US;">Is it possible you have too many data points with no variance at all (e.g. land masked, or too many repeating values)
<o:p></o:p></span></li>
<li class="MsoListParagraph" style="margin-left: 0.0cm;mso-list: l0 level1 lfo1;"><span style="mso-fareast-language: EN-US;">The data is just white/red noise, which again will give very low covariances
<o:p></o:p></span></li>
</ol>
<p class="MsoNormal"><span style="mso-fareast-language: EN-US;">
<o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language: EN-US;">As you say, you’re masking out those weak/zero covariances, but have you checked to see how many actual values are left?
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language: EN-US;">
<o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language: EN-US;">Will
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language: EN-US;">
<o:p>
</o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language: EN-US;">
<o:p>
</o:p></span></p>
<div style="border: none;border-top: solid rgb(181,196,223) 1.0pt;padding: 3.0pt 0.0cm 0.0cm 0.0cm;">
<p class="MsoNormal"><b><span style="font-size: 12.0pt;color: black;">From: </span></b><span style="font-size: 12.0pt;color: black;">ncl-talk <ncl-talk-bounces@mailman.ucar.edu> on behalf of Giorgio Graffino via ncl-talk <ncl-talk@mailman.ucar.edu><br><b>Reply to: </b>Giorgio Graffino <g.graffino@tim.it><br><b>Date: </b>Wednesday, 31 March 2021 at 2:34 am<br><b>To: </b>"ncl-talk@ucar.edu" <ncl-talk@ucar.edu><br><b>Subject: </b>[ncl-talk] eofunc giving empty eigenvalues
<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal">
<o:p>
</o:p></p>
</div>
<div>
<p class="MsoNormal">Dear NCL people,
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">
<o:p>
</o:p></p>
</div>
<div>
<p class="MsoNormal">I'm struggling at computing the EOFs of a zonal wind stress field. I'm always getting this warning from the eofunc functions:
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">
<o:p>
</o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family: "Courier New";color: black;background: white;">Warning! LAPACK routine returned eigenvalue <= 0. </span><span style="font-family: "Courier New";"><br> Setting it to zero...<br><br></span>I've seen that the original LAPACK's dspevx function sets a 1.e-6 threshold for computing EOFs; if there is a value below that threshold, zero EOFs are returned (<a href="https://github.com/yyr/ncl/blob/master/ni/src/lib/nfpfort/eof_scripps.f">https://github.com/yyr/ncl/blob/master/ni/src/lib/nfpfort/eof_scripps.f</a>). I'm using the where function to set all values below 1.e-6 as fill values (something like taux = where(taux.le.1.e-6,taux@_FillValue,taux)) before the eofunc function is called, yet I'm getting the same warning and the same empty EOFs. Is there anything else I'm missing?
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">
<o:p>
</o:p></p>
</div>
<div>
<p class="MsoNormal">Thanks,
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Giorgio
<o:p></o:p></p>
</div>
</div>
<p style="font-size: 10.0pt;line-height: 10.0pt;font-family: Calibri , sans-serif;"><br><br> This email is confidential, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone outside the intended recipient organisation is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender. The views expressed in this email are not necessarily the views of the University of Tasmania, unless clearly intended otherwise.</p>
<br>
</blockquote>
<br>