Changeset 910 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Jun 20, 2016, 1:40:03 PM (8 years ago)
Author:
lfita
Message:

Fixing repeated attribute in `chdimname'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r909 r910  
    745745
    746746                  for attrn in varinf.attributes:
    747                       attrv = fvar.getncattr(attrn)
    748                       newar = newvar.setncattr(attrn, attrv)
     747                      newvarattr = newvar.ncattrs()
     748                      if not gen.searchInlist(newvarattr, attrn):
     749                          attrv = fvar.getncattr(attrn)
     750                          newar = newvar.setncattr(attrn, attrv)
    749751
    750752                  fvar = ncf.renameVariable(fvarn, fvarn + 'rmdname')
     
    1616116163            tempt = temp.transpose()
    1616216164            qvt = qv.transpose()
    16163             print fname + ' Lluis shapes varint:', varint.shape, 'prest:', prest.shape, \
    16164               'psfct:', psfct.shape, 'hgtt:', hgtt.shape,' tempt:', tempt.shape, 'qvt:',qvt.shape
    1616516165            varinterp = fin.module_forinterpolate.interp( data_in=varint,            \
    1616616166              pres_field=prest, interp_levels=interplevs, psfc=psfct,                \
Note: See TracChangeset for help on using the changeset viewer.