Changeset 1591 in lmdz_wrf


Ignore:
Timestamp:
Aug 2, 2017, 7:04:44 PM (8 years ago)
Author:
lfita
Message:

Fixing minor issues on `get_Variables' related to the fill_Value' definition

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r1584 r1591  
    1850518505        if varinf.FillValue is not None:
    1850618506            newvar = onewnc.createVariable(var, nctype(varinf.dtype), tuple(vardims),\
    18507               fillvalue = varinf.FillValue)
     18507              fill_value = varinf.FillValue)
    1850818508        else:
    1850918509            newvar = onewnc.createVariable(var, nctype(varinf.dtype), tuple(vardims))
    1851018510        newvar[:] = ovar[:]
    1851118511        for attrn in varinf.attributes:
    18512             attrv = ovar.getncattr(attrn)
    18513             newattr = set_attribute(newvar, attrn, attrv)
     18512            if attrn != '_FillValue':
     18513                attrv = ovar.getncattr(attrn)
     18514                newattr = set_attribute(newvar, attrn, attrv)
    1851418515
    1851518516        onewnc.sync()
Note: See TracChangeset for help on using the changeset viewer.