[ncl-talk] is there a function similar with bin_sum?
Mary Haley
haley at ucar.edu
Mon Apr 4 10:45:37 MDT 2016
Yun,
I'm sorry somebody didn't get back to you sooner.
I don't know much about bin_sum, but I'm pretty sure we don't have a
curvilinear version.
However, you might be able to speed up your loop calculations simply by
getting rid of the loop entirely or moving as much of the code out of the
loop as possible. You can take advantage of NCL's array arithmetic
capabilities, which could significantly speed up your routine. If you could
send us the loop snippet, then we'll see if it can be improved.
Or, if you need to go the Fortran route, then you can use WRAPIT:
https://www.ncl.ucar.edu/Document/Tools/WRAPIT.shtml
Please post back to ncl-talk if you have further questions about this.
--Mary
On Tue, Mar 29, 2016 at 4:35 PM, Yun Yue <yunyue at huskers.unl.edu> wrote:
> Hi NCL users,
>
> I want to read many MODIS files. For each satellite pixel, find the
> nearest WRF grid based on lat, lon information (used function ind here
> to reduce the calculation time), then assign the MODIS data to this WRF
> grid.
>
>
> I found that using loop in NCL to calculate each satellite pixel’s
> distance to the WRF grid is very slow.
>
>
> One way I’m thinking to solve this is to use FORTRAN in the NCL to do the
> loop part.
>
>
> I also found NCL has a function bin_sum to calculate binned sums and
> counts on a rectilinear grid which is very fast. Is there a similar
> function in NCL like bin_sum but for curvilinear grid?
>
>
> Thanks very much,
>
> Yun
>
>
>
> _______________________________________________
> ncl-talk mailing list
> 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/20160404/50c94d63/attachment.html
More information about the ncl-talk
mailing list