<div dir="ltr"><div>Those array summaries are helpful, thanks.  It looks like the original program assumed that all three input files are on exactly the same grid.  However, you can see that your U and V files have one extra longitude, compared to OLR.  This caused the dimension error.</div><div><br></div><div>You will need all three variables on the same grid because they are involved in common calculations, later in the program.  Fortunately in this case, it is unusually easy to make U and V on (0...360) align to OLR on (0...357.5), because all the longitudes are exactly the same, except for the extra OLR longitude at 360.  Simply remove the extra longitude by subsetting at the right places in the program.</div><div><br></div><div>Here is one way to do it (untested).  Use the reassignment operator <b>(:=)</b> to avoid conflicts with the preceding use of "work", then add a new line to subset the array to a conforming grid alignment.  Repeat this for V as well as U.</div><div><br></div><div><div>ncl 75>    work    = read_rename(f,"OLR_anom",iStrt,iLast,latS,latN) ; (time,lat,lon)<br>ncl 76>    OLR     = dim_avg_n_Wrap(work, 1)                         ; (time,lon)<br>ncl 77><br>dncl 78>    f       = addfile (diri+filu850 , "r")                        <br>ncl 79>   <b> work    := read_rename(f,"U_anom",iStrt,iLast,latS,latN) ; (time,lat,lon)</b></div><div>++++++   <b>work    := work(:,:,{0:357.5})</b><br></div><div>ncl 80>    U850    = dim_avg_n_Wrap(work, 1)          ; (time,lon)</div></div><div><br></div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 30, 2019 at 12:16 AM reza tisa <<a href="mailto:rezatisa1@gmail.com" target="_blank">rezatisa1@gmail.com</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"><div style="border-left:none;padding:0px;display:flex;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div style="margin:0px;padding:0px 0px 20px;width:950px"><div><div id="m_2874599697811043091gmail-m_-2566814312429221347m_3439363234530467693gmail-:or" style="font-size:0.875rem;direction:ltr;margin:8px 0px 0px;padding:0px"><div id="m_2874599697811043091gmail-m_-2566814312429221347m_3439363234530467693gmail-:oq" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif"><div>This is what i got, but sorry i still dont get what should i do</div><div>Script mjoclivar_14:</div><div><a href="https://drive.google.com/open?id=1UdrtSvNioUmbkL3xuwF_QZbRrkNlEfCr" target="_blank">https://drive.google.com/open?id=1UdrtSvNioUmbkL3xuwF_QZbRrkNlEfCr</a>  <br></div><div><br></div><div><div dir="ltr">printVarSummary (work)<br>printVarSummary (read_rename(f,"U_anom",iStrt,iLast,latS,latN))</div><div dir="ltr"><br></div></div><div dir="ltr">Variable: work<br>Type: float<br>Total Size: 10939968 bytes<br>            2734992 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [time | 1461] x [lat | 13] x [lon | 144]<br>Coordinates:<br>            time: [1884648..1919688]<br>            lat: [-15..15]<br>            lon: [ 0..357.5]<br>Number Of Attributes: 3<br>  units : W/m^2<br>  long_name : Anomalies: Daily OLR<br>  _FillValue : 32766<br><br>Variable: unnamed (return)<br>Type: float<br>Total Size: 11015940 bytes<br>            2753985 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [time | 1461] x [lat | 13] x [lon | 145]<br>Coordinates:<br>            time: [   0..2102400]<br>            lat: [ -15..  15]<br>            lon: [   0.. 360]<br>Number Of Attributes: 2<br>  long_name : Anomalies from Daily Climatology<br>  _FillValue : -9.99e+08<br>fatal:Dimension sizes of left hand side and right hand side of assignment do not match<br>fatal:["Execute.c":8635]:Execute: Error occurred at or near line 82<br><br><div><br></div><div>ncl 74><br>ncl 75>    work    = read_rename(f,"OLR_anom",iStrt,iLast,latS,latN) ;(time,lat,lon)<br>ncl 76>    OLR     = dim_avg_n_Wrap(work, 1)                         ; (time,lon)<br>ncl 77><br> ncl 78>    f       = addfile (diri+filu850 , "r")<br>ncl 79> printVarSummary (work)<br>ncl 80> printVarSummary (read_rename(f,"U_anom",iStrt,iLast,latS,latN))<br>ncl 81>                        <br>ncl 82>    work    = read_rename(f,"U_anom",iStrt,iLast,latS,latN) ; (time,lat,lon)<br>ncl 83>    U850    = dim_avg_n_Wrap(work, 1)          ; (time,lon)<div></div><div><br></div></div></div><div></div></div></div><div style="border-bottom-left-radius:1px;border-bottom-right-radius:1px;padding:0px;width:auto;background:rgb(242,242,242);margin:0px"></div></div></div><div style="clear:both"><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Pada tanggal Sen, 30 Des 2019 pukul 12.55 Dave Allured - NOAA Affiliate <<a href="mailto:dave.allured@noaa.gov" target="_blank">dave.allured@noaa.gov</a>> menulis:<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"><div dir="ltr"><div dir="ltr"><div dir="ltr">We need to show you how to debug, instead of just giving you the answer.  Whenever you get this ...</div><div dir="ltr"><br><b>"Dimension sizes of left hand side and right hand side of assignment do not match"</b><br><br>... then you need to show printVarSummary of the left hand and right hand sides, NOT the original data.  Here you would add two statements between lines 78 and 79, because the program breaks on line 79.<br><br>printVarSummary (work)<br>printVarSummary (read_rename(f,"U_anom",iStrt,iLast,latS,latN))</div><div dir="ltr"><br></div><div>Line 79 will work only if all dimensions are exactly the same size, between left and right.  Now you will need to explain why one or more of the dimension sizes are different here.</div><div><br></div><div>Note to others:  There is more going on here than just "use the reassignment operator".</div><div dir="ltr"><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Dec 29, 2019 at 10:20 PM reza tisa via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">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"><div>Hello NCL User, I really need help for doing mjoclivar_14.</div><div>I already success on doing mjoclivar_2 to get data anomalies for <b>OLR and zonal wind</b> (uwnd 200 hPa & uwnd 850 hPa) for 2015-2018.</div><div>This is my data :</div><div>My mjoclivar_14 script : </div><div><div style="margin:0px;padding:0px 0px 20px;width:950px;font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:medium"><div><div id="m_2874599697811043091gmail-m_-2566814312429221347gmail-m_3439363234530467693gmail-m_3152465916386125450gmail-m_6078019259303897469gmail-:1ff" style="font-size:0.875rem;direction:ltr;margin:8px 0px 0px;padding:0px"><div id="m_2874599697811043091gmail-m_-2566814312429221347gmail-m_3439363234530467693gmail-m_3152465916386125450gmail-m_6078019259303897469gmail-:1fe" style="overflow:hidden;font-variant-numeric:normal;font-variant-east-asian:normal;font-stretch:normal;font-size:small;line-height:1.5;font-family:Arial,Helvetica,sans-serif"><div dir="ltr"><a href="https://drive.google.com/open?id=0B6v1GPWVNcu7eGo0V0J0VTlpNmstYTFFVmJiVGpRTGdXdlBj" target="_blank">https://drive.google.com/open?id=0B6v1GPWVNcu7eGo0V0J0VTlpNmstYTFFVmJiVGpRTGdXdlBj</a>OLR anomalies</div></div></div></div></div></div><div><div>Original mjoclivar_14 script :</div><div><a href="https://www.ncl.ucar.edu/Applications/Scripts/mjoclivar_14.ncl" target="_blank">https://www.ncl.ucar.edu/Applications/Scripts/mjoclivar_14.ncl</a> </div><div>OLR anomalies : <br></div><div><a href="https://drive.google.com/open?id=1lgzfmmadfmXUWkUT1n8DAsTbvp0oQ-Fc" target="_blank">https://drive.google.com/open?id=1lgzfmmadfmXUWkUT1n8DAsTbvp0oQ-Fc</a></div><div>uwnd 200 anomalies :</div><div><a href="https://drive.google.com/open?id=1Eb9a4VD96n8Wg9iDoRg7pOHr60tl9OWw" target="_blank">https://drive.google.com/open?id=1Eb9a4VD96n8Wg9iDoRg7pOHr60tl9OWw</a></div><div>uwnd 850 anomalies :</div><div><a href="https://drive.google.com/open?id=1PKpTYxGT5VAE6F5ydu0j89VHlRN7gC9p" target="_blank">https://drive.google.com/open?id=1PKpTYxGT5VAE6F5ydu0j89VHlRN7gC9p</a></div></div><div><br></div><div>That anomalies data i use for running mjoclivar_14 . Then i got this error.</div><div><br></div>fatal:Dimension sizes of left hand side and right hand side of assignment do not match<br><div>fatal:["Execute.c":8635]:Execute: Error occurred at or near <b>line 79</b></div><div><br></div><div>....................<br>;***********************************************************<br>; Read anomalies<br>;***********************************************************<br></div><div>ncl 75>    work    = read_rename(f,"OLR_anom",iStrt,iLast,latS,latN) ; (time,lat,lon)<br>ncl 76>    OLR     = dim_avg_n_Wrap(work, 1)                         ; (time,lon)<br>ncl 77><br>dncl 78>    f       = addfile (diri+filu850 , "r")                        <br>ncl 79>   <b> work    = read_rename(f,"U_anom",iStrt,iLast,latS,latN) ; (time,lat,lon)</b><br>ncl 80>    U850    = dim_avg_n_Wrap(work, 1)          ; (time,lon)</div><div>.....................</div><div><br></div><div>This is my printVarSummary :</div><div><div>Variable <b>OLR_anom</b> :<br></div><div>ncl 5> printVarSummary(T)       <br></div>Variable: T<br>Type: float<br>Total Size: 61432128 bytes<br>            15358032 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [time | 1461] x [lat | 73] x [lon | 144]<br>Coordinates:<br>            time: [1884648..1919688]<br>            lat: [90..-90]<br>            lon: [ 0..357.5]<br>Number Of Attributes: 3<br>  _FillValue : 32766<br>  long_name : Anomalies: Daily OLR<br><div>  units : W/m^2</div><div><br></div><div><br></div><div>Variable <b>U_anom </b>(200 hPa) :</div><div>ncl 11> printVarSummary(T2)                                                <br>Variable: T2<br>Type: float<br>Total Size: 61858740 bytes<br>            15464685 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [time | 1461] x [lat | 73] x [lon | 145]<br>Coordinates:<br>            time: [   0..2102400]<br>            lat: [ -90..  90]<br>            lon: [   0.. 360]<br>Number Of Attributes: 2<br>  _FillValue : -9.99e+08<br>  long_name : Anomalies from Daily Climatology</div><div><br></div><div>Variable <b>U_anom</b> (850 hPa) :</div><div>ncl 15> printVarSummary(T3)                                                <br>Variable: T3<br>Type: float<br>Total Size: 61858740 bytes<br>            15464685 values<br>Number of Dimensions: 3<br>Dimensions and sizes: [time | 1461] x [lat | 73] x [lon | 145]<br>Coordinates:<br>            time: [   0..2102400]<br>            lat: [ -90..  90]<br>            lon: [   0.. 360]<br>Number Of Attributes: 2<br>  _FillValue : -9.99e+08<br>  long_name : Anomalies from Daily Climatology<div></div><div><br></div></div></div><div>Huge thanks for anybody can make this work, really need help this for my mini thesis. Thank you</div></div></blockquote></div></div></div></div></div>
</blockquote></div>
</blockquote></div></div>