Re: Is it a mistake in "contributed.ncl"

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon, 10 Nov 2008 06:47:44 -0700

My keyboard [not me :-) ] had an issue.

  The only way this could happen is if "x" were
  (say) type short or integer and "wgt" was type
  float or double.

  Please check the variable types on the right hand side.

If the above is the case

  begin
    wRunAve = wgt_runave (x, wgt, kopt)
    copy_VarMeta(x, wRunAve)
    wRunAve_at_wgt_runave_op_ncl = "wgt_runave"
    return(wgtRunAve)
  end if

Dennis Shea wrote:
> The only way this could happen is if "x" were
> (say) type short and "wgt" was type flot or double.
>
> Please chek the variable typs on the right hand side.
>
> Good luck
>
> louis Vonder wrote:
>> Dear all,
>>
>> I try to use the ncl function "wgt_runave_Wrap" (as in MJO Clivar
>> examples 3) and i got the following error:
>>
>> fatal:Assignment type mismatch, right hand side can't be coerced to
>> type of left hand side
>> fatal:Execute: Error occurred at or near line 3878 in file
>> $HOME/NCL_Scripts/contributed.ncl
>>
>> I went in the NCL function "contributed.ncl" to check where the error
>> come from. I looked into this block of the contributed.ncl script
>> (starting at line 4924):
>>
>> ; ******************************************************************
>> ; Dennis Shea
>>
>> ; wrapper for NCL function wgt_runave
>>
>> undef ("wgt_runave_Wrap")
>> function wgt_runave_Wrap( x:numeric, wgt[*]:numeric, kopt[1]:integer)
>> local wRunAve
>> begin
>> wRunAve = x
>> wRunAve = wgt_runave (x, wgt, kopt) wRunAve_at_wgt_runave_op_ncl =
>> "wgt_runave"
>>
>> return(wRunAve)
>> end
>>
>> After commenting this line " wRunAve = x" every thing work !
>>
>> So I want to know if my manipulation is ok?
>>
>> Thanks
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Nov 10 2008 - 06:47:44 MST

This archive was generated by hypermail 2.2.0 : Mon Nov 10 2008 - 10:18:09 MST