Re: Ratio between two fields with some null values

From: <Oliver.Fuhrer_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 13 2010 - 06:29:20 MDT

Maria,

The NCL where statement (
http://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml )
usually does the trick!

Cheers,
Oli

 
________________________________________

Oliver Fuhrer
Numerical Models

Federal Departement of Home Affairs FDHA
Federal Office of Meteorology and Climatology MeteoSwiss

Kraehbuehlstrasse 58, P.O. Box 514, CH-8044 Zurich, Switzerland

Tel. +41 44 256 93 59
Fax +41 44 256 92 78
oliver.fuhrer@meteoswiss.ch
www.meteoswiss.ch - First-hand information
  
 

> -----Original Message-----
> From: ncl-talk-bounces@ucar.edu
> [mailto:ncl-talk-bounces@ucar.edu] On Behalf Of Maria Frontoso
> Sent: Dienstag, 13. Juli 2010 14:04
> To: ncl-talk@ucar.edu
> Subject: Ratio between two fields with some null values
>
> Dear all,
> I would like to plot the variable ratio between two fields A
> and B, but some of these fields have sometimes a *null*
> value, so I get the following error message
>
> *********************************************
> fatal:divide: Division by 0, Can't continue
> fatal:Div: operator failed, can't continue
> *********************************************
>
> Since I don't mind to have an array with *missing* values
> (i.e. the values coming from the division by zero), I would
> like to ask you if there is a way to by-pass that and plot
> the ratio in any cases, regardless by the values of the two
> initial fields A and B.
>
>
> Thanks,
> Maria
> _______________________________________________
> 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 Tue Jul 13 06:29:39 2010

This archive was generated by hypermail 2.1.8 : Mon Jul 19 2010 - 09:39:02 MDT