fix #78

A few places the files were open but not closed
grid, missing var check, getting var.
This seems to fix the issue.
@gleckler1 parmeters file runs fine with a ulimit of 50 (vs the default of 1024 that failed before)
Merge pull request #155 from PCMDI/issue_78_too_many_files_open

LGTM - fix #78