Oops, sorry for not explaining well. I used task parallism shown below: <br><a href="http://www.ncl.ucar.edu/Applications/task_parallelism.shtml">http://www.ncl.ucar.edu/Applications/task_parallelism.shtml</a><br><div><div>Thereinto, <a href="http://www.ncl.ucar.edu/Applications/Scripts/task_parallelism_driver_3.ncl">task_parallelism_driver_3.ncl</a> is the 'driver script', where another script is the so-call 'drived script'.</div><div> Generally speaking, do-loop of different levels can be used directly in the 'drived script', and run this script only is OK. However, there are already too much do-loop inside the 'drived script', so I tried to use the parallism to run the script.</div><div>;--------------------</div><div>So, in the <font style="display: inline; font-size: 14px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1">'driver </font>script',</div><div><pre>do i=0,numLevs-1<br>command = "ncl ***.ncl " + str_get_sq() + "level=" + i + str_get_sq() + " >/dev/null"<br>end do<br><br></pre><div>;--------------------</div><div>And, in the 'drived script',</div><pre>begin
  print(level)<br>  ...<br>end<br></pre><div>;--------------------</div><div><font style="display: inline; font-size: 14px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1">I won</font><font style="display: inline; font-size: 14px; font-family: Verdana; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); font-weight: 400; font-style: normal;" __editorwarp__="1">der if I explained it clearly.</font></div><div>Best regrads.<br></div></div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ 原始邮件 ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>发件人:</b> "Dennis Shea"<shea@ucar.edu>;</div><div><b>发送时间:</b> 2020年1月20日(星期一) 晚上11:41</div><div><b>收件人:</b> "时光足迹"<1072752133@qq.com>;<wbr></div><div><b>抄送:</b> "ncl-talk"<ncl-talk@ucar.edu>;<wbr></div><div><b>主题:</b> Re: [ncl-talk] Question on parallelism</div></div><div><br></div><div dir="ltr"><div>It is not clear what you mean by "using parallelism in NCL"</div><div>What "driver script?"</div><div>What do you mean "output to files?"</div><div><br></div><div>You must be much clearer in what you have done and what you want as a result.<br></div><div><br></div><div>A simple test script</div><div><br></div><div>   klev = 14<br>   ntim = 120   ; example 120 months<br>   nlat = 100<br>   mlon = 200<br>   u    = random_normal( 20,10,(/klev,ntim,nlat,mlon/))  <br>   t     = random_normal(-10, 3,(/klev,ntim,nlat,mlon/))</div><div><br></div><div>   U    = <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/dim_avg_n_Wrap.shtml" target="_blank"><b>dim_avg_n_Wrap</b></a>(u,1)<br>   printVarSummary(U)<br>   T    = <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/dim_avg_n_Wrap.shtml" target="_blank"><b>dim_avg_n_Wrap</b></a>(t,1)<br>   printVarSummary(T)</div><div>====</div><div><br></div><div><br></div><div>Variable: U<br>Number of Dimensions: 3<br>Dimensions and sizes<b>:  [14] x [100] x [200]</b><br><br><br>Variable: T<br>Type: float<br>Total Size: 1120000 bytes<br>            280000 values<br>Number of Dimensions: 3<br>Dimensions and sizes:        <b>[14] x [100] x [200]</b></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 19, 2020 at 9:01 PM 时光足迹 via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</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>Hi adimistrator,</div><div>   I am using parallelism in NCL, version 6.6.2. <br></div><div>   Fourteen levels of different variables, such as u(nlev,ntime,nlat,nlon), are processed, by using do-loop (do i=0,14-1) in the 'driver' script. <br></div><div>   Annually average and monthly average of every variables were calculated in the 'drived' script. However only few levels are output to files.</div><div>   For example, it should get output files:</div><div>  (1) Annual-Mean-Lev0.nc  (2)Annual-Mean-Lev1.nc ... (14)Annual-Mean-Lev13.nc</div><div>   But now i only get some of these:</div><div>  (1)Annual-Mean-Lev1.nc   (2)Annual-Mean-Lev3.nc ... <br></div><div>   That means some levels are missing.</div><div><br></div><div>   When I run the 'drived' script alone, I can get Annual-Mean-Lev2.nc successfully. <br></div><div><br></div><div>   So I wonder why I can't get all files using parallelism(subprocess) ?</div><div>Yours,</div><div>HUNAG<br></div><div>   <br></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></blockquote></div></div>