-
Notifications
You must be signed in to change notification settings - Fork 230
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
Use MOM_io in Surface_Bands_by_data_override #1388
Use MOM_io in Surface_Bands_by_data_override #1388
Conversation
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.
Thanks @Hallberg-NOAA . At a glance this looks like a good rewriting of the NetCDF interfaces. I'm going to try to piece together a short test case to verify all the behavior (there unfortunately isn't any way to test in the current MOM6-examples repo). This may take a few days, but hopefully by early next week. Might be worth merging that test back into MOM6-examples, probably a light-weight single column example. |
Modified get_var_sizes so it does return ndims = -1 when querying for a variable that does not exist in a file (which was the intended behavior) and made use of this new and proper functionality to avoid using the function field_exists() in Surface_Bands_by_data_override(), because the fms_io implementation of field_exists incorrectly returns false when the variable being sought is also the name of a coordinate. Three minor bugs in wave diagnostics that Brandon Reichl had identified were also fixed, as was a test controlling an allocate statement. All answers are bitwise identical in cases that worked before, and the waves code is now working correctly with all IO calls going via MOM_io, rather than calling netCDF routines directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes now work in my test case. I approve.
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 #1312. All
answers are bitwise identical.