This command in vi replaces NaNs with -9.9900E+02 s/ NaN/-9.9900E+02/g