Synchronizes the netcdf file after creating dimensions.