[ncl-talk] how to calculate the sum of one variable based on bins of another variable

Xueyan Zhang xueyanzhang520 at gmail.com
Sat Dec 19 17:02:27 MST 2020


Hello NCL,

I was trying to calculate the percentage contribution of each elevation
class (grouped in 100 m elevation bins) to precipitation over the whole
elevation bands. The precipitation and elevation have same latitudes and
longitudes, like precipitation(224,200) and elevation(224,200). Is there
any function in NCL to do this kind of calculation? The plot can be like
below: the solid blue line or the pink bars.

Thanks!

Xueyan

[image: D5137966-53FD-41AB-A371-47178A31FB5D.png]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201219/0716a8d6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5137966-53FD-41AB-A371-47178A31FB5D.png
Type: image/png
Size: 77134 bytes
Desc: not available
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20201219/0716a8d6/attachment.png>


More information about the ncl-talk mailing list