error division by zero

From: Lena Frey <frey_l_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 02 2013 - 08:26:55 MDT
Hi,
 
I have calculated the absolute deviation for the mean meridional streamfunction. Now I would like to calculate the relative deviaiton, but I get the error message "division by zero".
I have used the following configuraton:
 
 Delta = ((psi2-psi)/psi)*100
    Delta!0 = "lev"
    Delta!1 = "lat"
    Delta&lat = lat
    Delta&lev = lev_p
    Delta&lev@units = "hPa"
     if(any(ismissing(Delta))) then
        print("Your data contains some missing values. Beware.")
     end if
     if (any(isnan_ieee(Delta))) then
        value = -1.e34
        replace_ieeenan (Delta, value, 0)
        Delta@_FillValue = value
     end if
 
Has anyone an idea?
 
Thanks.
 
Lena
 

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jul 2 08:27:07 2013

This archive was generated by hypermail 2.1.8 : Fri Jul 05 2013 - 13:06:49 MDT