<div dir="ltr"><div><div>Sorry ... I meant 6.1.2 had issues not 6.2.1<br><br></div>Please upgrade.<br><br></div>THX<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 24, 2015 at 1:17 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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>Forgot to mention: <br><br></div><div>NCL 6.2.1 did have some netCDF4 issues.<br></div><div><br></div>Please download the 6.3.0 version of NCL<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 24, 2015 at 1:06 PM, Dennis Shea <span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</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><br></div><div>I 'found' 6.2.0 and 6.2.1. I have run the attached test script with: 6.2.0, 6.2.1, 6.3.0<br></div><div><br></div>It runs correctly under all versions. The file is netCDF4 which, 'under-the-hood', is HDF5.<br><div><div><br>%> ncdump -k <a href="http://geo_em.d01.nc" target="_blank">geo_em.d01.nc</a> <br>netCDF-4<br><br></div><div>%> ncl_filedump <a href="http://geo_em.d01.nc" target="_blank">geo_em.d01.nc</a> >&! dump.geo_em<br><br></div><div>%> ncl tst_geo.ncl <br><br>===<br></div><div>Summary: I do not know what is wrong. I can not replicate the problem.<span><font color="#888888"><br><br></font></span></div><span><font color="#888888"><div>D<br></div></font></span></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar 24, 2015 at 12:13 AM, ChenFeng <span dir="ltr"><<a href="mailto:fengfengabc003@163.com" target="_blank">fengfengabc003@163.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>
<div style="MARGIN:10px">
<div><span><span style="FONT-SIZE:10.5pt;FONT-FAMILY:宋体;COLOR:#000000"><font color="#000080" face="微软雅黑"></font></span></span><span><span style="FONT-SIZE:10.5pt;FONT-FAMILY:宋体;COLOR:#000000">
<div>
<div>What I do not understand is the file is generated from the standard WRF-WPS program, which I used several times with no problem.</div>
<div>I can read the variable without the dimention name, and then reorder or subcite the data. This approach can solve the problem temporarily.</div>
<div>Thanks for your help.</div>
<div> </div>
<div>Feng</div></div></span></span></div>
<div> </div>
<div style="BORDER-TOP:#b5c4df 1pt solid;BORDER-RIGHT:medium none;BORDER-BOTTOM:medium none;PADDING-BOTTOM:0cm;PADDING-TOP:3pt;PADDING-LEFT:0cm;BORDER-LEFT:medium none;PADDING-RIGHT:0cm">
<div style="FONT-SIZE:12px;BACKGROUND:#efefef;COLOR:#000000;PADDING-BOTTOM:8px;PADDING-TOP:8px;PADDING-LEFT:8px;PADDING-RIGHT:8px">
<div><b>From:</b> <a href="mailto:alexander.schaefer@mines.sdsmt.edu" target="_blank">Alex
Schaefer</a></div>
<div><b>Date:</b> 2015-03-24 13:25</div>
<div><b>To:</b> <a href="mailto:fengfengabc003@163.com" target="_blank">ChenFeng</a></div>
<div><b>CC:</b> <a href="mailto:shea@ucar.edu" target="_blank">Dennis Shea</a>; <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk</a></div><div><div>
<div><b>Subject:</b> Re: [ncl-talk] Segmentation fault when reading
variables from NC</div></div></div></div></div><div><div>
<div>
<div>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" target="_blank">fengfengabc003@163.com</a>>
wrote:</div><br>
<blockquote type="cite">
<div style="WHITE-SPACE:normal;WORD-SPACING:0px;TEXT-TRANSFORM:none;COLOR:rgb(0,0,128);FONT:10.5pt/1.5 微软雅黑;MARGIN:10px;LETTER-SPACING:normal;TEXT-INDENT:0px">
<div><span><span style="FONT-SIZE:10.5pt;FONT-FAMILY:宋体"><font style="FONT-SIZE:10.5pt;FONT-FAMILY:'Times New Roman';FONT-WEIGHT:bold" color="#008000" face="" size="1"><span style="FONT-SIZE:10.5pt;FONT-FAMILY:宋体"><font style="FONT-WEIGHT:normal" color="#000001" face="微软雅黑">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:rgb(181,196,223) 1pt solid;BORDER-RIGHT:medium none;BORDER-BOTTOM:medium none;PADDING-BOTTOM:0cm;PADDING-TOP:3pt;PADDING-LEFT:0cm;BORDER-LEFT:medium none;PADDING-RIGHT:0cm">
<div style="FONT-SIZE:12px;PADDING-BOTTOM:8px;PADDING-TOP:8px;PADDING-LEFT:8px;PADDING-RIGHT:8px;BACKGROUND-COLOR:rgb(239,239,239)">
<div><b>From:</b> <a href="mailto:fengfengabc003@163.com" target="_blank">ChenFeng</a></div>
<div><b>Date:</b> 2015-03-24 11:47</div>
<div><b>To:</b> <a href="mailto:shea@ucar.edu" target="_blank">Dennis Shea</a>;<span> </span><a href="mailto:alexander.schaefer@mines.sdsmt.edu" target="_blank">alexander.schaefer</a></div>
<div><b>CC:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk</a></div>
<div><b>Subject:</b> Re: Re: [ncl-talk] Segmentation fault when reading
variables from NC</div></div></div>
<div>
<div 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 style="FONT-SIZE:10.5pt;FONT-FAMILY:'Times New Roman';FONT-WEIGHT:bold" color="#008000" face="" size="1"><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 <a href="http://geo_em.d01.nc" target="_blank">geo_em.d01.nc</a> 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:rgb(181,196,223) 1pt solid;BORDER-RIGHT:medium none;BORDER-BOTTOM:medium none;PADDING-BOTTOM:0cm;PADDING-TOP:3pt;PADDING-LEFT:0cm;BORDER-LEFT:medium none;PADDING-RIGHT:0cm">
<div style="FONT-SIZE:12px;PADDING-BOTTOM:8px;PADDING-TOP:8px;PADDING-LEFT:8px;PADDING-RIGHT:8px;BACKGROUND-COLOR:rgb(239,239,239)">
<div><b>From:</b> <a href="mailto:shea@ucar.edu" target="_blank">Dennis Shea</a></div>
<div><b>Date:</b> 2015-03-23 22:40</div>
<div><b>To:</b> <a href="mailto:fengfengabc003@163.com" target="_blank">ChenFeng</a></div>
<div><b>CC:</b> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk</a></div>
<div><b>Subject:</b> Re: [ncl-talk] Segmentation fault when reading
variables from NC</div></div></div>
<div>
<div>
<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> </span><span dir="ltr"><<a href="mailto:shea@ucar.edu" target="_blank">shea@ucar.edu</a>></span><span> </span>wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:rgb(204,204,204) 1px 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>On Mon, Mar 23, 2015 at 2:47 AM, ChenFeng<span> </span><span dir="ltr"><<a href="mailto:fengfengabc003@163.com" target="_blank">fengfengabc003@163.com</a>></span><span> </span>wrote:<br></div></div>
<blockquote class="gmail_quote" style="PADDING-LEFT:1ex;MARGIN:0px 0px 0px 0.8ex;BORDER-LEFT:rgb(204,204,204) 1px solid">
<div>
<div><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></div></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>