Buggy warning still present

From: <Oliver.Fuhrer_at_nyahnyahspammersnyahnyah>
Date: Tue, 5 May 2009 14:22:30 +0200

Hi ncl-talk,

In 5.0 there was a erroneous warning when the dimension name of a
variable was changed in a subroutine and returned to the caller. As NCL
passes variables by reference, there should be no warning. This warning
has been removed in 5.1. But obviously it is still present, if a
subroutine calls a subroutine. The warning is the following...

warning:VarVarWrite: Dimension names for dimension number (0) don't
match, assigning name of rhs dimension to lhs, use "(/../)" if this
change is not desired

The example below illustrates the problem. The problem only arises,
since the dimension name is changed in sub2 called from sub1. If the
call of sub1 on the main script level is replaced with sub2, no warning
is issued.

This might seem a detail, but as we have a library build around the
COSMO model which changes quite frequently the names of dimensions, we
have warnings issued all over the place which clutters the useful output
considerably.

Kind regards,
Oli

------------ dimname_problem.ncl ---------------

undef("sub2")
procedure sub2( var:numeric )
local var, s
begin
  delete(var!0)
  var!0 = "two"
end

undef("sub1")
procedure sub1( var:numeric )
local var
begin
  sub2(var)
end

a = (/1,2,3,4/)
a!0 = "one"
sub1(a)

 
________________________________________

Oliver Fuhrer
Numerical Models

Federal Departement of Home Affairs FDHA
Federal Office of Meteorology and Climatology MeteoSwiss

Kraehbuehlstrasse 58, P.O. Box 514, CH-8044 Zurich, Switzerland

Tel. +41 44 256 93 59
Fax +41 44 256 92 78
oliver.fuhrer_at_meteoswiss.ch
www.meteoswiss.ch - First-hand information
  
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue May 05 2009 - 06:22:30 MDT

This archive was generated by hypermail 2.2.0 : Fri May 08 2009 - 10:05:07 MDT