Allow for variance in netCDF4 behaviour.

A replacement for #1258.

@bjlittle - would you mind taking a quick look.
Your wish is my command. I've pushed an amended commit.