Hi Cathy
> I need to do some calculations using the absolute value of a number,
> however I do not know how to take the absolute value of a number using
> NCL. Does anybody know?
For integer input, use the NCL function abs():
Synopsis
function abs(value:integer)
Arguments
value: One or more integer values of any dimension.
Description
This function returns the absolute value of each element of the value
parameter. The return array is dimensioned the same as the value
parameter. Missing values are ignored.
and for input values that aren't integers, use fabs():
Synopsis
function fabs(value:numeric)
Arguments
value: One or more values of any dimension.
Description
This function returns the absolute value of each element of the value
parameter. The return array is dimensioned the same as the value
parameter. Missing values are ignored. The return value is of type
double if input type is double, and float otherwise.
-Rick.
-- Rick Grubin Visualization + Enabling Technologies Scientific Computing Division National Center for Atmospheric Research grubin@ucar.edu 303.497.1832_______________________________________________ ncl-talk mailing list ncl-talk@ucar.edu http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Mon Sep 20 2004 - 14:59:44 MDT