<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<STYLE>
BLOCKQUOTE {
        MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em; MARGIN-TOP: 0px
}
OL {
        MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
UL {
        MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
DIV.FoxDiv20150324140356895106 {
        WORD-WRAP: break-word; COLOR: #000000; -WEBKIT-NBSP-MODE: SPACE; -WEBKIT-LINE-BREAK: AFTER-WHITE-SPACE
}
P {
        MARGIN-BOTTOM: 0px; MARGIN-TOP: 0px
}
BODY {
        FONT-SIZE: 10.5pt; FONT-FAMILY: ΢ÈíÑźÚ; COLOR: #000080; LINE-HEIGHT: 1.5
}
</STYLE>
<META name=GENERATOR content="MSHTML 11.00.9600.17690"></HEAD>
<BODY 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></DIV></SPAN></SPAN>
<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">Alex
Schaefer</A></DIV>
<DIV><B>Date:</B> 2015-03-24 13:25</DIV>
<DIV><B>To:</B> <A href="mailto:fengfengabc003@163.com">ChenFeng</A></DIV>
<DIV><B>CC:</B> <A href="mailto:shea@ucar.edu">Dennis Shea</A>; <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=FoxDiv20150324140356895106>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="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; -webkit-text-stroke-width: 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 size=1 face=""><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">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
style="FONT-SIZE: 10.5pt; FONT-FAMILY: 'Times New Roman'; FONT-WEIGHT: bold"
color=#008000 size=1 face=""><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: 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">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>
<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="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 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="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px 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></DIV></DIV></BODY></HTML>