Re: NCL abs error on Linux

From: Andrea Hahmann <hahmann_at_nyahnyahspammersnyahnyah>
Date: Mon, 10 Sep 2007 12:46:51 -0600

Dear Nan

Try "fabs" instead of "abs". "abs" is for integers only.

Andrea

Nan Rosenbloom wrote:
> 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?
>
> Thanks -
>
> Nan Rosenbloom
>
>
> ------------------------------------------------------------------------
>
> Subject:
> error with abs
> From:
> Samuel Levis <slevis_at_ucar.edu>
> Date:
> Mon, 10 Sep 2007 12:10:02 -0600
> To:
> Nan Rosenbloom <nanr_at_ucar.edu>
>
> To:
> Nan Rosenbloom <nanr_at_ucar.edu>
>
>
> Problem appears on robin1.ccs.ornl.gov, a linux machine.
>
> In /model1-model2/set_2.ncl:
> ------------------------------------
> [...]
> printVarSummary(var_avg_1_intp)
> printVarSummary(var_avg_3_intp)
> diff13 = abs(var_avg_1_intp -
> doubletofloat(var_avg_3_intp))
> diff23 = abs(var_avg_2_intp -
> doubletofloat(var_avg_3_intp))
> [...]
>
> The output looks like this:
> --------------------------------
> restarting at set 2
> Starting set2 ----------------------------------------
> Copyright (C) 1995-2006 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 4.2.0.a033
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> (0) =========================================
> (0) Starting: set_2.ncl
> (0) Start Time: Mon Sep 10 14:03:07 EDT 2007
> (0) =========================================
> (0) Processing season DJF
> (0) Processing variable TSA
>
>
> Variable: var_avg_1_intp
> Type: float
> Total Size: 55296 bytes
> 13824 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat | 96] x [lon | 144]
> Coordinates:
> lat: [-90..90]
> lon: [ 0..357.5]
> Number Of Attributes: 6
> long_name : 2m air temperature
> units : K
> cell_method : time: mean
> missing_value : 1e+36
> _FillValue : 1e+36
> average_op_ncl : dim_avg over dimension: time
>
>
> Variable: var_avg_3_intp
> Type: double
> Total Size: 110592 bytes
> 13824 values
> Number of Dimensions: 2
> Dimensions and sizes: [lat | 96] x [lon | 144]
> Coordinates:
> lat: [-90..90]
> lon: [ 0..357.5]
> Number Of Attributes: 5
> missing_value : -999
> long_name : 2-meter air temperature
> units : K
> _FillValue : 1.000000015047466e+30
> season : 0
> fatal:Argument type mismatch on argument (0) of (abs) can not coerce
> fatal:Execute: Error occurred at or near line 883 in file
> /spin/home/slevis/lnd_diag/code/model1-model2/set_2.ncl
>
>
>
> EXIT lnd_diag-version:/spin/home/slevis/lnd_diag Mon Sep 10 14:03:08
> EDT 2007
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

-- 
----------------------------------------------------------------
Andrea N. Hahmann, Ph.D.
Research Applications Laboratory
Natl. Center for Atmospheric Research      Phone: 1-303-497-8383
PO BOX 3000                                Fax:   1-303-497-8401
Boulder, CO 80301                          hahmann_at_ucar.edu
----------------------------------------------------------------
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Sep 10 2007 - 12:46:51 MDT

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