added functions writeTD3505 and writeAMInpfile.R