netcdf: add CF compliance checker to the autotests
In order to test present and future NetCDF driver code for CF compliance, I propose to add support for the CF compliance checker in the autotests.
The checker is implemented in python and available here: http://pypi.python.org/pypi/cfchecker/2.0.2
It requires that Python, udunits and CDMS (from CDAT) be installed, which might not be supported in every machine.
There are also online checkers using the same tool: http://titania.badc.rl.ac.uk/cgi-bin/cf-checker.pl http://puma.nerc.ac.uk/cgi-bin/cf-checker.pl
These could be used in the absence of a local CDMS install, or better yet we could host a similar app on the gdal server (as to not induce load on these servers), with a limit on file size. Could this be done easily on the gdal or osgeo server?
The checker checks mostly for valid CF tags, but does not report if the grid structure is supported by other software (discussed in ticket #2893). The bug reported in ticket #3324 was found with this checker.
If have adapted the python script to auto-detect the CF Convention attribute in the netcdf file and check against that CF version. I have added support for it and included a simple test in autotest/gdrivers/netcdf.py I have also written a first stab at a perl script for handling the server-side component (but it doesn't work yet).
The cfchecker script requires a few xml files (from the CF conventions and from udunits) which I will upload in one zip file. These could reside in the autotest/gdrivers/data directory, but one is rather large (cf-standard-name-table.xml at 1.3M) and should be distributed in compressed form in svn.