Skip to content

Commit 6e30d7b

Browse files
committed
update docs
1 parent bff03a4 commit 6e30d7b

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

docs/index.html

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ <h2 id="dimensions-in-a-netcdf-file">Dimensions in a netCDF file</h2>
289289
&lt;class 'netCDF4._netCDF4.Dimension'&gt;: name = 'lon', size = 144
290290
</code></pre>
291291
<p><code><a title="netCDF4.Dimension" href="#netCDF4.Dimension">Dimension</a></code> names can be changed using the
292-
<code>Dataset.renameDimension</code> method of a <code><a title="netCDF4.Dataset" href="#netCDF4.Dataset">Dataset</a></code> or
292+
<code><a title="netCDF4.Dataset.renameDimension" href="#netCDF4.Dataset.renameDimension">Dataset.renameDimension()</a></code> method of a <code><a title="netCDF4.Dataset" href="#netCDF4.Dataset">Dataset</a></code> or
293293
<code><a title="netCDF4.Group" href="#netCDF4.Group">Group</a></code> instance.</p>
294294
<h2 id="variables-in-a-netcdf-file">Variables in a netCDF file</h2>
295295
<p>netCDF variables behave much like python multidimensional array objects
@@ -2676,12 +2676,16 @@ <h3>Instance variables</h3>
26762676
Ignored if <code>significant_digts</code> not specified. If 'BitRound' is used, then
26772677
<code>significant_digits</code> is interpreted as binary (not decimal) digits.</p>
26782678
<p><strong><code>fill_value</code></strong>:
2679-
If specified, the default netCDF <code>_FillValue</code> (the
2679+
If specified, the default netCDF fill value (the
26802680
value that the variable gets filled with before any data is written to it)
2681-
is replaced with this value.
2682-
If fill_value is set to <code>False</code>, then
2683-
the variable is not pre-filled. The default netCDF fill values can be found
2684-
in the dictionary <code>netCDF4.default_fillvals</code>.</p>
2681+
is replaced with this value, and the <code>_FillValue</code> attribute is set.
2682+
If fill_value is set to <code>False</code>, then the variable is not pre-filled.
2683+
The default netCDF fill values can be found in the dictionary <code>netCDF4.default_fillvals</code>.
2684+
If not set, the default fill value will be used but no <code>_FillValue</code> attribute will be created
2685+
(this is the default behavior of the netcdf-c library). If you want to use the
2686+
default fill value, but have the <code>_FillValue</code> attribute set, use
2687+
<code>fill_value='default'</code> (note - this only works for primitive data types). <code><a title="netCDF4.Variable.get_fill_value" href="#netCDF4.Variable.get_fill_value">Variable.get_fill_value()</a></code>
2688+
can be used to retrieve the fill value, even if the <code>_FillValue</code> attribute is not set.</p>
26852689
<p><strong><code>chunk_cache</code></strong>: If specified, sets the chunk cache size for this variable.
26862690
Persists as long as Dataset is open. Use <code>set_var_chunk_cache</code> to
26872691
change it when Dataset is re-opened.</p>
@@ -2806,6 +2810,15 @@ <h3>Methods</h3>
28062810
<p>return a tuple of <code><a title="netCDF4.Dimension" href="#netCDF4.Dimension">Dimension</a></code> instances associated with this
28072811
<code><a title="netCDF4.Variable" href="#netCDF4.Variable">Variable</a></code>.</p></div>
28082812
</dd>
2813+
<dt id="netCDF4.Variable.get_fill_value"><code class="name flex">
2814+
<span>def <span class="ident">get_fill_value</span></span>(<span>self)</span>
2815+
</code></dt>
2816+
<dd>
2817+
<div class="desc"><p><strong><code>get_fill_value(self)</code></strong></p>
2818+
<p>return the fill value associated with this <code><a title="netCDF4.Variable" href="#netCDF4.Variable">Variable</a></code> (returns <code>None</code> if data is not
2819+
pre-filled). Works even if default fill value was used, and <code>_FillValue</code> attribute
2820+
does not exist.</p></div>
2821+
</dd>
28092822
<dt id="netCDF4.Variable.get_var_chunk_cache"><code class="name flex">
28102823
<span>def <span class="ident">get_var_chunk_cache</span></span>(<span>self)</span>
28112824
</code></dt>
@@ -3241,6 +3254,7 @@ <h4><code><a title="netCDF4.Variable" href="#netCDF4.Variable">Variable</a></cod
32413254
<li><code><a title="netCDF4.Variable.filters" href="#netCDF4.Variable.filters">filters</a></code></li>
32423255
<li><code><a title="netCDF4.Variable.getValue" href="#netCDF4.Variable.getValue">getValue</a></code></li>
32433256
<li><code><a title="netCDF4.Variable.get_dims" href="#netCDF4.Variable.get_dims">get_dims</a></code></li>
3257+
<li><code><a title="netCDF4.Variable.get_fill_value" href="#netCDF4.Variable.get_fill_value">get_fill_value</a></code></li>
32443258
<li><code><a title="netCDF4.Variable.get_var_chunk_cache" href="#netCDF4.Variable.get_var_chunk_cache">get_var_chunk_cache</a></code></li>
32453259
<li><code><a title="netCDF4.Variable.getncattr" href="#netCDF4.Variable.getncattr">getncattr</a></code></li>
32463260
<li><code><a title="netCDF4.Variable.group" href="#netCDF4.Variable.group">group</a></code></li>

0 commit comments

Comments
 (0)