<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> f=addfile("tst.nc","c")</div>
<div>ncl 1> a=23B</div>
<div>ncl 2> f->a=a</div>
<div>fatal:["NclFile.c":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:["Execute.c":8126]:Execute: Error occurred at or near line 2</div>
<div><br>
</div>
<div>ncl 3> print(a)</div>
<div><br>
</div>
<div><br>
</div>
<div>Variable: a</div>
<div>Type: ubyte</div>
<div>Total Size: 1 bytes</div>
<div> 1 values</div>
<div>Number of Dimensions: 1</div>
<div>Dimensions and sizes: [1]</div>
<div>Coordinates: </div>
<div>(0) 23</div>
</div>
<div><br>
</div>
<div>Thanks,</div>
<div>
<div>-- </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>
+1 (925) 423-3514</i></div>
</div>
</div>
</div>
</body>
</html>