Change _FillValue in netCDF file
<p>Is there a python netCDF4 command/example to change the global metadata _FillValue in a netCDF file? I have tried replacing all -ve values in a netCDF file, but till the time the _FillValue attribute is set, that does not work</p>

<p>I don't believe python netCDF4 has a specific function for this, but <a href="http://nco.sourceforge.net/nco.html#ncatted-netCDF-Attribute-Editor" rel="nofollow">NCO's ncatted</a> is an ideal tool for this task.  </p>

<p>From the docs:</p>

<p>To change the missing value from the IEEE NaN value to a normal IEEE number, like 1.0e36:</p>

<pre><code>ncatted -a _FillValue,,m,f,1.0e36 in.nc
</code></pre>

python netcdf netcdf4