Oliver,
I think you may have found a minor bug in NCL. Your program seems
completely legal to me. According to the manual:
http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclStatements.shtml#Procedures
"Parameters in NCL are always passed by reference,
meaning changes to their values, attributes,
*dimension names*, and coordinate variables within
functions change their values outside of the
functions."
I tried your program and got the same warning message. My NCL
version is an early 5.0.1 pre-release on Mac OS 10.5 PPC. Thanks
for reporting this.
Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
http://cires.colorado.edu/science/centers/cdc/
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
http://www.cdc.noaa.gov/
Oliver.Fuhrer_at_meteoswiss.ch wrote on Nov 12:
> Hi all,
>
> When I execute the following script (test.ncl)...
>
> procedure gugus( var:numeric )
> begin
> var!0 = "gugus"
> end
> begin
> a=(/0,1/)
> a!0 = "dada"
> print(a!0)
> gugus(a)
> print(a!0)
> end
>
> ...I get the following output...
>
> (0) dada
> 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
> (0) gugus
>
> The code seems to work, but I don't understand the warning and I don't
> know how to get rid of it.
>
> Thanks for any help,
> Oliver
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 20 2008 - 14:22:06 MST
This archive was generated by hypermail 2.2.0 : Tue Nov 25 2008 - 10:18:44 MST