<div dir="ltr"><div>As we have said before, you must read the error message and then look at the function being called and the day being used. Further, looking at the Examples helps a lot.<br><br>===<br><span style="color:rgb(255,0,0)">fatal:esccr: the rightmost dimension of x and y must be the same<br>fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 141 in file ccr.ncl<br>===<br><br></span></div><span style="color:rgb(255,0,0)">look at line 141<br><br>ccr = esccr(ts1,ts2,maxlag)                   ; calc cross correlations<br><br clear="all"></span><div><div><div><div class="gmail-m_1846718283174335763gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>at lines 133,134, you have<br><br>  ts1 = data_single(:)<br>  ts2 = data_subset(:,:,:)<br><br><b><span style="color:rgb(255,0,0)">Variable: data_single</span>      ==> ts1<br>Dimensions and sizes:    [time | 96]</b><br><br><b><span style="color:rgb(255,0,0)">Variable: data_subset</span>      ==> ts2<br>Dimensions and sizes:    [time | 96] x [lat | 1185] x [lon | 1071]<br><br></b></div><div>As noted in the function documentation,<br><em>x</em>: An array of any numeric type or size. The rightmost dimension is usually time.
<em></em>
<em><br><br>y: </em>An array of any numeric type or size. The rightmost dimension is usually time. 
<span style="color:rgb(0,0,255)"><b>The size of the rightmost dimension must be the same as <em>x</em>.
</b></span>
<p class="gmail-indent">====</p><p class="gmail-indent">Clearly. the "rightmost" dimension of 'ts1' [size=1071'] does not match the size of ts1' [size=96]<br></p><p class="gmail-indent"> Example 2 in the documentation, show how the address this situation. Use, NCL's dimension reordering:<br></p><p class="gmail-indent">ccr = esccr(ts1,ts2(lat|:,lon|:,time|:), maxlag)<br></p><br></div><div><b></b></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 23, 2018 at 4:07 AM, Kunal Bali <span dir="ltr"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Dear NCL user,<br><br></div>I am using the attached script to calculate the cross-correlation between single grid cell to neighbor grid cells with time. <br></div><br><div><div><div>I am getting an error<br><span style="color:rgb(255,0,0)">fatal:esccr: the rightmost dimension of x and y must be the same<br>fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 141 in file ccr.ncl<br><br clear="all"></span><div><div><div class="m_1846718283174335763gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>---</div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>The summary is here:<br><br><br></div><div> <b>Copyright (C) 1995-2017 - All Rights Reserved<br> University Corporation for Atmospheric Research<br> NCAR Command Language Version 6.4.0<br> The use of this software is governed by a License Agreement.<br> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.<br><br>Variable: totc<br>Type: float<br>Total Size: <a href="tel:(202)%20508-6976" value="+12025086976" target="_blank">2025086976</a> bytes<br>            506271744 values<br>Number of Dimensions: 3<br>Dimensions and sizes:    [time | 96] x [lat | 2112] x [lon | 2497]<br>Coordinates: <br>            time: [35430.125..104813.7916666667]<br>            lat: [5.0078125..37.9921875]<br>            lon: [  59..  98]<br>Number Of Attributes: 8<br>  long_name :    AOT at 0.55 micron<br>  hdfeos_name :    Optical_Depth_055<br>  projection :    Albers Conical Equal_Area<br>  unit :    None<br>  _FillValue_original :    -28672<br>  _FillValue :    -28672<br>  missing_value_original :    -28672<br>  missing_value :    -28672<br><br><span style="color:rgb(255,0,0)">Variable: data_subset</span><br>Type: float<br>Total Size: 487347840 bytes<br>            121836960 values<br>Number of Dimensions: 3<br>Dimensions and sizes:    [time | 96] x [lat | 1185] x [lon | 1071]<br>Coordinates: <br>            time: [35430.125..104813.7916666667]<br>            lat: [23.5078125..5.0078125]<br>            lon: [72.78125..89.5]<br>Number Of Attributes: 8<br>  missing_value :    -28672<br>  missing_value_original :    -28672<br>  _FillValue :    -28672<br>  _FillValue_original :    -28672<br>  unit :    None<br>  projection :    Albers Conical Equal_Area<br>  hdfeos_name :    Optical_Depth_055<br>  long_name :    AOT at 0.55 micron<br>(0)    nearest location: k=0  n=541 m=1291  13.4609375  79.17187499999999<br>(0)    -----<br><br><span style="color:rgb(255,0,0)">Variable: data_single</span><br>Type: float<br>Total Size: 384 bytes<br>            96 values<br>Number of Dimensions: 1<br>Dimensions and sizes:    [time | 96]<br>Coordinates: <br>            time: [35430.125..104813.7916666667]<br>Number Of Attributes: 10<br>  lon :    79.171875<br>  lat :    13.4609375<br>  missing_value :    -28672<br>  missing_value_original :    -28672<br>  _FillValue :    -28672<br>  _FillValue_original :    -28672<br>  unit :    None<br>  projection :    Albers Conical Equal_Area<br>  hdfeos_name :    Optical_Depth_055<br>  long_name :    AOT at 0.55 micron<br>(0)    -----</b><br><span style="color:rgb(255,0,0)">fatal:esccr: the rightmost dimension of x and y must be the same<br>fatal:["Execute.c":8640]:<wbr>Execute: Error occurred at or near line 141 in file ccr.ncl</span><br clear="all"><div><div><div class="m_1846718283174335763gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><br><br>---<br></div><div><font size="2"><span>Kunal Bali<br></span></font></div><br><div><br></div><div><p style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div></div></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></div>