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

      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?


ncl-talk mailing list
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