Reorganisation of netcdf compatibility functions

Plus minor changes to pass latitude and longitude information so that
analysis will fail when model and obs are incompatible.