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

inconsistency between bug flags #237

Closed
raphaeldussin opened this issue Nov 14, 2022 · 2 comments
Closed

inconsistency between bug flags #237

raphaeldussin opened this issue Nov 14, 2022 · 2 comments

Comments

@raphaeldussin
Copy link

some bugfix runtime parameters use FIX_SOME_BUG = True while the majority use the form SOME_OTHER_BUG = False,
which can lead to confusion/mistakes. The offenders are:

 grep -r FIX * | grep get_param | grep -i bug
config_src/drivers/mct_cap/mom_surface_forcing_mct.F90:  call get_param(param_file, mdl, "FIX_USTAR_GUSTLESS_BUG", CS%fix_ustar_gustless_bug, &
config_src/drivers/nuopc_cap/mom_surface_forcing_nuopc.F90:  call get_param(param_file, mdl, "FIX_USTAR_GUSTLESS_BUG", CS%fix_ustar_gustless_bug, &
config_src/drivers/FMS_cap/MOM_surface_forcing_gfdl.F90:  call get_param(param_file, mdl, "FIX_USTAR_GUSTLESS_BUG", CS%fix_ustar_gustless_bug, &
config_src/drivers/solo_driver/MOM_surface_forcing.F90:  call get_param(param_file, mdl, "FIX_USTAR_GUSTLESS_BUG", CS%fix_ustar_gustless_bug, &
src/core/MOM_dynamics_unsplit.F90:  call get_param(param_file, mdl, "FIX_UNSPLIT_DT_VISC_BUG", CS%use_correct_dt_visc, &
src/core/MOM_dynamics_unsplit_RK2.F90:  call get_param(param_file, mdl, "FIX_UNSPLIT_DT_VISC_BUG", CS%use_correct_dt_visc, &
@ezaron
Copy link

ezaron commented May 24, 2023

Can you please clarify the desired behavior and default?

Do you want <NAME_OF_BUG>_BUG = True to maintain the original pre-bugfix behavior?

Do you suggest default value, False, so that the default fixes the bug? Or should this be decided on a case-by-case basis?

Do you want to omit the prefix "FIX_", in favor of keeping "_BUG" to make grepping easier and more consistent?

marshallward pushed a commit that referenced this issue Dec 19, 2023
  Renamed the runtime parameter FIX_USTAR_GUSTLESS_BUG to USTAR_GUSTLESS_BUG
(with a switch between the meanings of true and false for the two parameters)
for consistency with the syntax of other bug-fix flags in MOM6 and to partially
address dev/gfdl MOM6 issue #237.  Input parameter files need not be changed
right away because MOM6 will still work if FIX_USTAR_GUSTLESS_BUG is specified
instead of USTAR_GUSTLESS_BUG, but USTAR_GUSTLESS_BUG will be logged, so there
are changes to the MOM_parameter_doc files.   By default or with existing input
parameter files, all answers are bitwise identical, and there is error handling
if inconsistent settings of FIX_USTAR_GUSTLESS_BUG and USTAR_GUSTLESS_BUG are
both specified.
marshallward pushed a commit that referenced this issue Dec 21, 2023
  Renamed the runtime parameter FIX_UNSPLIT_DT_VISC_BUG to UNSPLIT_DT_VISC_BUG
(with a switch between the meanings of true and false for the two parameters)
for consistency with the syntax of other bug-fix flags in MOM6 and to partially
address dev/gfdl MOM6 issue #237.  Input parameter files need not be changed
right away because MOM6 will still work if FIX_UNSPLIT_DT_VISC_BUG is specified
instead of UNSPLIT_DT_VISC_BUG, but UNSPLIT_DT_VISC_BUG will be logged, so there
are changes to the MOM_parameter_doc files.   By default or with existing input
parameter files, all answers are bitwise identical, and there is error handling
if inconsistent settings of FIX_UNSPLIT_DT_VISC_BUG and UNSPLIT_DT_VISC_BUG are
both specified.
@Hallberg-NOAA
Copy link
Member

This issue has been addressed with dev/gfdl MOM6 PRs #535 and #536, and can now be closed.

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

No branches or pull requests

3 participants