moved J calculation out of main script, split up T outputs by resatm, renamed files