[ncl-talk] Division by 0, Can't continue

Atul Saini atulsainimail at gmail.com
Thu Dec 5 03:33:19 MST 2019


Thanks a lot for the important suggestion, it really helped me a lot. 🙏

Regards,





On Thu, Dec 5, 2019 at 3:57 PM Barry Lynn via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Before doing the division, you need to use the where function to set 0
> values to a fill values.  Then, they will be ignored.
>
> For example,
>
> Perhaps you want to set psi to _FillValue wherever it is equal to 0 before
> you do the calculation:
>
>   psi = where(psi.ne.0,psi,psi at _FillValue),
> Then
>
> Y = X/psi should work.
>
>
> On Thu, Dec 5, 2019 at 12:21 PM Karin Meier-Fleischer via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
>> Hi Atul,
>>
>> do you want to calculate the avg and the stddev on the longitude
>> coordinate? The functions dim_avg and dim_stddev do the calculations on the
>> right- most dimension. If you want to do it on the time dimension then you
>> should use dim_avg_n and dim_stddev_n functions.
>>
>> To prevent division by 0 you can use the where function. Searching the
>> internet will give you some ncl-talk answers to this issue.
>>
>> -Karin
>>
>>
>> Am 05.12.19 um 10:51 schrieb Atul Saini via ncl-talk:
>>
>> Hi NCL,
>>               I am trying to plot the map showing calculate gridwise
>> coefficient of variation but it is not getting plotted and one error is
>> Division by 0, Can't continue. Please help!
>>
>> Please find the script file and data file attached.
>> Please help, it's urgent.
>>
>> Regards,
>>
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing listncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> --
> Barry H. Lynn, Ph.D
> Senior Associate Scientist, Lecturer,
> The Institute of the Earth Science,
> The Hebrew University of Jerusalem,
> Givat Ram, Jerusalem 91904, Israel
> Tel: 972 547 231 170
> Fax: (972)-25662581
>
> C.E.O, Weather It Is, LTD
> Weather and Climate Focus
> http://weather-it-is.com
> Jerusalem, Israel
> Local: 02 930 9525
> Cell: 054 7 231 170
> Int-IS: x972 2 930 9525
>
> _______________________________________________
> 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/20191205/f7ef8f96/attachment.html>


More information about the ncl-talk mailing list