Skip to content
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

Avoid direct use of NetCDF outside of MOM_io.F90 #1312

Closed
Hallberg-NOAA opened this issue Jan 29, 2021 · 1 comment
Closed

Avoid direct use of NetCDF outside of MOM_io.F90 #1312

Hallberg-NOAA opened this issue Jan 29, 2021 · 1 comment
Assignees

Comments

@Hallberg-NOAA
Copy link
Collaborator

There are currently a handful of MOM6 files outside of MOM_io.F90 and the framework directory that use direct calls to NetCDF. This is strongly discouraged, as it can lead to significant code duplication, and a loss of efficiency for large processor count jobs if all of the processors are trying to simultaneously read from the same file, rather than having the root PE read data and then broadcast it. Also, as we consider migrating to different modes for doing I/O, such as having a different set of processors doing diagnostics I/O from those that are doing the calculations themselves, having widely distributed I/O calls greatly complicates the testing, development and transition to any such new I/O paradigms.

Going forward, NetCDF calls should only occur within MOM_io.F90, and the existing MOM6 code will be adapted to change its direct NetCDF calls into calls to routines in MOM_io.F90.

Hallberg-NOAA added a commit to Hallberg-NOAA/MOM6 that referenced this issue Apr 30, 2021
  Revised Surface_Bands_by_data_override in MOM_wave_interface to use the
interfaces from MOM_io instead of direct calls to NF90_ routines to read the
coordinate frequency or wavenumber.  This change will be more efficient by
having only the root processor read the files and then broadcast the information
to the other PEs, and it will be more robust by reusing common code used by
other MOM6 routines.  This commit partially addresses MOM6 issue mom-ocean#1312.  All
answers are bitwise identical.
Hallberg-NOAA added a commit to Hallberg-NOAA/MOM6 that referenced this issue Apr 30, 2021
  Revised write_depth_list to use the interfaces from MOM_io instead of direct
calls to NF90_ routines.  The depth list files that are generated this way are
interchangeable with those from previous versions, but they are larger because
FMS insists on including an unnecessary axis variable with a simple list of
integers for the list axis.  This commit partially addresses MOM6 issue mom-ocean#1312.
All answers are bitwise identical.
@Hallberg-NOAA Hallberg-NOAA linked a pull request Jul 27, 2021 that will close this issue
@Hallberg-NOAA
Copy link
Collaborator Author

This issue has finally been fully addressed by NOAA-GFDL#48.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants