-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MOM6: +I/O interface changes, including a new file_type #1327
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added the new subroutine open_ASCII_file to open text files that can be read or written to using simple Fortran read or write statements. This was previously handled via a common open_file call, but FMS2 is changing the interface for this routine, and creating this new file de-conflicts most the MOM6 calls to open_file from these altered interfaces. The existing routine open_file is unaltered and works exactly as before. A number of existing calls to open_file were also modified to use this new interface, in some cases where only the root_PE was writing, this includes altering the code so that only the root_PE actually opens the file. All answers and output are bitwise identical.
Added the overloaded interface rescale_comp_data to MOM_domains_infra to rescale the values in the computational domain of a 2-d, 3-d, or 4-d array by some factor without having to know the index convention that those arrays used. Also simplified some of the code in MOM_io_infra by making use of rescale_comp_data, and added a new optional scale argument to the various MOM_write_field routines. All answers are bitwise identical, but there are new interfaces and optional arguments for existing routines.
Use the new scale argument to MOM_write_field to simplify write_vertgrid_file and write_ocean_geometry_file. All output and answers are bitwise identical.
Added and used the file_type as the handle for input and output, changing from using an integer. This changes the type of one of the required arguments to write_field, write_MOM_field, create_file, reopen_file, get_file_info, get_file_times, get_file_fields, write_metadata_axis and write_metadata_field, and added new variants of open_file, close_file and flush_file using this new type. Also added the new routine file_is_open. All answers are bitwise identical, but there are changes to multiple I/O interfaces.
Codecov Report
@@ Coverage Diff @@
## dev/gfdl #1327 +/- ##
============================================
- Coverage 45.76% 45.74% -0.02%
============================================
Files 234 234
Lines 72524 72540 +16
============================================
- Hits 33192 33187 -5
- Misses 39332 39353 +21
Continue to review full report at Codecov.
|
Added the new optional scale argument to the real versions of the read_variable routines. All answers are bitwise identical, but there are new optional arguments to public routines.
Revised the depth list type used in MOM_sum_output to accommodate I/O using ordinary routines, and to make the code creating, reading and writing it potentially separable from the MOM_sum_output module by avoiding the use of the MOM_sum_output control structure in most of the routines. Also changed the index 'l' to 'li' in some places to avoid having it misread as '1'. All answers are bitwise identical but there are changes in some subroutine arguments.
Added two more commits that are closely related to this PR.
|
adcroft
approved these changes
Feb 17, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Revised the interfaces for I/O to prepare for the substantial differences
between the FMS1 and FMS2 interfaces, by adding a MOM6-specific file_type,
clearly separating calls for ASCII file I/O and netCDF I/O, and other related
changes. Although there are nontrivial I/O interface changes, all answers and
output files are bitwise identical. The commits in this PR include: