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.
+(*)Set initialized state halos & intent out halos
This PR consists of 3 commits that set the halo regions of several intent(out) variables that are subsequently used in halo update or checksum calls or could otherwise be used to set other variables, such as those related to open boundary conditions.
To achieve this, the new overloaded interfaces
reset_h_var_halo_vals()
andreset_vector_halo_vals()
have been added to the MOM_debugging module to reset the halo regions of a 2-d or 3-d tracer-cell array or the components of a 2-d or 3-d C-grid vector to specified values. When the new runtime parameter RESET_STATE_HALOS_POST_INIT is set to true, these are used to set the 5 state variable halos (h
,u
,v
,T
andS
) to sensible values before a pass var is done on htem. Enabling this option does change answers with the Baltic_OM4_05 test case and perhaps others, but it is not enabled by default.The halos of 7 other intent out variables that are used in halo updates or checksums but do not appear to changes answers (probably because their previously unset halo points are masked out by landmasks when they would not be reset by a halo update) are also explicitly set. The impacted arrays are
u_cor
andv_cor
incontinuity_PPM()
,h_MLD
inconvert_MLD_to_ML_thickness()
,MLD
inenergetic_PBL_get_MLD()
andLmixScale
,bottomFac2
andbarotrFac2
inMEKE_lengthScales()
. This commit does change the values in the debugging checksum output for some cases to more nearly reproduce under dimensional rescaling and rotation.By default, all answers in the MOM6-examples test suite are bitwise identical. However, it is possible that there are cases where the answers change, but if so the existing answers should probably be considered to be incorrect. There are two new public interfaces, and a new entry in the MOM_parameter_doc files. The commits in this PR include: