log10

From: Ben Foster (foster AT XXXXXX)
Date: Fri Jan 30 2004 - 15:18:09 MST


Hi ncl-talk:

Here's a simple question. I want to plot log10 of my field, e.g.:

     var = a->$vars(n)$(time2plot,:,:,lons2plot(i))
     var = log10(var)
     ...
     plot var

If there are values of var <= 0., I get -INF in those areas of the
array after the log10 (no error or warning messages). It then hangs
in the plot call.

I don't think ncl has a "where" function, and I don't want to loop
w/ conditionals, so what is the best way to take log10 of the field
and substitute a fill_value where the array is <= 0.? Thanks,

--Ben

-----------------------------------------------------------------------
Ben Foster High Altitude Observatory (HAO)
foster@ucar.edu phone: 303-497-1595 fax: 303-497-1589
Nat. Center for Atmos. Res. P.O. Box 3000 Boulder CO 80307 USA
-----------------------------------------------------------------------

_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk



This archive was generated by hypermail 2b29 : Fri Jan 30 2004 - 15:56:33 MST