prototype
prepared for use in other projects via FetchContent
deduped error print code
put Fortran standard unlink() for robustness--netcdf open options didn't seem clear as to how to overwrite file while staying in modern mode. otherwise would have to bitwise AND?