Make the handling of file units consistent for all unformatted files #12
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR complements previous various commits to handle unformatted binary I/O.
Setting environment variable
setenv GFORTRAN_CONVERT_UNIT 'big_endian:101-200'
is still required for mpas/mpasjedi excutables built within mpas_bundle for reasons described in commit 7f75b3a.The issue noted in https://github.com/JCSDA-internal/mpas-bundle/issues/86 is that 'native' should not have been set in GFORTRAN_CONVERT_UNIT. When the code is compiled with big_endian, setting runtime environment native (little_endian on cheyenne) overwrites the compilation setting. The ungrib files are read by mpas_init_atmosphere through unit number 10-100 in the original code.
This PR is a follow-on to MPAS-Dev#743, ensuring that
mpas_new_unit
andmpas_release_unit
are used to manage file units instead of using fixed values.