Changeset 1886 in lmdz_wrf for trunk


Ignore:
Timestamp:
Apr 3, 2018, 11:48:23 PM (7 years ago)
Author:
lfita
Message:

Adding assignment of fill_value in `splitfile_dim'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/nc_var_tools.py

    r1885 r1886  
    2415524155                            newdim=onewnc.createDimension(dv,1)
    2415624156
    24157             newvar = onewnc.createVariable(vn, nctype(ovn.dtype), dvs)
     24157            if gen.searchInlist(ovn.ncattrs(),'_FillValue'):
     24158                attrv = ovn.getncattr('_FillValue')
     24159                newvar = onewnc.createVariable(vn, nctype(ovn.dtype), dvs,           \
     24160                  fill_value=attrv)
     24161            else:
     24162                newvar = onewnc.createVariable(vn, nctype(ovn.dtype), dvs)
    2415824163            newvar[:] = ovn[tuple(slicevar)]
    2415924164            ovattr = ovn.ncattrs()
Note: See TracChangeset for help on using the changeset viewer.