Re: making ncl quiet

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 15 Aug 2006 21:12:44 -0600 (MDT)

oops!!
         fii = new ( dimsizes(ii), "float")
         fii = ii ; I forgot this
         x = foo(fii, ...)

On Tue, 15 Aug 2006, Dennis Shea wrote:

> I too have asked for a way to turn off warning messages.
> Perhaps, "ncl -W ...."
>
> One of current developers looked at the possibility.
> [FTR: He did not consider it a "feature". :-) ]
>
> The problem is that the errors are not issued
> from one place. Rather, they are embedded in many different
> places within the core code. It would take considerable
> time to implement a "-W" option.
>
> ---
>
> So, how to turn the warnings off?
>
>
> Basically, here is what is happening:
>
> [1] A function/procedure has an argument prototyped as
> (say) "float" or "double.
>
> function/procedure foo(arg0:float, ....)
>
> A user passes a variable [say, ii] of type integer to "foo"
>
> x = foo(ii,...)
>
> NCL 'sees' that "foo" wants a variable of type "float".
> Thus. it creates a temporary variable of type float (say, fii).
> Then the integer ii values are "coerced" to type float.
> The temporary variable (fii) is then passed to "foo".
> If "foo" changes the values of this temporary variable,
> they will not be affect the original integer "ii" variable.
>
> [2] ?fix? Well ... fix the offending arguments being input
> to the function/procedure. The error message says that the
> offending argument is "Argument 0" ... Since NCL counts
> start at 0 ... it is the 1st argement.
>
> So, manually do what NCL does automatically.
>
> fii = new ( dimsizes(ii), "float")
>
> x = foo(fii, ...)
>
> Now if "foo" changes "fii" the changed values will be returned.
>
> good luck
> D
>
>
>
>
>
>> I guess this warning is generated when there is a mismatch in the variable
>> type between the main script and its subroutine.
>> I would double-check all variable types in the script. Hope this helps.
>>
>>
>>> I don't believe it can be done. I have asked this question before and
>>> gather than the developers consider this a 'feature.' I feel your pain.
>>>
>>>> Hi all -
>>>> I get a repetitive warning which I understand and have chosen to ignore:
>>>>
>>>> warning:Argument 0 of the current function or procedure was coerced to
>>>> the appropriate type and thus will not change if the function or
>>>> procedure modifies its value
>>>>
>>>> How do I get NCL to stop telling me about it (ie turn warnings off)?
> ----------------------------------------------------------------------
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 15 2006 - 21:12:44 MDT

This archive was generated by hypermail 2.2.0 : Fri Aug 18 2006 - 10:43:09 MDT