Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #GFG-507049]: ncdump and ncgen



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
russ@xxxxxxxxxxxxxxxx                     http://www.unidata.ucar.edu



Ticket Details
===================
Ticket ID: GFG-507049
Department: Support netCDF
Priority: Normal
Status: Open


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Office of Programs University Corporation for Atmospheric Research (UCAR)   Unidata is a member of the UCAR Office of Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690