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.
Ludovic, Thanks for sending the ncdump output. With this, I have verified that you found a bug in ncdump, which still exists in the latest snapshot release. We can duplicate the problem with the CDL netcdf ld { dimensions: time = UNLIMITED ; // (17 currently) variables: float temp(time) ; float conduct(time) ; conduct:C_format = "%11.6g" ; float salinity(time) ; salinity:C_format = "%8.4f" ; float sndspeed(time) ; sndspeed:C_format = "%6.1f" ; double density(time) ; density:C_format = "%9.6g" ; double time(time) ; data: temp = 21.793, 21.79, 21.79, 21.789, 21.788, 21.787, 21.786, 21.786, 21.784, 21.784, 21.784, 21.784, 21.784, 21.783, 21.782, 21.78, 21.775 ; conduct = 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.003, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002, 0.002 ; salinity = 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011, 0.011 ; sndspeed = 1465.1, 1465.1, 1465.1, 1465.1, 1465.1, 1465.1, 1465.1, 1465.1, 1465.1, 1465.1, 1465.1, 1465.1, 1465.1, 1465.1, 1465.1, 1465.1, 1465.1 ; density = 999.146, 999.146, 999.146, 999.146, 999.146, 999.146, 999.146, 999.146, 999.146, 999.146, 999.146, 999.146, 999.146, 999.146, 999.146, 999.146, 999.146 ; time = 39425.60131802, 39425.60137139, 39425.60142465, 39425.60147788, 39425.60153113, 39425.60158437, 39425.60163759, 39425.60169102, 39425.6017441, 39425.60179734, 39425.60185068, 39425.60190388, 39425.60195706, 39425.60201029, 39425.6020773, 39425.60214675, } which when run through ncgen and ncdump shows the trailing "g" characters you see, but if the attribute conduct:C_format = "%11.6g" ; is deleted, there are no trailing "g" characcters on the values of the subsequent variables. We will make finding and fixing this bug a high priority and let you know when we have a fix. Thanks for reporting tthe problem! --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: GFG-507049 Department: Support netCDF Priority: Normal Status: Open