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 REMAPPING_USE_OM4_SUBCELLS the default #758

Merged
merged 1 commit into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/core/MOM_open_boundary.F90
Original file line number Diff line number Diff line change
Expand Up @@ -705,10 +705,13 @@
"that were in use at the end of 2018. Higher values result in the use of more "//&
"robust and accurate forms of mathematically equivalent expressions.", &
default=default_answer_date)
call get_param(param_file, mdl, "REMAPPING_USE_OM4_SUBCELLS", OBC%om4_remap_via_sub_cells, &
do_not_log=.true., default=.true.)

Check warning on line 709 in src/core/MOM_open_boundary.F90

View check run for this annotation

Codecov / codecov/patch

src/core/MOM_open_boundary.F90#L709

Added line #L709 was not covered by tests

call get_param(param_file, mdl, "OBC_REMAPPING_USE_OM4_SUBCELLS", OBC%om4_remap_via_sub_cells, &
"If true, use the OM4 remapping-via-subcells algorithm for neutral diffusion. "//&
"See REMAPPING_USE_OM4_SUBCELLS for more details. "//&
"We recommend setting this option to false.", default=.true.)
"We recommend setting this option to false.", default=OBC%om4_remap_via_sub_cells)

Check warning on line 714 in src/core/MOM_open_boundary.F90

View check run for this annotation

Codecov / codecov/patch

src/core/MOM_open_boundary.F90#L714

Added line #L714 was not covered by tests

endif ! OBC%number_of_segments > 0

Expand Down
5 changes: 4 additions & 1 deletion src/diagnostics/MOM_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1616,10 +1616,13 @@ subroutine MOM_diagnostics_init(MIS, ADp, CDp, Time, G, GV, US, param_file, diag
call get_param(param_file, mdl, "INTERNAL_WAVE_SPEED_BETTER_EST", better_speed_est, &
"If true, use a more robust estimate of the first mode wave speed as the "//&
"starting point for iterations.", default=.true.)
call get_param(param_file, mdl, "REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
do_not_log=.true., default=.true.)

call get_param(param_file, mdl, "INTWAVE_REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
"If true, use the OM4 remapping-via-subcells algorithm for calculating EBT structure. "//&
"See REMAPPING_USE_OM4_SUBCELLS for details. "//&
"We recommend setting this option to false.", default=.true.)
"We recommend setting this option to false.", default=om4_remap_via_sub_cells)
call get_param(param_file, mdl, "DEFAULT_ANSWER_DATE", default_answer_date, &
"This sets the default value for the various _ANSWER_DATE parameters.", &
default=99991231)
Expand Down
4 changes: 3 additions & 1 deletion src/framework/MOM_diag_mediator.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3280,10 +3280,12 @@
call get_param(param_file, mdl, "DEFAULT_ANSWER_DATE", default_answer_date, &
"This sets the default value for the various _ANSWER_DATE parameters.", &
default=99991231)
call get_param(param_file, mdl, "REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
do_not_log=.true., default=.true.)

Check warning on line 3284 in src/framework/MOM_diag_mediator.F90

View check run for this annotation

Codecov / codecov/patch

src/framework/MOM_diag_mediator.F90#L3284

Added line #L3284 was not covered by tests
call get_param(param_file, mdl, "DIAG_REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
"If true, use the OM4 remapping-via-subcells algorithm for diagnostics. "//&
"See REMAPPING_USE_OM4_SUBCELLS for details. "//&
"We recommend setting this option to false.", default=.true.)
"We recommend setting this option to false.", default=om4_remap_via_sub_cells)

Check warning on line 3288 in src/framework/MOM_diag_mediator.F90

View check run for this annotation

Codecov / codecov/patch

src/framework/MOM_diag_mediator.F90#L3288

Added line #L3288 was not covered by tests
call get_param(param_file, mdl, "REMAPPING_ANSWER_DATE", remap_answer_date, &
"The vintage of the expressions and order of arithmetic to use for remapping. "//&
"Values below 20190101 result in the use of older, less accurate expressions "//&
Expand Down
4 changes: 3 additions & 1 deletion src/initialization/MOM_state_initialization.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2577,10 +2577,12 @@ subroutine MOM_temp_salt_initialize_from_Z(h, tv, depth_tot, G, GV, US, PF, just
"that were in use at the end of 2018. Higher values result in the use of more "//&
"robust and accurate forms of mathematically equivalent expressions.", &
default=default_answer_date, do_not_log=just_read.or.(.not.GV%Boussinesq))
call get_param(PF, mdl, "REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
do_not_log=.true., default=.true.)
call get_param(PF, mdl, "Z_INIT_REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
"If true, use the OM4 remapping-via-subcells algorithm for initialization. "//&
"See REMAPPING_USE_OM4_SUBCELLS for more details. "//&
"We recommend setting this option to false.", default=.true.)
"We recommend setting this option to false.", default=om4_remap_via_sub_cells)
if (.not.GV%Boussinesq) remap_answer_date = max(remap_answer_date, 20230701)
endif
call get_param(PF, mdl, "HOR_REGRID_ANSWER_DATE", hor_regrid_answer_date, &
Expand Down
4 changes: 3 additions & 1 deletion src/initialization/MOM_tracer_initialization_from_Z.F90
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,12 @@ subroutine MOM_initialize_tracer_from_Z(h, tr, G, GV, US, PF, src_file, src_var_
"that were in use at the end of 2018. Higher values result in the use of more "//&
"robust and accurate forms of mathematically equivalent expressions.", &
default=default_answer_date, do_not_log=.not.GV%Boussinesq)
call get_param(PF, mdl, "REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
do_not_log=.true., default=.true.)
call get_param(PF, mdl, "Z_INIT_REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
"If true, use the OM4 remapping-via-subcells algorithm for initialization. "//&
"See REMAPPING_USE_OM4_SUBCELLS for more details. "//&
"We recommend setting this option to false.", default=.true.)
"We recommend setting this option to false.", default=om4_remap_via_sub_cells)
if (.not.GV%Boussinesq) remap_answer_date = max(remap_answer_date, 20230701)
endif
call get_param(PF, mdl, "HOR_REGRID_ANSWER_DATE", hor_regrid_answer_date, &
Expand Down
4 changes: 3 additions & 1 deletion src/parameterizations/lateral/MOM_internal_tides.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3610,10 +3610,12 @@ subroutine internal_tides_init(Time, G, GV, US, param_file, diag, CS)
"mode speeds are not calculated but are simply reported as 0. This must be "//&
"non-negative for the wave_speeds routine to be used.", &
units="m s-1", default=0.01, scale=US%m_s_to_L_T)
call get_param(param_file, mdl, "REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
do_not_log=.true., default=.true.)
call get_param(param_file, mdl, "INTWAVE_REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
"If true, use the OM4 remapping-via-subcells algorithm for calculating EBT structure. "//&
"See REMAPPING_USE_OM4_SUBCELLS for details. "//&
"We recommend setting this option to false.", default=.true.)
"We recommend setting this option to false.", default=om4_remap_via_sub_cells)
call get_param(param_file, mdl, "UNIFORM_TEST_CG", CS%uniform_test_cg, &
"If positive, a uniform group velocity of internal tide for test case", &
default=-1., units="m s-1", scale=US%m_s_to_L_T)
Expand Down
4 changes: 3 additions & 1 deletion src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1834,10 +1834,12 @@
call get_param(param_file, mdl, "INTERNAL_WAVE_SPEED_BETTER_EST", better_speed_est, &
"If true, use a more robust estimate of the first mode wave speed as the "//&
"starting point for iterations.", default=.true.)
call get_param(param_file, mdl, "REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
do_not_log=.true., default=.true.)

Check warning on line 1838 in src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90

View check run for this annotation

Codecov / codecov/patch

src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90#L1838

Added line #L1838 was not covered by tests
call get_param(param_file, mdl, "EBT_REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
"If true, use the OM4 remapping-via-subcells algorithm for calculating EBT structure. "//&
"See REMAPPING_USE_OM4_SUBCELLS for details. "//&
"We recommend setting this option to false.", default=.true.)
"We recommend setting this option to false.", default=om4_remap_via_sub_cells)

Check warning on line 1842 in src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90

View check run for this annotation

Codecov / codecov/patch

src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90#L1842

Added line #L1842 was not covered by tests
call wave_speed_init(CS%wave_speed, GV, use_ebt_mode=CS%Resoln_use_ebt, &
mono_N2_depth=N2_filter_depth, remap_answer_date=remap_answer_date, &
better_speed_est=better_speed_est, min_speed=wave_speed_min, &
Expand Down
8 changes: 6 additions & 2 deletions src/parameterizations/vertical/MOM_ALE_sponge.F90
Original file line number Diff line number Diff line change
Expand Up @@ -236,10 +236,12 @@ subroutine initialize_ALE_sponge_fixed(Iresttime, G, GV, param_file, CS, data_h,
"robust and accurate forms of mathematically equivalent expressions.", &
default=default_answer_date, do_not_log=.not.GV%Boussinesq)
if (.not.GV%Boussinesq) CS%remap_answer_date = max(CS%remap_answer_date, 20230701)
call get_param(param_file, mdl, "REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
do_not_log=.true., default=.true.)
call get_param(param_file, mdl, "SPONGE_REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
"If true, use the OM4 remapping-via-subcells algorithm for ALE sponge. "//&
"See REMAPPING_USE_OM4_SUBCELLS for more details. "//&
"We recommend setting this option to false.", default=.true.)
"We recommend setting this option to false.", default=om4_remap_via_sub_cells)

call get_param(param_file, mdl, "HOR_REGRID_ANSWER_DATE", CS%hor_regrid_answer_date, &
"The vintage of the order of arithmetic for horizontal regridding. "//&
Expand Down Expand Up @@ -520,10 +522,12 @@ subroutine initialize_ALE_sponge_varying(Iresttime, G, GV, US, param_file, CS, I
"that were in use at the end of 2018. Higher values result in the use of more "//&
"robust and accurate forms of mathematically equivalent expressions.", &
default=default_answer_date)
call get_param(param_file, mdl, "REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
do_not_log=.true., default=.true.)
call get_param(param_file, mdl, "SPONGE_REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
"If true, use the OM4 remapping-via-subcells algorithm for ALE sponge. "//&
"See REMAPPING_USE_OM4_SUBCELLS for more details. "//&
"We recommend setting this option to false.", default=.true.)
"We recommend setting this option to false.", default=om4_remap_via_sub_cells)
call get_param(param_file, mdl, "HOR_REGRID_ANSWER_DATE", CS%hor_regrid_answer_date, &
"The vintage of the order of arithmetic for horizontal regridding. "//&
"Dates before 20190101 give the same answers as the code did in late 2018, "//&
Expand Down
5 changes: 4 additions & 1 deletion src/tracer/MOM_hor_bnd_diffusion.F90
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,13 @@ logical function hor_bnd_diffusion_init(Time, G, GV, US, param_file, diag, diaba
"for vertical remapping for all variables. "//&
"It can be one of the following schemes: "//&
trim(remappingSchemesDoc), default=remappingDefaultScheme)
call get_param(param_file, mdl, "REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
do_not_log=.true., default=.true.)

call get_param(param_file, mdl, "HBD_REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
"If true, use the OM4 remapping-via-subcells algorithm for horizontal boundary diffusion. "//&
"See REMAPPING_USE_OM4_SUBCELLS for details. "//&
"We recommend setting this option to false.", default=.true.)
"We recommend setting this option to false.", default=om4_remap_via_sub_cells)

! GMM, TODO: add HBD params to control optional arguments in initialize_remapping.
call initialize_remapping( CS%remap_CS, string, boundary_extrapolation=boundary_extrap, &
Expand Down
4 changes: 3 additions & 1 deletion src/tracer/MOM_neutral_diffusion.F90
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,12 @@ logical function neutral_diffusion_init(Time, G, GV, US, param_file, diag, EOS,
"that were in use at the end of 2018. Higher values result in the use of more "//&
"robust and accurate forms of mathematically equivalent expressions.", &
default=default_answer_date, do_not_log=.not.GV%Boussinesq)
call get_param(param_file, mdl, "REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
do_not_log=.true., default=.true.)
call get_param(param_file, mdl, "NDIFF_REMAPPING_USE_OM4_SUBCELLS", om4_remap_via_sub_cells, &
"If true, use the OM4 remapping-via-subcells algorithm for neutral diffusion. "//&
"See REMAPPING_USE_OM4_SUBCELLS for more details. "//&
"We recommend setting this option to false.", default=.true.)
"We recommend setting this option to false.", default=om4_remap_via_sub_cells)
if (.not.GV%Boussinesq) CS%remap_answer_date = max(CS%remap_answer_date, 20230701)
call initialize_remapping( CS%remap_CS, string, boundary_extrapolation=boundary_extrap, &
om4_remap_via_sub_cells=om4_remap_via_sub_cells, &
Expand Down