This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Hi, > I am trying to convert byte array data into .nc file. > > One of the data field name in the original data format contains empty > space (for example : 'W 1') > > NF_DEF_VAR doesn't seem to handle tthis and returns no varid. > > Is there any way for NF_DEF_VAR to handle this problem? Yes, If you are using a more recent version of netCDF than version 3.6.3, then blanks are permitted in variable names. For example, the current version 4.1.3 handles such names (as well as names that use Unicode characters). If you don't want the netCDF-4 enhanced data model, you can build netCDF version 4.1.3 using the configure option "--disable-netcdf-4", and the resulting library will only support the "classic" netCDF-3 data model and API, but will permit more characters in variable names. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: OBD-887406 Department: Support netCDF Priority: Normal Status: Closed