[ncl-talk] [nc-talk]

Adam Phillips asphilli at ucar.edu
Mon Feb 25 15:39:47 MST 2019


Hi,
I think you want to use sum instead of dim_sum_Wrap:
http://www.ncl.ucar.edu/Document/Functions/Built-in/sum.shtml

Also, if you are using coordinate subscripting, you should use { }
characters like this:
 rfSum = sum( rf({152:273},{72:118},{22:54}) )
the following will just use index subscripting:
rfSum = sum( rf(152:273,72:118, 22:54) )

If you are unfamiliar with this syntax see Section 2.9 of the NCL language
manual here:
http://www.ncl.ucar.edu/Document/Manuals/language_man.pdf

If you have further questions please respond to the ncl-talk email list.
Adam



On Mon, Feb 25, 2019 at 2:27 AM Smrati Purwar <ritipurwar at gmail.com> wrote:

> Hi
> i want the sum of all rf data for this specific co ordinate indexes
> begin
> f = addfiles( "rf.nc <http://rf1976.nc/>","r")
> rf = f[:]->rf
> lat = f[:]->lat
> lon = f[:]->lon
> time = f[:]->time
>  rfSum = dim_sum_Wrap( rf(152:273,72:118, 22:54) )
> print(rfsum)
> end
> thanking you
> --
> With Thanks & Regards
> Smrati Purwar
> Ph.D Scholar(CSIR-JRF)
> CSIR- 4th Paradigm Institute(CMMACS)
> NAL Belur Campus, Wind tunnel road
> Bangalore, India-560037
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190225/f1d392bf/attachment.html>


More information about the ncl-talk mailing list