NetCDF4 writer updated for very large files
(cherry-picked from 76e6ab9)