<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; color: rgb(0, 0, 0); font-size: 18px; font-family: Calibri, sans-serif;">
<div>
<div>
<div>Hello,</div>
<div><br>
</div>
<div>I need to write some data of ubyte type (unsigned 1 bit integer) to a NetCDF file.</div>
<div><br>
</div>
<div>But I got an error saying the ubyte type is not supported by the NetCDF format. I checked and found both NCL and NetCDF support ubyte. I am using v6.1.2.</div>
<div><br>
</div>
<div>Does anyone know a solution? The small example below shows the error:</div>
<div>
<div>ncl 0&gt; f=addfile(&quot;tst.nc&quot;,&quot;c&quot;)</div>
<div>ncl 1&gt; a=23B</div>
<div>ncl 2&gt; f-&gt;a=a</div>
<div>fatal:[&quot;NclFile.c&quot;:474]:FileAddVar: an error occurred while adding a variable to a file, check to make sure data type is supported by the output format</div>
<div>fatal:[&quot;Execute.c&quot;:8126]:Execute: Error occurred at or near line 2</div>
<div><br>
</div>
<div>ncl 3&gt; print(a)</div>
<div><br>
</div>
<div><br>
</div>
<div>Variable: a</div>
<div>Type: ubyte</div>
<div>Total Size: 1 bytes</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 values</div>
<div>Number of Dimensions: 1</div>
<div>Dimensions and sizes: &nbsp; [1]</div>
<div>Coordinates:&nbsp;</div>
<div>(0) &nbsp; &nbsp; 23</div>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>
<div>--&nbsp;</div>
<div><i style="font-family: Calibri; font-size: medium; background-color: rgb(255, 255, 255); ">Qi Tang<br>
Research Scientist<br>
Atmospheric, Earth and Energy Division<br>
Lawrence Livermore National Laboratory<br>
7000 East Ave L-103, Livermore, CA 94550<br>
&#43;1 (925) 423-3514</i></div>
</div>
</div>
</div>
</body>
</html>