Modified to do byteswapping of the entire array at once. Only affects grid data byte-swapping when turned on 
with parallel I/O in the command line.