added missing line of code, removed pre-write initialization of arrays, (netcdf does this automatically).