<div dir="ltr"><div><div><div><div><div><div><div><div><div>[1]<br></div><div>You have a <br><br></div><div> begin<br><br></div><div>but this *requires* an <br><br></div><div> end <br><br></div><div>You have no 'end'. If you have a 'begin' you *must* have an 'end'<br><br></div><div>[2] <br><br></div>You have two 'do loops' <br><br>do yr = 1981,2013-1<br>do i = 0,9<br><br></div>but no corresponding loop terminations. Where are the 'end do' ? ie:<br><br></div> end do ; end do fi 'i' loop<br></div>end do ; end do fot 'yr' loop<br><br>[3] <br><br></div>You have a 'return' in the script. A 'return' should be used *only* in a function.<br><br></div> function foo<br></div> begin<br> ,,,,<br></div> return(...)<br></div> end<br><div><div><div> <br>[4] Please indent your code to add some structure. ncl-talk wants to help but our time is valuable too! walking through non-indented code is a nuisance. Structure helps!<br><br></div><div>[5] Use variables rather than hard-wired constants. <br><br>ua = a->uas(ii1:ii2,15:40,180:255)<br><br></div><div> latS_idx = 15<br></div><div> latN_idx = 40<br></div><div> lonL_idx = 180<br></div><div> lonR_idx = 255<br></div><div>ua = a->uas(ii1:ii2, latS_idx:latN_idx, lonL_idx:lonR_idx)<br><br></div><div>Better, if the grid is rectilinear, use coordinate variables.<br><br></div><div> latS = <br></div><div> latN =<br></div><div> lonL =<br></div><div> lonR = <br>ua = a->uas(ii1:ii2, {lats:latN}, {lonL:lonR})<br><br>---<br></div><div>Please read the NCL User Guide:<br> <a href="http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/">http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/</a><br><br></div><div>Good luck<br></div><div><br></div><div> <br></div><div><br><br></div><div><br><br></div><div><div><div><br></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 21, 2017 at 9:25 PM, dale zuri <span dir="ltr"><<a href="mailto:dalezuri@gmail.com" target="_blank">dalezuri@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"><br><div class="gmail_quote"><br><br><div dir="ltr"><div><div><div><div><div>Hi,<br><br>Fortran program doesn't seem to have any issues. But, NCL script produces a segmentation fault. <br></div></div><span class="">I have attached here a script. <br><br></span></div><span class=""><span>I would appreciate any help and suggestions. <br><br></span></span></div>Thanks<span class="HOEnZb"><font color="#888888"><span class="m_7706599687424599709HOEnZb"><font color="#888888"><br></font></span></font></span></div><span class="HOEnZb"><font color="#888888"><span class="m_7706599687424599709HOEnZb"><font color="#888888">Dz<br><div><div><div><div><br></div></div></div></div></font></span></font></span></div><div class="m_7706599687424599709HOEnZb"><div class="m_7706599687424599709h5"><div class="gmail_extra"><br><div class="gmail_quote"><br></div><br></div>
</div></div></div><br></div>
</blockquote></div><br></div>