Re: absolute value symbol?

From: Rick Grubin (grubin AT XXXXXX)
Date: Mon Sep 20 2004 - 14:26:47 MDT

  • Next message: Ertl, John: "overlaying a bar chart on a XY contour"

    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 AT ucar.edu                 303.497.1832
    

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



    This archive was generated by hypermail 2b29 : Mon Sep 20 2004 - 14:59:42 MDT