<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?  <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  (<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 &#39;do loop&#39; <br><br></div><div>    f         = addfiles(&quot;...&quot;,&quot;r&quot;)    <br></div><div>    temp  = f[:]-&gt;TEMP                    <wbr>   ; (time,lev,lat,lon)<br></div><div>    sal     = f[:]-&gt;SALINITY<br></div><div>    Oce_temp_regrid = ESMF_regrid_with_weights(temp,<wbr>wgt_filename,False)  ; (time,lev,LAT,LON)<br></div><div>    Oce_sal_regrid    = ESMF_regrid_with_weights(sal  <wbr>  ,wgt_filename,False)</div><div><br>----<br></div><div>**NOTE: ***   If the above does not address the problem ...    <br><br>The following was recently posted to the Applications page:<br><br>    <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  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>   I&#39;m using NCL - version 6.3.0.</div>
<div>   I’m using a computer with multiple cores and</div>
<div>   I would like to optimizing the performance of my NCL code via parallel processing.</div>
<div><br>
</div>
<div>   In particular the part of my script which is very time consuming and I would like to improve is this:</div>
<div><br>
</div>
<div>   ;============================<wbr>==========</div>
<div>   iday=-1</div>
<div>   SpatialInterpTemp(iday,date_<wbr>less1,file_indataOce_temp_<wbr>less1,file_extrapdataOce_temp_<wbr>less1, \</div>
<div>                                     file_regriddataOce_temp_less1)  </div>
<div>   SpatialInterpSal(iday,date_<wbr>less1,file_indataOce_sal_<wbr>less1,file_extrapdataOce_sal_<wbr>less1, \</div>
<div>                                file_regriddataOce_sal_less1) </div>
<div>   SpatialInterpSsh(iday,date_<wbr>less1,file_indataOce_ssh_<wbr>less1,file_extrapdataOce_ssh_<wbr>less1, \</div>
<div>                                 file_regriddataOce_ssh_less1)  </div>
<div>   SpatialInterpVelU(iday,date_<wbr>less1,file_indataOce_velU_<wbr>less1,file_extrapdataOce_velU_<wbr>less1, \</div>
<div>                                    file_regriddataOce_velU_<wbr>less1)</div>
<div>   SpatialInterpVelV(iday,date_<wbr>less1,file_indataOce_velV_<wbr>less1,file_extrapdataOce_velV_<wbr>less1, \</div>
<div>                                   file_regriddataOce_velV_<wbr>less1) </div>
<div><br>
</div>
<div>   do iday=0,ndays-1</div>
<div><br>
</div>
<div>      SpatialInterpTemp(iday,date(<wbr>iday),file_indataOce_temp(<wbr>iday),file_extrapdataOce_temp(<wbr>iday), \</div>
<div>                                        file_regriddataOce_temp(iday))  </div>
<div>      SpatialInterpSal(iday,date(<wbr>iday),file_indataOce_sal(iday)<wbr>,file_extrapdataOce_sal(iday), \</div>
<div>                                    file_regriddataOce_sal(iday))<wbr> </div>
<div>      SpatialInterpSsh(iday,date(<wbr>iday),file_indataOce_ssh(iday)<wbr>,file_extrapdataOce_ssh(iday), \</div>
<div>                                    file_regriddataOce_ssh(iday))  </div>
<div>      SpatialInterpVelU(iday,date(<wbr>iday),file_indataOce_velU(<wbr>iday),file_extrapdataOce_velU(<wbr>iday), \</div>
<div>                                       file_regriddataOce_velU(iday))</div>
<div>      SpatialInterpVelV(iday,date(<wbr>iday),file_indataOce_velV(<wbr>iday),file_extrapdataOce_velV(<wbr>iday), \</div>
<div>                                      file_regriddataOce_velV(iday))<wbr> </div>
<div><br>
</div>
<div>   end do</div>
<div>   ;============================<wbr>==========</div>
<div><br>
</div>
<div>   Is there a way to do this optimization with ncl?</div>
<div><br>
</div>
<div>Thanks </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>