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

+Make MOM_read_data work when 4-d arrays exist #1373

Merged
merged 3 commits into from
Apr 23, 2021

Conversation

Hallberg-NOAA
Copy link
Collaborator

Added internal branches of the infra/FMS1 version of MOM_read_data that work
when there are 4-d arrays with a fifth time dimension in the file that is being
read, which was previously failing even if the variable that is being read has
fewer dimensions, due to code limitations within the fms_io read_data routines.
These new branches are selected via the new optional argument file_may_be_4d.
The infra/FMS2 versions also have the same new optional argument, although in
that case it does nothing. All answers are bitwise identical in the cases that
worked previously, but SIS2 restart files can now be read via the MOM6
infrastructure interfaces.

  Added internal branches of the infra/FMS1 version of MOM_read_data that work
when there are 4-d arrays with a fifth time dimension in the file that is being
read, which was previously failing even if the variable that is being read has
fewer dimensions, due to code limitations within the fms_io read_data routines.
These new branches are selected via the new optional argument file_may_be_4d.
The infra/FMS2 versions also have the same new optional argument, although in
that case it does nothing.  All answers are bitwise identical in the cases that
worked previously, but SIS2 restart files can now be read via the MOM6
infrastructure interfaces.
  Added the optional argument global_file to all of the overloaded MOM_read_data
routines, to indicate whether the file being read is global or is domain-
decomposed using the IO-layout.  With FMS2, this change does nothing, but with
FMS1 it is needed to correctly read from decomposed files that might include 4-d
arrays.  With this change there are versions of SIS2 that reproduce across
restarts without using the FMS1 restart routines.  All answers are bitwise
identical, but there are new optional arguments.
@marshallward
Copy link
Collaborator

marshallward commented Apr 23, 2021

@marshallward
Copy link
Collaborator

There was some discussion about whether file_may_be_4d was too specific for a generic API and could confuse contributors, but we agreed that it helps to solve a tricky FMS transition problem without much code duplication, and that there will be a later opportunity to revise the infra API after the FMS2 transition is complete.

@marshallward marshallward merged commit e7ccf2c into mom-ocean:dev/gfdl Apr 23, 2021
@Hallberg-NOAA Hallberg-NOAA deleted the SIS2_restart_support branch July 30, 2021 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants