Issue with netcdf driver and srs units
In 1.8.x the netcdf driver scales the inputs for the geotransform to find the extents if the units of the srs are in something other than meters. With new features in 1.9dev, the linear unit of the srs is set when writing. If the netcdf file is warped, the gt is scales manually, then the scale is applied again when the new file is created, meaning the extents are multiplied by 1000 (for kilometers) and then the linear units of the srs are set to km. This may cause 'double scaling' if the app using the file respects the UNIT tag in the srs. I suggest the removal of the manual scaling and set the linear unit in the srs appropriately. Currently the linear unit is not set on read, but only on write.
This is hard for me to explain. Attached is a patch to remove the manual scaling code, and I suggest etienne decide what to do as he is more familiar with the current state of the driver. I am not totally comfortable committing a change since I haven't worked on the driver for a while and it has changed a lot.