<div dir="ltr">NCL team,<div><br></div><div>This program gets a segmentation fault when writing a single value to a Netcdf-4 classic test file.  I get the same behavior with NCL 6.2.1 and 6.3.0 on Mac OS 10.10.2, also NCL 6.2.1 on Redhat Linux 6.6.</div><div><br></div><div><div>mac56&gt; ncdump -s <a href="http://data.nc">data.nc</a></div><div>netcdf data {</div><div>dimensions:</div><div>   t = 3 ;</div><div>variables:</div><div>   float dat(t) ;</div><div>      dat:_Storage = &quot;chunked&quot; ;</div><div>      dat:_ChunkSizes = 3 ;</div><div>      dat:_DeflateLevel = 0 ;</div><div>      dat:_Shuffle = &quot;true&quot; ;</div><div><br></div><div>// global attributes:</div><div>      :_Format = &quot;netCDF-4 classic model&quot; ;</div><div>data:</div><div><br></div><div> dat = 10, 20, 30 ;</div><div>}</div><div>-------------------------------------------------<br></div></div><div>begin<br></div><div><div>  outfile = &quot;<a href="http://data.nc">data.nc</a>&quot;</div><div>  print (&quot;Open test file in write mode: &quot; + outfile)<br></div><div>  out = addfile (outfile, &quot;w&quot;)    ; open as read/write, for updating</div><div><br></div><div>  dims = (/ 3, 5 /)<span class="" style="white-space:pre">                </span>; create dummy array</div><div>  avs = new (dims, float)</div><div>  avs = 99.0</div><div><br></div><div>  vmin = new (3, float, &quot;No_FillValue&quot;)</div><div>  vmin(:) = dim_min_n (avs, 1)</div><div>;;  vmin(:) = min (avs)</div><div><br></div><div>  printFileVarSummary (out, &quot;dat&quot;)</div><div>  print (vmin)</div><div><br></div><div>  print (&quot;Write single value to file variable &#39;dat&#39;.&quot;)</div><div>  out-&gt;dat(0) = (/ vmin(0) /)</div><div>  print (&quot;Test complete.&quot;)<br></div><div>end</div></div><div>-------------------------------------------------<br></div><div>mac56&gt; ncl test6.ncl <br></div><div><div> Copyright (C) 1995-2015 - All Rights Reserved</div><div> University Corporation for Atmospheric Research</div><div> NCAR Command Language Version 6.3.0</div><div> The use of this software is governed by a License Agreement.</div><div> See <a href="http://www.ncl.ucar.edu/">http://www.ncl.ucar.edu/</a> for more details.</div><div>(0)<span class="" style="white-space:pre">        </span>Open empty file in write mode: <a href="http://data.nc">data.nc</a></div><div><br></div><div>Variable: dat</div><div>Type: float</div><div>Total Size: 12 bytes</div><div>            3 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span class="" style="white-space:pre">        </span>[t | 3]</div><div>Coordinates: </div><div>            t: not a coordinate variable</div><div>Number of Attributes: 0</div><div><br></div><div>Variable: vmin</div><div>Type: float</div><div>Total Size: 12 bytes</div><div>            3 values</div><div>Number of Dimensions: 1</div><div>Dimensions and sizes:<span class="" style="white-space:pre">        </span>[3]</div><div>Coordinates: </div><div>(0)<span class="" style="white-space:pre">        </span>99</div><div>(1)<span class="" style="white-space:pre">        </span>99</div><div>(2)<span class="" style="white-space:pre">        </span>99</div><div>(0)<span class="" style="white-space:pre">        </span>Write single value to file variable &#39;dat&#39;.</div><div>/Users/dallured/bin/ncl: line 6: 61511 Segmentation fault: 11  /usr/local/ncl/bin/ncl &quot;$@&quot;</div></div><div><br></div><div>I see the possible combination of two bugs combined.  vmin should have received a _FillValue attribute from the dim_min_n function, and NCL should print a rational error message rather than seg fault.  Let me know if I am misunderstanding something.</div><div><br></div><div>This is a low priority request, I have my own workaround.  Could you please fix one or both of these conditions for a future release.  Thank you for taking a look at this.</div><div><br></div><div>--Dave</div></div>