<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Feng,<div><br></div><div>I got the same seg fault that you got with your file. My guess is something is just not quite right with that file. The size of that domain should not be an issue. My ncl 6.1.2 is compiled from source so the precompiled binary theory affecting it is not the case. I am not sure what other things will spit out seg faults so Dennis will have to take lead.</div><div><br></div><div>Sorry I couldn’t be of more help,</div><div>-Alex</div><div><br></div><div><br><div><div>On Mar 23, 2015, at 9:51 PM, ChenFeng <<a href="mailto:fengfengabc003@163.com">fengfengabc003@163.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 128); line-height: 1.5; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 10px;"><div><span><span style="font-size: 10.5pt; font-family: 宋体;"><font color="#008000" size="1" face="" style="font-size: 10.5pt; font-family: 'Times New Roman'; font-weight: bold;"><span style="font-size: 10.5pt; font-family: 宋体;"><font color="#000001" face="微软雅黑" style="font-weight: normal;">And I use the pre-compiled binary version which is downloaded from the NCAR website.</font></span></font></span></span></div><span style="font-size: 10.5pt; font-family: 宋体;"></span><div> </div><div style="border-top-color: rgb(181, 196, 223); border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0cm 0cm;"><div style="font-size: 12px; background-color: rgb(239, 239, 239); padding: 8px;"><div><b>From:</b> <a href="mailto:fengfengabc003@163.com">ChenFeng</a></div><div><b>Date:</b> 2015-03-24 11:47</div><div><b>To:</b> <a href="mailto:shea@ucar.edu">Dennis Shea</a>;<span class="Apple-converted-space"> </span><a href="mailto:alexander.schaefer@mines.sdsmt.edu">alexander.schaefer</a></div><div><b>CC:</b> <a href="mailto:ncl-talk@ucar.edu">ncl-talk</a></div><div><b>Subject:</b> Re: Re: [ncl-talk] Segmentation fault when reading variables from NC</div></div></div><div><div class="FoxDiv20150324114958256214" style="font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 128); margin: 10px; line-height: 1.5;"><div><span><span style="font-size: 10.5pt; font-family: 宋体;"><font color="#008000" size="1" face="" style="font-size: 10.5pt; font-family: 'Times New Roman'; font-weight: bold;"><span style="font-size: 10.5pt; font-family: 宋体;"><font color="#000080" face="微软雅黑"><div style="font-weight: normal;">Thanks Dennis and Alexander</div><div style="font-weight: normal;">The reason I use the printVarSummary(lon2d) is only want to make sure whether the code above this line is correct.</div><div style="font-weight: normal;">There is no problem when I use this code to read another geo_em.d01.nc file. So I think there is something wrong with the NC file. But I can use ncdump to see the structure and find nothing special.</div><div style="font-weight: normal;">Is the variable dimention too large (474*524)? But I have also use this ncl version to read variables more large than this.</div><div style="font-weight: normal;">I attached the file. Could you please help me check it with another ncl version and platform.</div><div style="font-weight: normal;">Thanks.</div><div style="font-weight: normal;"> </div><div style="font-weight: normal;">Feng</div></font></span></font></span></span></div><span style="font-size: 10.5pt; font-family: 宋体;"></span><div> </div><div style="border-top-color: rgb(181, 196, 223); border-width: 1pt medium medium; border-style: solid none none; padding: 3pt 0cm 0cm;"><div style="font-size: 12px; background-color: rgb(239, 239, 239); padding: 8px;"><div><b>From:</b> <a href="mailto:shea@ucar.edu">Dennis Shea</a></div><div><b>Date:</b> 2015-03-23 22:40</div><div><b>To:</b> <a href="mailto:fengfengabc003@163.com">ChenFeng</a></div><div><b>CC:</b> <a href="mailto:ncl-talk@ucar.edu">ncl-talk</a></div><div><b>Subject:</b> Re: [ncl-talk] Segmentation fault when reading variables from NC</div></div></div><div><div class="FoxDiv20150324112727576919" style=""><div dir="ltr">Also, forgot to mention ...<br><br>Using named dimensions should only be done when reordering an array. Nothing wrong with doing so but is is less efficient than ..<br><br>lon2d = inp0->XLONG_M (0, :, :)<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 23, 2015 at 8:11 AM, Dennis Shea<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span><span class="Apple-converted-space"> </span>wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div dir="ltr"><div>I don't understand why either. 6.1.2 is no longer available here so I can not test with 6.1.2<br><br></div>When it does work ... what does printVarSummary(lon2d) indicate?<br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Mar 23, 2015 at 2:47 AM, ChenFeng<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:fengfengabc003@163.com" target="_blank">fengfengabc003@163.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br></div></div><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;"><div><div class="h5"><u></u><div style="font-size: 10pt; font-family: 微软雅黑; margin-left: 10px; margin-top: 10px; margin-right: 10px;"><div>Hi ncl-users,</div><div> </div><div>I have encounted an error when reading a variable from an NC file.</div><div>the code is listed below:</div><div>;************************************************</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div>;************************************************</div><div>begin</div><div> inp0 = addfile("/public/home/chenf/AHWRF/TEST/WPSwks.T02/<a href="http://geo_em.d01.nc/" target="_blank">geo_em.d01.nc</a>","r")</div><div style="font-weight: bold;"> lon2d = inp0->XLONG_M (Time|0, south_north|:, west_east|:)</div><div> printVarSummary(lon2d)</div><div>;************************************************</div><div>end</div><div> </div><div>the error message is:</div><div> Copyright (C) 1995-2013 - All Rights Reserved</div><div> University Corporation for Atmospheric Research</div><div> NCAR Command Language Version 6.1.2</div><div> The use of this software is governed by a License Agreement.</div><div> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.</div><div>Segmentation fault (core dumped)</div><div> </div><div>The strange thing is when i'm reading the variable without any dimention name cited, the error disappeared.</div><div>The code changes into :</div><div>;************************************************</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div>;************************************************</div><div>begin</div><div> inp0 = addfile("/public/home/chenf/AHWRF/TEST/WPSwks.T02/<a href="http://geo_em.d01.nc/" target="_blank">geo_em.d01.nc</a>","r")</div><div style="font-weight: bold;"> lon2d = inp0->XLONG_M</div><div> printVarSummary(lon2d)</div><div>;************************************************</div><div>end</div><div> </div><div>I don't understand why. It is very appreciate if anybody can tell me the reason.</div><div>Thanks.</div><div> </div><div>Feng</div></div><br></div></div>_______________________________________________<br>ncl-talk mailing list<br>List instructions, subscriber options, unsubscribe:<br><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div></div></blockquote></div></div></div></div></div></div></div></blockquote></div><br></div></body></html>