[ncl-talk] dividing by zero
Laura Fowler
laura at ucar.edu
Mon Nov 7 11:59:03 MST 2016
Hello:
I am trying to get around the error message:
fatal:divide: Division by 0, Can't continue
fatal:Div: operator failed, can't continue
when trying to calculate the ratio between the convective rain and
total rain on a global scale. To avoid dividing by zero, I defined the
missing value:
rain at _FillValue = default_fillvalue(typeof(rain))
prior to the line:
ratio_rainc = where(rain.gt.5.,rainc/rain,rain at _FillValue)
I thought that this would solve the issue of dividing by zero, but it
did not. I am not sure what to try next?
Thanks,
Laura
--
!-------------------------------------------------------------------------------------------------------------
Laura D. Fowler
Mesoscale and Microscale Meteorology Division (MMM)
National Center for Atmospheric Research
P.O. Box 3000, Boulder CO 80307-3000
e-mail: laura at ucar.edu
phone: 303-497-1628
!-------------------------------------------------------------------------------------------------------------
More information about the ncl-talk
mailing list