<div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>Yes, you are definitely facing memory issues, and I don't understand enough of your script to recommend a work around. The error is happening at this line:</div><div><br></div><div> #75: files_1 = systemfunc("ls " + file_type + "_" + domain + "_" + year + "-" + month + "*")<br></div><div><br></div><div>which as you likely know means that the system can't fork another bash process to run the "ls" command. And it appears that it happens on the third time through the loop over dimsizes(mm). We've seen this sort of thing before, and it always means the system is terribly memory taxed, and something sooner than later will raise a signal 12 -- just happens to be the systemfunc() call in your case.<br></div><div><br></div><div>I see that after the loop over dimsizes(mm), you write a NetCDF file. Again, I don't understand your script enough, so this might not make sense, but perhaps you might write smaller NetCDF files each time through the loop, and then use a post-processing step (perhaps the NCO or CDO operators) to concatenate the files together? <br></div><div><br></div><div>Wish I had a better answer...</div><div>Rick</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 27, 2019 at 4:50 PM <a href="mailto:lslrsgis@whu.edu.cn">lslrsgis@whu.edu.cn</a> <<a href="mailto:lslrsgis@whu.edu.cn">lslrsgis@whu.edu.cn</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>
<div><font style="font-size:16px" face="宋体"><span></span> Hi, everyone</font></div><blockquote style="margin-top:0px;margin-bottom:0px;margin-left:0.5em"><div><div class="gmail-m_555462795568510671FoxDiv20190228074902357632"><div><br></div><blockquote style="margin-top:0px;margin-bottom:0px;margin-left:0.5em"><div class="gmail-m_555462795568510671FoxDiv20190227224021341407"><div>
<p class="MsoNormal" style="margin:0px 0cm;text-align:justify;font-size:12pt;font-family:宋体"><span lang="EN-US">I am writing for a NCL question. When I executed a .ncl script (Ubuntu@PC) to extract monthly/daily records from WRF outputs, the program stopped after processing two month data. Information prompted out as bellow:<u></u><u></u></span></p><p class="MsoNormal" style="margin:0px 0cm;text-align:justify;font-size:12pt;font-family:宋体"><span lang="EN-US"> </span></p><p style="margin:0px 0cm;font-size:12pt;font-family:宋体;background-image:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial"><b><span style="font-size:10.5pt;font-family:等线" lang="EN-US">fatal:systemfunc: cannot create child process:[errno=12]<u></u><u></u></span></b></p><p style="margin:0px 0cm;font-size:12pt;font-family:宋体;background-image:initial;background-size:initial;background-origin:initial;background-clip:initial;background-position:initial;background-repeat:initial"><b><span style="font-size:10.5pt;font-family:等线" lang="EN-US">fatal:["Execute.c":8637]:Execute: Error occurred at or near line 75 in file wrfout_postprocess_tzadjust.ncl<u></u><u></u></span></b></p><p class="MsoNormal" style="margin:0px 0cm;text-align:justify;font-size:12pt;font-family:宋体"><span lang="EN-US"> </span></p><p class="MsoNormal" style="margin:0px 0cm;text-align:justify;font-size:12pt;font-family:宋体"><span lang="EN-US">It seems be memory-out based on online search and ncl-talk achieves. While I have already released the memory using “delete” within each loop. What can I do?<u></u><u></u></span></p><p class="MsoNormal" style="margin:0px 0cm;text-align:justify;font-size:12pt;font-family:宋体"><span lang="EN-US"> </span></p><p class="MsoNormal" style="margin:0px 0cm;text-align:justify;font-size:12pt;font-family:宋体"><span lang="EN-US">Any indications? Thanks in advance.<u></u><u></u></span></p><p class="MsoNormal" style="margin:0px 0cm;text-align:justify;font-size:12pt;font-family:宋体"><span lang="EN-US"> </span></p><p class="MsoNormal" style="margin:0px 0cm;text-align:justify;font-size:12pt;font-family:宋体">Liang</p><p class="MsoNormal" style="margin:0px 0cm;text-align:justify;font-size:12pt;font-family:宋体"><span lang="EN-US"> </span></p><p class="MsoNormal" style="margin:0px 0cm;text-align:justify;font-size:12pt;font-family:宋体"><span lang="EN-US">P.S. The script and log file are attached.</span></p><p class="MsoNormal" style="margin:0px 0cm;text-align:justify;font-size:12pt;font-family:宋体"><span lang="EN-US"><br></span></p><p style="margin-bottom:0px;line-height:14px;margin-top:0px"><span lang="en-US"><font face="宋体">The cmd within .ncl is written to list all wrfout files within one month.</font></span></p><p style="margin-bottom:0px;line-height:14px;margin-top:0px"><span lang="en-US"><font face="宋体">ls wrfout_d01_2015-01*</font></span></p><p style="margin-bottom:0px;line-height:14px;margin-top:0px"><span lang="en-US"><font face="宋体">ls wrfout_d01_2015-02*</font></span></p><p class="MsoNormal" style="margin:0px 0cm;text-align:justify;font-size:12pt"><font face="宋体"><span lang="EN-US"></span></font></p><p style="margin-bottom:0px;line-height:14px;margin-top:0px"><span lang="en-US"><font face="宋体">ls wrfout_d01_2015-03*</font></span></p><p style="margin-bottom:0px;line-height:14px;margin-top:0px"><span lang="en-US"><font face="宋体">...</font></span></p>
</div>
</div></blockquote>
</div></div></blockquote>
</div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>