> I don't think it's likely that PETSc will add another output format any time soon.

Agreed, although a dictionary at the top of this file that maps our format types to PETSc format types would help separate the logic out from this code.  It looks like fine in its current form to me.