Re: NCL abs error on Linux

From: Rick Grubin <grubin_at_nyahnyahspammersnyahnyah>
Date: Mon, 10 Sep 2007 12:52:59 -0600

Hi Nan

> We are running an ncl program on robin1 at ORNL (linux box).
>
> It is complaining about every absolute value argument we have in
> the code (the identical code runs fine on NCAR machines).
> e.g.,: diff13 = abs(var_avg_1_intp - doubletofloat
> (var_avg_3_intp))
>
> fatal:Argument type mismatch on argument (0) of (abs) can not
> coerce
>
> Has anyone else run into a problem with either Linux and/or an ORNL
> machine and 'abs' with NCL? Are we missing some library call?
>
> NCAR Command Language Version 4.2.0.a033
> diff13 = abs(var_avg_1_intp - doubletofloat
> (var_avg_3_intp))
> diff23 = abs(var_avg_2_intp - doubletofloat
> (var_avg_3_intp))

The NCL 'abs()' function, as of version 4.2.0.a034 (a version *later*
than what you're using at ORNL), accepts arguments of
any numeric type (byte / short / integer / long / float / double).
Prior to that, NCL (including the version you're using at ORNL)
did not allow floating point data types as an argument to abs() (then
known as 'fabs()').

You'll need to upgrade the version of NCL at ORNL on the host you're
using to take advantage of the latest version of abs(). If
you're unable to upgrade, version 4.2.0.a033 of NCL should include
the function 'fabs()' which does accept floating point types.

For more information, see: http://www.ncl.ucar.edu/Document/
Functions/Built-in/abs.shtml

-Rick.
----
Rick Grubin NCAR/TDD/CISL/VETS
Visualization + Enabling Technologies
grubin_at_ucar.edu 303.497.1832

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Sep 10 2007 - 12:52:59 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 11 2007 - 10:34:39 MDT