<div dir="ltr"><div dir="ltr">Hi Morteza,<div>What is typically done in this situation is that an area-average of the nino4 region is calculated, and then that timeseries is used to regress against another 3D field.</div><div>For example:</div><div><div>llats = -5. ; nino4 region</div><div>llatn = 5.</div><div>llonw = 160.</div><div>llone = 210.</div><div>nino4 = wgt_areaave(sst(:,{llats:llatn},{llonw:llone}),coswgt({llats:llatn}),1.0,0) </div><div>nino4@long_name = "nino4 timeseries (monthly)" </div></div><div>RC = regCoef_n(nino4,SSTA_Tropical_Pacific,0,0)<br></div><div><br></div><div>The resulting RC array will be 2-dimensional.</div><div><br></div><div>Hope that makes sense. If you have any further questions please respond to the ncl-talk email list.</div><div>Adam </div><div><br></div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Oct 5, 2018 at 7:23 AM Morteza Qadimi <<a href="mailto:mqadimi@yahoo.com">mqadimi@yahoo.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="#954F72"><div class="m_8444345474952795120WordSection1"><p class="MsoNormal">Hi;</p><p class="MsoNormal">I need to regress tropical Pacific SST with Nino 4 region SST and then substract it from original SST of tropical Pacific. But original SSTA data are 3D (time*lat*lon) and the regressed SST anomaly array is 4D. I can’t find out what is the problem. I’ve given some info about what I’ve done.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">SSTA_Tropical_Pacific (468*11*86)<u></u><u></u></p><p class="MsoNormal">SSTA_Nino4_Region (468*6*6)<u></u><u></u></p><p class="MsoNormal">RC = regCoef_n(SSTA_Tropical_Pacific, SSTA_Nino4_Region, 0,0)<u></u><u></u></p><p class="MsoNormal">printVarSummary (RC)<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">output ----------------------<span style="font-family:Wingdings">à</span><u></u><u></u></p><p class="MsoNormal">Variable: RC12<u></u><u></u></p><p class="MsoNormal">Type: float<u></u><u></u></p><p class="MsoNormal">Total Size: 136224 bytes<u></u><u></u></p><p class="MsoNormal"> 34056 values<u></u><u></u></p><p class="MsoNormal">Number of Dimensions: 4<u></u><u></u></p><p class="MsoNormal">Dimensions and sizes: [11] x [86] x [6] x [6]<u></u><u></u></p><p class="MsoNormal">Coordinates:<u></u><u></u></p><p class="MsoNormal">Number Of Attributes: 5<u></u><u></u></p><p class="MsoNormal"> _FillValue : -9.96921e+36<u></u><u></u></p><p class="MsoNormal"> nptxy : <ARRAY of 34056 elements><u></u><u></u></p><p class="MsoNormal"> rstd : <ARRAY of 34056 elements><u></u><u></u></p><p class="MsoNormal"> yintercept : <ARRAY of 34056 elements><u></u><u></u></p><p class="MsoNormal"> tval : <ARRAY of 34056 elements><u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></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><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>