Faster code for the merging/saving of .nc files