Re: copy_VarAtts

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Feb 07 2011 - 06:36:01 MST

This does not help.

You can always extract the function from controbutd.ncl and add some
print statemenst

undef("copy_VarAtts")
procedure copy_VarAtts(var_from,var_to)
local att_names, i
begin
   att_names =getvaratts(var_from);
print(att_names)
     if(.not.all(ismissing(att_names)))
print("past if(.not.all(ismissing(att_names))) ")
nAtts = dimsizes(att_names)
print("nAtts="+nAtts)
       do i = 0,dimsizes(att_names)-1
          if (isatt(var_to,att_names(i))) then
              delete(var_to@$att_names(i)$) ; var_from att may be diff
size/type
          end if
          var_to@$att_names(i)$ = var_from@$att_names(i)$
       end do
   end if
end

On 2/7/11 5:57 AM, gibies george wrote:
> copy_VarAtts (data, data1)
>
> gives an error message:
>
> fatal:Subscript out of range, error in subscript #0
> fatal:An error occurred reading att_names
> fatal:Execute: Error occurred at or near line 329 in file
> $NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl
>
> Can anybody point out the reason?
>
> --
> *Gibies George, CSIR-RF,
> Climate and Global Modelling Division,
> Indian Institute of Tropical Meteorology,
> Dr. Homi Bhabha Road,
> NCL (P. O.), Pashan,
> Pune 411008, India.*
>
> *http://sites.google.com/site/gibiesge/*
>
> Think about the environment. Save paper; Save Trees. Please don't print
> this e-mail unless it is necessary.
>
>
>
> _______________________________________________
> 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 Feb 7 06:36:07 2011

This archive was generated by hypermail 2.1.8 : Fri Feb 11 2011 - 16:11:42 MST