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

Feature to flag and trap cases where obsolete restart fields are attempted to be used #908

Merged
merged 5 commits into from
Apr 12, 2019
Merged

Feature to flag and trap cases where obsolete restart fields are attempted to be used #908

merged 5 commits into from
Apr 12, 2019

Conversation

jkrasting
Copy link
Contributor

After being burnt by #887, this feature is intended to prevent a production run from inadvertently running with an older restart file and generating non-bitwise results.

jkrasting added 5 commits May 3, 2018 10:43
Merge dev/gfdl from NOAA-GFDL repository
Sync dev/gfdl with NOAA-GFDL version of repository
- Added entries to the MOM restart control structure to carry
  a list of restart variables that are no longer used
- Introduced register_restart_field_as_obsolete() subroutine
- Default behavior is to bring down the model if attempting
  to use an old restart file
- Uses register_restart_field_as_obsolete subroutine
- Cosmetic clean up of comments
- added adjustl() to string comparison - for some reason a leading
  whitespace was present with Intel compiler but not GNU.
@@ -2025,6 +2026,9 @@ subroutine set_visc_init(Time, G, GV, US, param_file, diag, visc, CS, restart_CS
diag%axesCv1, Time, 'Number of layers in viscous mixed layer at v points', 'm')
endif

call register_restart_field_as_obsolete('Kd_turb','Kd_shear', restart_CS)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hallberg-NOAA Should we have a single module in which to place the calls for these obsolete fields, like we do for diagnostics and parameters? It avoids having the calls scattered throughout the code.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as we only have a very few instances of these registration calls for obsolete restart names, I don't think that such a common module is necessary for this capability. Once these calls are occurring in more than about 3 separate places scattered around the code, I think it would be time to add a new centralized repository.

@Hallberg-NOAA
Copy link
Collaborator

This PR is being tested with https://gitlab.gfdl.noaa.gov/ogrp/MOM6/pipelines/7633.

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.

3 participants