<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=UTF-8" 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.FoxDiv20150325111006402339 {
        COLOR: #000000
}
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=微软雅黑>
<DIV 
style="COLOR: #000000">The&nbsp;problem&nbsp;disappeared&nbsp;when&nbsp;I&nbsp;use&nbsp;NCL&nbsp;version&nbsp;6.3.0.</DIV>
<DIV 
style="COLOR: #000000">As&nbsp;you&nbsp;said&nbsp;maybe&nbsp;NCL&nbsp;v6.1.2&nbsp;has&nbsp;some&nbsp;NetCDF&nbsp;issue.</DIV>
<DIV 
style="COLOR: #000000">Thanks&nbsp;for&nbsp;all&nbsp;of&nbsp;your&nbsp;help.</DIV>
<DIV style="COLOR: #000000">Feng</DIV></FONT></DIV></SPAN></SPAN>
<DIV>&nbsp;</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>&nbsp;<A href="mailto:shea@ucar.edu">Dennis Shea</A></DIV>
<DIV><B>Date:</B>&nbsp;2015-03-25&nbsp;03:06</DIV>
<DIV><B>To:</B>&nbsp;<A href="mailto:fengfengabc003@163.com">ChenFeng</A></DIV>
<DIV><B>CC:</B>&nbsp;<A 
href="mailto:alexander.schaefer@mines.sdsmt.edu">alexander.schaefer</A>; <A 
href="mailto:ncl-talk@ucar.edu">ncl-talk</A></DIV>
<DIV><B>Subject:</B>&nbsp;Re: Re: [ncl-talk] Segmentation fault when reading 
variables from NC</DIV></DIV></DIV>
<DIV>
<DIV class=FoxDiv20150325111006402339>
<DIV dir=ltr>
<DIV><BR></DIV>
<DIV>I 'found' 6.2.0 and 6.2.1. I have run the attached test script with:&nbsp; 
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>%&gt; ncdump -k <A href="http://geo_em.d01.nc">geo_em.d01.nc</A> 
<BR>netCDF-4<BR><BR></DIV>
<DIV>%&gt; ncl_filedump <A href="http://geo_em.d01.nc">geo_em.d01.nc</A> 
&gt;&amp;! dump.geo_em<BR><BR></DIV>
<DIV>%&gt; ncl tst_geo.ncl <BR><BR>===<BR></DIV>
<DIV>Summary: I do not know what is wrong. I can not replicate the 
problem.<BR><BR></DIV>
<DIV>D<BR></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>&lt;<A href="mailto:fengfengabc003@163.com" 
target=_blank>fengfengabc003@163.com</A>&gt;</SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote 
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><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&nbsp;I&nbsp;do&nbsp;not&nbsp;understand&nbsp;is&nbsp;the&nbsp;file&nbsp;is&nbsp;generated&nbsp;from&nbsp;the&nbsp;standard&nbsp;WRF-WPS&nbsp;program,&nbsp;which&nbsp;I&nbsp;used&nbsp;several&nbsp;times&nbsp;with&nbsp;no&nbsp;problem.</DIV>
  <DIV>I&nbsp;can&nbsp;read&nbsp;the&nbsp;variable&nbsp;without&nbsp;the&nbsp;dimention&nbsp;name,&nbsp;and&nbsp;then&nbsp;reorder&nbsp;or&nbsp;subcite&nbsp;the&nbsp;data.&nbsp;This&nbsp;approach&nbsp;can&nbsp;solve&nbsp;the&nbsp;problem&nbsp;temporarily.</DIV>
  <DIV>Thanks&nbsp;for&nbsp;your&nbsp;help.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Feng</DIV></DIV></SPAN></SPAN></DIV>
  <DIV>&nbsp;</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>&nbsp;<A href="mailto:alexander.schaefer@mines.sdsmt.edu" 
  target=_blank>Alex Schaefer</A></DIV>
  <DIV><B>Date:</B>&nbsp;2015-03-24&nbsp;13:25</DIV>
  <DIV><B>To:</B>&nbsp;<A href="mailto:fengfengabc003@163.com" 
  target=_blank>ChenFeng</A></DIV>
  <DIV><B>CC:</B>&nbsp;<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 class=h5>
  <DIV><B>Subject:</B>&nbsp;Re: [ncl-talk] Segmentation fault when reading 
  variables from NC</DIV></DIV></DIV></DIV></DIV>
  <DIV>
  <DIV class=h5>
  <DIV>
  <DIV>Feng, 
  <DIV><BR></DIV>
  <DIV>I got the same seg fault that you got with your file.&nbsp; My guess is 
  something is just not quite right with that file.&nbsp; The size of that 
  &nbsp;domain should not be an issue.&nbsp; My ncl 6.1.2 is compiled from 
  source so the precompiled binary theory affecting it is not the case.&nbsp; 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 &lt;<A 
  href="mailto:fengfengabc003@163.com" 
  target=_blank>fengfengabc003@163.com</A>&gt; 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 size=1 face=""><SPAN 
    style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体"><FONT style="FONT-WEIGHT: normal" 
    color=#000001 face=微软雅黑>And I use the&nbsp; 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>&nbsp;</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>&nbsp;<A href="mailto:fengfengabc003@163.com" 
    target=_blank>ChenFeng</A></DIV>
    <DIV><B>Date:</B>&nbsp;2015-03-24&nbsp;11:47</DIV>
    <DIV><B>To:</B>&nbsp;<A href="mailto:shea@ucar.edu" target=_blank>Dennis 
    Shea</A>;<SPAN>&nbsp;</SPAN><A 
    href="mailto:alexander.schaefer@mines.sdsmt.edu" 
    target=_blank>alexander.schaefer</A></DIV>
    <DIV><B>CC:</B>&nbsp;<A href="mailto:ncl-talk@ucar.edu" 
    target=_blank>ncl-talk</A></DIV>
    <DIV><B>Subject:</B>&nbsp;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 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&nbsp;reason&nbsp;I&nbsp;use&nbsp;the&nbsp;printVarSummary(lon2d)&nbsp;is&nbsp;only&nbsp;want&nbsp;to&nbsp;make&nbsp;sure&nbsp;whether&nbsp;the&nbsp;code&nbsp;above&nbsp;this&nbsp;line&nbsp;is&nbsp;correct.</DIV>
    <DIV 
    style="FONT-WEIGHT: normal">There&nbsp;is&nbsp;no&nbsp;problem&nbsp;when&nbsp;I&nbsp;use&nbsp;this&nbsp;code&nbsp;to&nbsp;read&nbsp;another&nbsp;<A 
    href="http://geo_em.d01.nc" 
    target=_blank>geo_em.d01.nc</A>&nbsp;file.&nbsp;So&nbsp;I&nbsp;think&nbsp;there&nbsp;is&nbsp;something&nbsp;wrong&nbsp;with&nbsp;the&nbsp;NC&nbsp;file.&nbsp;But&nbsp;I&nbsp;can&nbsp;use&nbsp;ncdump&nbsp;to&nbsp;see&nbsp;the&nbsp;structure&nbsp;and&nbsp;find&nbsp;nothing&nbsp;special.</DIV>
    <DIV 
    style="FONT-WEIGHT: normal">Is&nbsp;the&nbsp;variable&nbsp;dimention&nbsp;too&nbsp;large&nbsp;(474*524)?&nbsp;&nbsp;But&nbsp;I&nbsp;have&nbsp;also&nbsp;use&nbsp;this&nbsp;ncl&nbsp;version&nbsp;to&nbsp;read&nbsp;variables&nbsp;more&nbsp;large&nbsp;than&nbsp;this.</DIV>
    <DIV 
    style="FONT-WEIGHT: normal">I&nbsp;attached&nbsp;the&nbsp;file.&nbsp;Could&nbsp;you&nbsp;please&nbsp;help&nbsp;me&nbsp;check&nbsp;it&nbsp;with&nbsp;another&nbsp;ncl&nbsp;version&nbsp;and&nbsp;platform.</DIV>
    <DIV style="FONT-WEIGHT: normal">Thanks.</DIV>
    <DIV style="FONT-WEIGHT: normal">&nbsp;</DIV>
    <DIV 
    style="FONT-WEIGHT: normal">Feng</DIV></FONT></SPAN></FONT></SPAN></SPAN></DIV><SPAN 
    style="FONT-SIZE: 10.5pt; FONT-FAMILY: 宋体"></SPAN>
    <DIV>&nbsp;</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>&nbsp;<A href="mailto:shea@ucar.edu" target=_blank>Dennis 
    Shea</A></DIV>
    <DIV><B>Date:</B>&nbsp;2015-03-23&nbsp;22:40</DIV>
    <DIV><B>To:</B>&nbsp;<A href="mailto:fengfengabc003@163.com" 
    target=_blank>ChenFeng</A></DIV>
    <DIV><B>CC:</B>&nbsp;<A href="mailto:ncl-talk@ucar.edu" 
    target=_blank>ncl-talk</A></DIV>
    <DIV><B>Subject:</B>&nbsp;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&nbsp; less efficient than 
    ..<BR><BR>lon2d&nbsp;=&nbsp;inp0-&gt;XLONG_M&nbsp;(0, :, :)<BR></DIV>
    <DIV class=gmail_extra><BR>
    <DIV class=gmail_quote>On Mon, Mar 23, 2015 at 8:11 AM, Dennis 
    Shea<SPAN>&nbsp;</SPAN><SPAN dir=ltr>&lt;<A href="mailto:shea@ucar.edu" 
    target=_blank>shea@ucar.edu</A>&gt;</SPAN><SPAN>&nbsp;</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.&nbsp; 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>&nbsp;</SPAN><SPAN 
      dir=ltr>&lt;<A href="mailto:fengfengabc003@163.com" 
      target=_blank>fengfengabc003@163.com</A>&gt;</SPAN><SPAN>&nbsp;</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&nbsp;ncl-users,</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>I&nbsp;have&nbsp;encounted&nbsp;an&nbsp;error&nbsp;when&nbsp;reading&nbsp;a&nbsp;variable&nbsp;from&nbsp;an&nbsp;NC&nbsp;file.</DIV>
        <DIV>the&nbsp;code&nbsp;is&nbsp;listed&nbsp;below:</DIV>
        <DIV>;************************************************</DIV>
        <DIV>load&nbsp;"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</DIV>
        <DIV>;************************************************</DIV>
        <DIV>begin</DIV>
        <DIV>&nbsp;&nbsp;inp0&nbsp;=&nbsp;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">&nbsp;&nbsp;lon2d&nbsp;=&nbsp;inp0-&gt;XLONG_M&nbsp;(Time|0,&nbsp;south_north|:,&nbsp;west_east|:)</DIV>
        <DIV>&nbsp;&nbsp;printVarSummary(lon2d)</DIV>
        <DIV>;************************************************</DIV>
        <DIV>end</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>the&nbsp;error&nbsp;message&nbsp;is:</DIV>
        <DIV>&nbsp;Copyright&nbsp;(C)&nbsp;1995-2013&nbsp;-&nbsp;All&nbsp;Rights&nbsp;Reserved</DIV>
        <DIV>&nbsp;University&nbsp;Corporation&nbsp;for&nbsp;Atmospheric&nbsp;Research</DIV>
        <DIV>&nbsp;NCAR&nbsp;Command&nbsp;Language&nbsp;Version&nbsp;6.1.2</DIV>
        <DIV>&nbsp;The&nbsp;use&nbsp;of&nbsp;this&nbsp;software&nbsp;is&nbsp;governed&nbsp;by&nbsp;a&nbsp;License&nbsp;Agreement.</DIV>
        <DIV>&nbsp;See&nbsp;<A href="http://www.ncl.ucar.edu/" 
        target=_blank>http://www.ncl.ucar.edu/</A>&nbsp;for&nbsp;more&nbsp;details.</DIV>
        <DIV>Segmentation&nbsp;fault&nbsp;(core&nbsp;dumped)</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>The&nbsp;strange&nbsp;thing&nbsp;is&nbsp;when&nbsp;i'm&nbsp;reading&nbsp;the&nbsp;variable&nbsp;without&nbsp;any&nbsp;dimention&nbsp;name&nbsp;cited,&nbsp;the&nbsp;error&nbsp;disappeared.</DIV>
        <DIV>The&nbsp;code&nbsp;changes&nbsp;into&nbsp;:</DIV>
        <DIV>;************************************************</DIV>
        <DIV>load&nbsp;"$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</DIV>
        <DIV>;************************************************</DIV>
        <DIV>begin</DIV>
        <DIV>&nbsp;&nbsp;inp0&nbsp;=&nbsp;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">&nbsp;&nbsp;lon2d&nbsp;=&nbsp;inp0-&gt;XLONG_M</DIV>
        <DIV>&nbsp;&nbsp;printVarSummary(lon2d)</DIV>
        <DIV>;************************************************</DIV>
        <DIV>end</DIV>
        <DIV>&nbsp;</DIV>
        <DIV>I don't understand why. It is very appreciate if&nbsp;anybody can 
        tell me the reason.</DIV>
        <DIV>Thanks.</DIV>
        <DIV>&nbsp;</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></BODY></HTML>