<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- P { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p></p>
<div>Dear Dennis</div>
<div>&nbsp; &nbsp;I&#8217;m calling some fortran codes for the interpolation</div>
<div>&nbsp; &nbsp;ok, I will try the task parallelism you send me</div>
<div><br>
</div>
<div>many thanks</div>
<div><br>
</div>
<div>Francesco&#8203;<br>
</div>
<div><br>
</div>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Da:</b> Dennis Shea &lt;shea@ucar.edu&gt;<br>
<b>Inviato:</b> mercoledì 15 febbraio 2017 05:18<br>
<b>A:</b> Francesco Trotta<br>
<b>Cc:</b> ncl-talk@ucar.edu<br>
<b>Oggetto:</b> Re: [ncl-talk] Is it possible optimizing the performance of the NCL program via parallel processing?</font>
<div>&nbsp;</div>
</div>
<div>
<div dir="ltr">
<div>You did not indicate what you are using inside the procedure(s).<br>
</div>
<div><br>
</div>
<div>[1] What are you using to regrid?&nbsp; <br>
</div>
<div>[2] Are you regridding each day? <br>
</div>
<div>[3] If the grid structure is consistent, use ESMF regridding to generate a single weight file. The weight file&nbsp; (<a href="http://www.ncl.ucar.edu/Document/Functions/ESMF/ESMF_regrid_with_weights.shtml" target="_blank"><b>ESMF_regrid_with_weights</b></a>)
 can be used to to regrid an entire array (time,lev,lat,lon). It is *VERY* fast. No 'do loop'
<br>
<br>
</div>
<div>&nbsp;&nbsp;&nbsp; f&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; = addfiles(&quot;...&quot;,&quot;r&quot;)&nbsp;&nbsp;&nbsp; <br>
</div>
<div>&nbsp;&nbsp;&nbsp; temp&nbsp; = f[:]-&gt;TEMP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<wbr>&nbsp;&nbsp; ; (time,lev,lat,lon)<br>
</div>
<div>&nbsp;&nbsp;&nbsp; sal&nbsp;&nbsp;&nbsp;&nbsp; = f[:]-&gt;SALINITY<br>
</div>
<div>&nbsp;&nbsp;&nbsp; Oce_temp_regrid = ESMF_regrid_with_weights(temp,<wbr>wgt_filename,False)&nbsp; ; (time,lev,LAT,LON)<br>
</div>
<div>&nbsp;&nbsp;&nbsp; Oce_sal_regrid&nbsp;&nbsp;&nbsp; = ESMF_regrid_with_weights(sal&nbsp;&nbsp;<wbr>&nbsp; ,wgt_filename,False)</div>
<div><br>
----<br>
</div>
<div>**NOTE: ***&nbsp;&nbsp; If the above does not address the problem ... &nbsp;&nbsp; <br>
<br>
The following was recently posted to the Applications page:<br>
<br>
&nbsp;&nbsp;&nbsp; <a href="http://www.ncl.ucar.edu/Applications/task_parallelism.shtml" target="_blank">
http://www.ncl.ucar.edu/Applic<wbr>ations/task_parallelism.shtml</a><br>
<br>
</div>
<div>Perhaps your script would have to be rearranged.<br>
</div>
One approach: for each day, the suite of procedures could be&nbsp; could be sent to a different processor.<br>
<div>
<div><br>
<br>
<br>
<br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Tue, Feb 14, 2017 at 4:16 PM, Francesco Trotta <span dir="ltr">
&lt;<a href="mailto:francesco.trotta4@unibo.it" target="_blank">francesco.trotta4@unibo.it</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
<p></p>
<div>Dear Ncl</div>
<div>&nbsp; &nbsp;I'm using NCL - version 6.3.0.</div>
<div>&nbsp; &nbsp;I&#8217;m using a computer with multiple cores and</div>
<div>&nbsp; &nbsp;I would like to optimizing the performance of my NCL code via parallel processing.</div>
<div><br>
</div>
<div>&nbsp; &nbsp;In particular the part of my script which&nbsp;is very time consuming and I would like to improve is this:</div>
<div><br>
</div>
<div>&nbsp; &nbsp;;============================<wbr>==========</div>
<div>&nbsp; &nbsp;iday=-1</div>
<div>&nbsp; &nbsp;SpatialInterpTemp(iday,date_<wbr>less1,file_indataOce_temp_<wbr>less1,file_extrapdataOce_temp_<wbr>less1, \</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; file_regriddataOce_temp_less1) &nbsp;</div>
<div>&nbsp; &nbsp;SpatialInterpSal(iday,date_<wbr>less1,file_indataOce_sal_<wbr>less1,file_extrapdataOce_sal_<wbr>less1, \</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; file_regriddataOce_sal_less1)&nbsp;</div>
<div>&nbsp; &nbsp;SpatialInterpSsh(iday,date_<wbr>less1,file_indataOce_ssh_<wbr>less1,file_extrapdataOce_ssh_<wbr>less1, \</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; file_regriddataOce_ssh_less1) &nbsp;</div>
<div>&nbsp; &nbsp;SpatialInterpVelU(iday,date_<wbr>less1,file_indataOce_velU_<wbr>less1,file_extrapdataOce_velU_<wbr>less1, \</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;file_regriddataOce_velU_<wbr>less1)</div>
<div>&nbsp; &nbsp;SpatialInterpVelV(iday,date_<wbr>less1,file_indataOce_velV_<wbr>less1,file_extrapdataOce_velV_<wbr>less1, \</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;file_regriddataOce_velV_<wbr>less1)&nbsp;</div>
<div><br>
</div>
<div>&nbsp; &nbsp;do iday=0,ndays-1</div>
<div><br>
</div>
<div>&nbsp; &nbsp; &nbsp; SpatialInterpTemp(iday,date(<wbr>iday),file_indataOce_temp(<wbr>iday),file_extrapdataOce_temp(<wbr>iday), \</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; file_regriddataOce_temp(iday)) &nbsp;</div>
<div>&nbsp; &nbsp; &nbsp; SpatialInterpSal(iday,date(<wbr>iday),file_indataOce_sal(iday)<wbr>,file_extrapdataOce_sal(iday), \</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;file_regriddataOce_sal(iday))<wbr>&nbsp;</div>
<div>&nbsp; &nbsp; &nbsp; SpatialInterpSsh(iday,date(<wbr>iday),file_indataOce_ssh(iday)<wbr>,file_extrapdataOce_ssh(iday), \</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;file_regriddataOce_ssh(iday)) &nbsp;</div>
<div>&nbsp; &nbsp; &nbsp; SpatialInterpVelU(iday,date(<wbr>iday),file_indataOce_velU(<wbr>iday),file_extrapdataOce_velU(<wbr>iday), \</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; file_regriddataOce_velU(iday))</div>
<div>&nbsp; &nbsp; &nbsp; SpatialInterpVelV(iday,date(<wbr>iday),file_indataOce_velV(<wbr>iday),file_extrapdataOce_velV(<wbr>iday), \</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; file_regriddataOce_velV(iday))<wbr>&nbsp;</div>
<div><br>
</div>
<div>&nbsp; &nbsp;end do</div>
<div>&nbsp; &nbsp;;============================<wbr>==========</div>
<div><br>
</div>
<div>&nbsp; &nbsp;Is there a way to do this optimization with ncl?</div>
<div><br>
</div>
<div>Thanks&nbsp;</div>
<span class="HOEnZb"><font color="#888888">
<div>Francesco<br>
</div>
<p><br>
</p>
<br>
</font></span></div>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</div>
</body>
</html>