Rework NetCDF4 module to allow more flexibility in structuring output.