A simpler version of this function
ERS edits
Merge branch 'master' of github.com:NCEAS/commdyn