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.
> Hello, > > > i try to write coordinates, using the same name for the dimension and > the coordinate variable: > > status=nc_def_dim(ncid,"time",NC_UNLIMITED,&time_dim); > ... > time_dimids[0]=time_dim; > time_dimids[1]=tl_dim; > status=nc_def_var(ncid,"time",NC_CHAR,2,time_dimids,&time_id); > ... > > It works perfectly with netCDF 3.6 but with netCDF 4.0 and HDF format > an "HDF error" occurs. If i rename the variable to "times" it works > also with netCDF 4.0. It think this is a bug of netCDF 4? Is there any > fix for that available? > > The problem doesn't occur if the coordinate variable is only > onedimensional. Yes, this is the way netcdf-4 is written, but now that you mention it, that's not what you want... What do you store in the 2D variable? Thanks, Ed Ticket Details =================== Ticket ID: YSI-369373 Department: Support netCDF Priority: Normal Status: Open