Re: how can I avoid dividing by zero?

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Mar 26 2012 - 08:07:55 MDT

Additionally, the 'where' function
   http://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml

See the Description section
   yinv = 1. / where(y.ne.0, y, y@_FillValue)

On 3/26/12 7:39 AM, Alessandra Giannini wrote:
>
> Hi!
>
> mask the zero values, using the mask function:
>
> <http://www.ncl.ucar.edu/Document/Functions/Built-in/mask.shtml>
>
>
>
>
>
>
>
> On Mar 26, 2012, at 9:35 AM, Mohamad Ibrahim OMAR wrote:
>
>> hi all,
>> how can I remove the zero values to avoid dividing by zero
>> the error I got is as the following:
>>
>> fatal:divide: Division by 0, Can't continue
>> fatal:Div: operator failed, can't continue
>>
>>
>> my script is attached
>> thanks
>> Mohamed Ibrahim El-Sayed OMAR
>> Egyptian Meteorological Authority
>> Scientific Research Department
>> Climate Studies Centre
>> Kobry El-Quobba, P.O.Box. 11784
>> Cairo, EGYPT
>> Mobil phone : 002 0160802805
>> Home Phone : 002 0482370261
>> <RT_Bias_all_season.ncl>_______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Mar 26 08:08:02 2012

This archive was generated by hypermail 2.1.8 : Tue Mar 27 2012 - 08:50:24 MDT