NetCDF write file