copying attributes

From: Jim Edwards <jedwards_at_nyahnyahspammersnyahnyah>
Date: Thu, 30 Mar 2006 11:31:43 -0700

I'm trying to copy a variable from one file to another and collapse a
dimension, to do this I am
doing:

      vtype = getfilevartypes(f1,vnames(n))
      filevardef(f2,vnames(n),vtype, newdims)
      v = f1->$vnames(n)$
      f2->$vnames(n)$ = onedtond(ndtooned(v), newdimsizes)
      copy_VarAtts(v , f2->$vnames(n)$)

It all works (that is there are no errors) but the attributes don't get
copied - any idea why?

Also is there a function to copy global attributes from one file to another
without knowing what they are called?

Thanks,
Jim

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 30 2006 - 11:31:43 MST

This archive was generated by hypermail 2.2.0 : Thu Mar 30 2006 - 15:04:24 MST