<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;" class="">
I have put the two sample files in the ftp account. The names are:
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">ta_6hrLev_GISS-E2-H_historical_r6i1p1_195001010600-195007010000.nc</span></div>
</div>
<div class="">
<p style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(44, 103, 200);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">ta_6hrLev_GISS-E2-H_historical_r6i1p1_195007010600-195101010000.nc</span></p>
</div>
<div class="">
<div class=""><br class="webkit-block-placeholder">
</div>
<div class="">They are large files (1.5GB each), which may be the cause of the problem. If there is a straightforward way to break them up into time chunks then I can do that in the meantime.</div>
<div class=""><br class="">
</div>
<div class="">Elinor</div>
<div class=""><br class="webkit-block-placeholder">
</div>
<div class=""><br class="webkit-block-placeholder">
</div>
<div class="">
<div style="color: rgb(0, 0, 0); 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; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); 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; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); 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; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); 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; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div class="">
<div style="orphans: 2; widows: 2;" class="">*******************************************</div>
<div style="orphans: 2; widows: 2;" class="">Dr. Elinor Martin<br class="">
Assistant Professor</div>
<div style="orphans: 2; widows: 2;" class="">School of Meteorology<br class="">
University of Oklahoma</div>
<div style="orphans: 2; widows: 2;" class=""><span style="orphans: auto; widows: auto;" class="">120 David L. Boren Blvd. Suite 5900</span></div>
<div style="orphans: 2; widows: 2;" class="">Norman, OK 73072-7307</div>
<div style="orphans: 2; widows: 2;" class=""><br class="">
</div>
<div style="orphans: 2; widows: 2;" class="">Office: NWC 5642</div>
<div style="orphans: 2; widows: 2;" class="">Email: <a href="mailto:elinor.martin@ou.edu" class="">
elinor.martin@ou.edu</a></div>
<div style="orphans: 2; widows: 2;" class="">Phone: 405 325 7392</div>
<div style="orphans: 2; widows: 2;" class="">Web: <a href="http://weather.ou.edu/~ermartin" class="">
http://weather.ou.edu/~ermartin</a></div>
<div style="orphans: 2; widows: 2;" class="">*******************************************</div>
</div>
<div class=""><br class="">
</div>
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Aug 29, 2016, at 3:32 PM, Mary Haley &lt;<a href="mailto:haley@ucar.edu" class="">haley@ucar.edu</a>&gt; wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">
<div class="gmail_default" style="font-size:small">Hi Elinor,</div>
<div class="gmail_default" style="font-size:small"><br class="">
</div>
<div class="gmail_default" style="font-size:small">I think we'll need to see your files to debug this one.&nbsp; Are the files really large?&nbsp; If not, you can upload them to our ftp account:</div>
<div class="gmail_default" style="font-size:small"><br class="">
</div>
<div class="gmail_default" style="">
<div class="gmail_default" style="">ftp <a href="http://ftp.cgd.ucar.edu/" class="">
ftp.cgd.ucar.edu</a></div>
<div class="gmail_default" style="">anonymous</div>
<div class="gmail_default" style="">&lt;use your email address for the password&gt;</div>
<div class="gmail_default" style="">cd incoming</div>
<div class="gmail_default" style="">put&nbsp;<a href="http://temp_195001010600-195007010000.nc/" target="_blank" style="font-size:12.8px" class="">temp_195001010600-<wbr class="">195007010000.nc</a></div>
<div style="font-size:12.8px" class="">put&nbsp;<a href="http://temp_195007010600-195107010000.nc/" target="_blank" class="">temp_195007010600-<wbr class="">195107010000.nc</a></div>
<div class="gmail_default" style="">.&nbsp;<br class="">
</div>
<div class="gmail_default" style="">.&nbsp;</div>
<div class="gmail_default" style="">.&nbsp;</div>
<div class="gmail_default" style="">quit</div>
<div class="gmail_default" style=""><br class="">
</div>
<div class="gmail_default" style="">Otherwise, if you can put the files somewhere that I can download them, that's okay too.</div>
<div class="gmail_default" style=""><br class="">
</div>
<div class="gmail_default" style="">The seg fault could either be coming from a memory issue (if the files are large), or NCL could just be struggling with organizing the time array.</div>
<div class="gmail_default" style=""><br class="">
</div>
<div class="gmail_default" style="">Thanks,</div>
<div class="gmail_default" style=""><br class="">
</div>
<div class="gmail_default" style="">--Mary</div>
<div class="gmail_default" style=""><br class="">
</div>
</div>
</div>
<div class="gmail_extra"><br class="">
<div class="gmail_quote">On Mon, Aug 29, 2016 at 1:44 PM, Martin, Elinor R. <span dir="ltr" class="">
&lt;<a href="mailto:elinor.martin@ou.edu" target="_blank" class="">elinor.martin@ou.edu</a>&gt;</span> wrote:<br class="">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word" class="">I have a large set of files (time,level,lat,lon and 6 hourly) that span multiple years, but they are not divided nicely into months/years. I only want to read in one month at a time (and only 00Z), which in some cases,
 spans only one file, but in other cases spans two.
<div class=""><br class="">
</div>
<div class="">My code works perfectly for the months that come from only one file, but I get a “Segmentation fault (core dumped)” when the month spans two files. See brief code example below (happy to send more and actual files if needed).</div>
<div class=""><br class="">
</div>
<div class="">example files:&nbsp;</div>
<div class=""><a href="http://temp_195001010600-195007010000.nc/" target="_blank" class="">temp_195001010600-<wbr class="">195007010000.nc</a></div>
<div class=""><a href="http://temp_195007010600-195107010000.nc/" target="_blank" class="">temp_195007010600-<wbr class="">195107010000.nc</a></div>
<div class=""><br class="">
</div>
<div class="">example code snipet:</div>
<div class=""><br class="">
</div>
<div class="">…….</div>
<div class="">
<div class="">all_files = systemfunc (&quot;ls “&#43;in_path&#43;&quot;temp_195*.nc&quot;)</div>
<div class="">f &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= addfiles (all_files, &quot;r&quot;) &nbsp;&nbsp;</div>
<div class=""><br class="">
</div>
</div>
<div class="">
<div class="">ListSetType(f,&quot;cat&quot;)</div>
<div class="">time &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp; &nbsp; &nbsp; f[:]-&gt;time</div>
<div class=""><br class="">
</div>
<div class="">utc_date = cd_calendar(time, 0)</div>
<div class="">yr<span style="white-space:pre-wrap" class=""> </span>=<span style="white-space:pre-wrap" class="">
</span>tointeger(utc_date(:,0))</div>
<div class="">mm<span style="white-space:pre-wrap" class=""> </span>=<span style="white-space:pre-wrap" class="">
</span>tointeger(utc_date(:,1))</div>
<div class="">hour = &nbsp; &nbsp; tointeger(utc_date(:,3))</div>
</div>
<div class=""><br class="">
</div>
<div class="">index = ind(yr.eq.1950 .and. mm.eq.7 &nbsp;.and. hour.eq.00)<span style="white-space:pre-wrap" class="">
</span></div>
<div class=""><br class="">
</div>
<div class="">
<div class="">ListSetType(f,&quot;cat&quot;)<span style="white-space:pre-wrap" class=""> </span>
</div>
<div class="">ta &nbsp; &nbsp; &nbsp;= &nbsp; &nbsp; &nbsp; f[:]-&gt;ta(index,:,:,:)<span style="white-space:pre-wrap" class="">
</span></div>
…………</div>
<div class=""><br class="">
</div>
<div class="">As I mentioned, this works great if mm.eq.1, mm.eq.2 etc., but not when mm.eq.7. When reading in ta(index,:,:,:) I get the segmentation fault.<span style="white-space:pre-wrap" class="">
</span></div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Thank you!</div>
<div class=""><br class="">
</div>
<div class="">Elinor</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class="">
<div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; word-wrap: break-word;" class="">
<div class="">
<div class="">******************************<wbr class="">*************</div>
<div class="">Dr. Elinor Martin<br class="">
Assistant Professor</div>
<div class="">School of Meteorology<br class="">
University of Oklahoma</div>
<div class=""><span class="">120 David L. Boren Blvd. Suite 5900</span></div>
<div class="">Norman, OK 73072-7307</div>
<div class=""><br class="">
</div>
<div class="">Office: NWC 5642</div>
<div class="">Email: <a href="mailto:elinor.martin@ou.edu" target="_blank" class="">
elinor.martin@ou.edu</a></div>
<div class="">Phone: <a href="tel:405%20325%207392" value="&#43;14053257392" target="_blank" class="">
405 325 7392</a></div>
<div class="">Web: <a href="http://weather.ou.edu/~ermartin" target="_blank" class="">
http://weather.ou.edu/~<wbr class="">ermartin</a></div>
<div class="">******************************<wbr class="">*************</div>
</div>
<div class=""><br class="">
</div>
</div>
<br class="">
</div>
<br class="">
</div>
<br class="">
</div>
<br class="">
<br class="">
</div>
<br class="">
</div>
</div>
<br class="">
______________________________<wbr class="">_________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">mailman/listinfo/ncl-talk</a><br class="">
<br class="">
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>