Mask division by zero.

From: gibies george <gibies_at_nyahnyahspammersnyahnyah>
Date: Tue Mar 29 2011 - 07:00:09 MDT

Here is some part of my ncl script where pdfobsr, pdffcst, pdfratio
and lnpdfrat
are multi dimensional variables.

   pdfobsr = pdf_time(ssnobsr)
    pdffcst = pdf_time(ssnfcst)
    pdfratio = pdffcst/pdfobsr
    lnpdfrat = log(pdfratio)

But (as everybody knows), It will cause problem at some point where pdfobsr
(denominator) is zero.

Can anybody suggest a way to rewrite this script in order to avoid the
division by zero ?

Thanking you in advance.
____________

Note : pdf_time() used above is my function to find the probability density
along time dimension at each grid point.

-- 
*Gibies George,   CSIR-RF,*
*Monsoon Seasonal Prediction Group,
Climate and Global Modelling Division,
Indian Institute of Tropical Meteorology,
Dr. Homi Bhabha Road,
NCL (P. O.), Pashan,
Pune 411008, India.*
*http://sites.google.com/site/gibiesge/*
Please Think about the environment. Save paper; Save Trees; and don't print
this e-mail unless it is necessary.

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Mar 29 07:00:48 2011

This archive was generated by hypermail 2.1.8 : Tue Apr 05 2011 - 09:01:21 MDT