[ncl-talk] Is it possible optimizing the performance of the NCL program via parallel processing?
Francesco Trotta
francesco.trotta4 at unibo.it
Mon Feb 20 10:19:29 MST 2017
Dear Dennis
I'm calling some fortran codes for the interpolation
ok, I will try the task parallelism you send me
many thanks
Francesco?
________________________________
Da: Dennis Shea <shea at ucar.edu>
Inviato: mercoledì 15 febbraio 2017 05:18
A: Francesco Trotta
Cc: ncl-talk at ucar.edu
Oggetto: Re: [ncl-talk] Is it possible optimizing the performance of the NCL program via parallel processing?
You did not indicate what you are using inside the procedure(s).
[1] What are you using to regrid?
[2] Are you regridding each day?
[3] If the grid structure is consistent, use ESMF regridding to generate a single weight file. The weight file (ESMF_regrid_with_weights<http://www.ncl.ucar.edu/Document/Functions/ESMF/ESMF_regrid_with_weights.shtml>) can be used to to regrid an entire array (time,lev,lat,lon). It is *VERY* fast. No 'do loop'
f = addfiles("...","r")
temp = f[:]->TEMP ; (time,lev,lat,lon)
sal = f[:]->SALINITY
Oce_temp_regrid = ESMF_regrid_with_weights(temp,wgt_filename,False) ; (time,lev,LAT,LON)
Oce_sal_regrid = ESMF_regrid_with_weights(sal ,wgt_filename,False)
----
**NOTE: *** If the above does not address the problem ...
The following was recently posted to the Applications page:
http://www.ncl.ucar.edu/Applications/task_parallelism.shtml
Perhaps your script would have to be rearranged.
One approach: for each day, the suite of procedures could be could be sent to a different processor.
On Tue, Feb 14, 2017 at 4:16 PM, Francesco Trotta <francesco.trotta4 at unibo.it<mailto:francesco.trotta4 at unibo.it>> wrote:
Dear Ncl
I'm using NCL - version 6.3.0.
I'm using a computer with multiple cores and
I would like to optimizing the performance of my NCL code via parallel processing.
In particular the part of my script which is very time consuming and I would like to improve is this:
;======================================
iday=-1
SpatialInterpTemp(iday,date_less1,file_indataOce_temp_less1,file_extrapdataOce_temp_less1, \
file_regriddataOce_temp_less1)
SpatialInterpSal(iday,date_less1,file_indataOce_sal_less1,file_extrapdataOce_sal_less1, \
file_regriddataOce_sal_less1)
SpatialInterpSsh(iday,date_less1,file_indataOce_ssh_less1,file_extrapdataOce_ssh_less1, \
file_regriddataOce_ssh_less1)
SpatialInterpVelU(iday,date_less1,file_indataOce_velU_less1,file_extrapdataOce_velU_less1, \
file_regriddataOce_velU_less1)
SpatialInterpVelV(iday,date_less1,file_indataOce_velV_less1,file_extrapdataOce_velV_less1, \
file_regriddataOce_velV_less1)
do iday=0,ndays-1
SpatialInterpTemp(iday,date(iday),file_indataOce_temp(iday),file_extrapdataOce_temp(iday), \
file_regriddataOce_temp(iday))
SpatialInterpSal(iday,date(iday),file_indataOce_sal(iday),file_extrapdataOce_sal(iday), \
file_regriddataOce_sal(iday))
SpatialInterpSsh(iday,date(iday),file_indataOce_ssh(iday),file_extrapdataOce_ssh(iday), \
file_regriddataOce_ssh(iday))
SpatialInterpVelU(iday,date(iday),file_indataOce_velU(iday),file_extrapdataOce_velU(iday), \
file_regriddataOce_velU(iday))
SpatialInterpVelV(iday,date(iday),file_indataOce_velV(iday),file_extrapdataOce_velV(iday), \
file_regriddataOce_velV(iday))
end do
;======================================
Is there a way to do this optimization with ncl?
Thanks
Francesco
_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170220/fe524a03/attachment.html
More information about the ncl-talk
mailing list