Clean up of coare function. Still doesn't agree with NCAR or Kara though. Needs a more thorough test