﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
369	Check units when reading netCDF	Dave Offiler	Ian Culverwell	"The ''ucar2ropp'' tool does not check the units attributes of parameters loaded from the UCAR input file, but assumes the units from the UCAR documentation. In some cases, an explicit scaling is done to convert to standard ROPP units (see Ticket #312). This is not robust to any change to the file units by UCAR.

Worse, it appears that even for ROPP netCDF files, there is no unit checking/conversion prior to range-checking (only after, just before writing). Hence a user emulating the ROPP netCDF content, but using non-standard (for ROPP) units could break the range-check.

Without going back to old ROPP version, I suspect that when udunits library was replaced by the ut_convert() system (ROPP-3/4?), the units conversion was moved from 'on read' to 'on write'. A correct solution would be to either unit convert all numeric parameters on read, or perform this task within the range-check routine. At the least, all UCAR netCDF parameter attributes should be read (as they are for ROPP-netCDF) and not assumed, to future-proof against arbitrary unit changes.

While straightforward, a proper treatment across all netCDF I/O tools would not be trivial and would need to be thoroughly tested with special datasets with non-standard units, so is outside the scope for v8.0 - so perhaps should be reviewed for v9.0.
"	defect	assigned	normal	Whenever	ropp_io	7.1		netCDF, units, check, conversion	
