Fixes some compiler compatibility issues (which arise from ambiguity in the code):
gnu compiler was complaining about "buffer" being a derived type (it was a local variable but also a module subroutine)
nVidia compiler was complaining about write_restart because it was both a renamed subroutine from another module and a local subroutine
I've checked this compiles and runs in both FMS1 mode and FMS2 with 2023.01 tag (although the AM2-based coupled models cannot be tested because they do not compile with FMS2).
Fixes some compiler compatibility issues (which arise from ambiguity in the code):
I've checked this compiles and runs in both FMS1 mode and FMS2 with 2023.01 tag (although the AM2-based coupled models cannot be tested because they do not compile with FMS2).