Skip to content

Commit 76915ff

Browse files
herrwang0adcroft
authored andcommitted
Revert the change from VISC_REM_CONT_VEL_FIX
This particular bugfix was proved to be unnecessary and therefore incorrectly added. Runtime parameter VISC_REM_BUG now controls two bugfixes, related to RK2 time stepping and barotropic vertical weight, which are valid.
1 parent a6d27cf commit 76915ff

File tree

1 file changed

+10
-39
lines changed

1 file changed

+10
-39
lines changed

src/core/MOM_continuity_PPM.F90

Lines changed: 10 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,6 @@ module MOM_continuity_PPM
6464
!! continuity solver for use as the weights in the
6565
!! barotropic solver. Otherwise use the transport
6666
!! averaged areas.
67-
logical :: visc_rem_hvel_fix = .False. !< If true, thickness at velocity points
68-
!! h_[uv] (used by barotropic solver) is not multiplied
69-
!! by visc_rem_[uv].
7067
end type continuity_PPM_CS
7168

7269
!> A container for loop bounds
@@ -809,22 +806,12 @@ subroutine zonal_mass_flux(u, h_in, h_W, h_E, uh, dt, G, GV, US, CS, OBC, por_fa
809806
endif
810807

811808
if (set_BT_cont) then ; if (allocated(BT_cont%h_u)) then
812-
if (CS%visc_rem_hvel_fix) then
813-
if (present(u_cor)) then
814-
call zonal_flux_thickness(u_cor, h_in, h_W, h_E, BT_cont%h_u, dt, G, GV, US, LB, &
815-
CS%vol_CFL, CS%marginal_faces, OBC, por_face_areaU)
816-
else
817-
call zonal_flux_thickness(u, h_in, h_W, h_E, BT_cont%h_u, dt, G, GV, US, LB, &
818-
CS%vol_CFL, CS%marginal_faces, OBC, por_face_areaU)
819-
endif
809+
if (present(u_cor)) then
810+
call zonal_flux_thickness(u_cor, h_in, h_W, h_E, BT_cont%h_u, dt, G, GV, US, LB, &
811+
CS%vol_CFL, CS%marginal_faces, OBC, por_face_areaU, visc_rem_u)
820812
else
821-
if (present(u_cor)) then
822-
call zonal_flux_thickness(u_cor, h_in, h_W, h_E, BT_cont%h_u, dt, G, GV, US, LB, &
823-
CS%vol_CFL, CS%marginal_faces, OBC, por_face_areaU, visc_rem_u)
824-
else
825-
call zonal_flux_thickness(u, h_in, h_W, h_E, BT_cont%h_u, dt, G, GV, US, LB, &
826-
CS%vol_CFL, CS%marginal_faces, OBC, por_face_areaU, visc_rem_u)
827-
endif
813+
call zonal_flux_thickness(u, h_in, h_W, h_E, BT_cont%h_u, dt, G, GV, US, LB, &
814+
CS%vol_CFL, CS%marginal_faces, OBC, por_face_areaU, visc_rem_u)
828815
endif
829816
endif ; endif
830817

@@ -1709,22 +1696,12 @@ subroutine meridional_mass_flux(v, h_in, h_S, h_N, vh, dt, G, GV, US, CS, OBC, p
17091696
endif
17101697

17111698
if (set_BT_cont) then ; if (allocated(BT_cont%h_v)) then
1712-
if (CS%visc_rem_hvel_fix) then
1713-
if (present(v_cor)) then
1714-
call meridional_flux_thickness(v_cor, h_in, h_S, h_N, BT_cont%h_v, dt, G, GV, US, LB, &
1715-
CS%vol_CFL, CS%marginal_faces, OBC, por_face_areaV)
1716-
else
1717-
call meridional_flux_thickness(v, h_in, h_S, h_N, BT_cont%h_v, dt, G, GV, US, LB, &
1718-
CS%vol_CFL, CS%marginal_faces, OBC, por_face_areaV)
1719-
endif
1699+
if (present(v_cor)) then
1700+
call meridional_flux_thickness(v_cor, h_in, h_S, h_N, BT_cont%h_v, dt, G, GV, US, LB, &
1701+
CS%vol_CFL, CS%marginal_faces, OBC, por_face_areaV, visc_rem_v)
17201702
else
1721-
if (present(v_cor)) then
1722-
call meridional_flux_thickness(v_cor, h_in, h_S, h_N, BT_cont%h_v, dt, G, GV, US, LB, &
1723-
CS%vol_CFL, CS%marginal_faces, OBC, por_face_areaV, visc_rem_v)
1724-
else
1725-
call meridional_flux_thickness(v, h_in, h_S, h_N, BT_cont%h_v, dt, G, GV, US, LB, &
1726-
CS%vol_CFL, CS%marginal_faces, OBC, por_face_areaV, visc_rem_v)
1727-
endif
1703+
call meridional_flux_thickness(v, h_in, h_S, h_N, BT_cont%h_v, dt, G, GV, US, LB, &
1704+
CS%vol_CFL, CS%marginal_faces, OBC, por_face_areaV, visc_rem_v)
17281705
endif
17291706
endif ; endif
17301707

@@ -2713,7 +2690,6 @@ subroutine continuity_PPM_init(Time, G, GV, US, param_file, diag, CS)
27132690
!> This include declares and sets the variable "version".
27142691
# include "version_variable.h"
27152692
character(len=40) :: mdl = "MOM_continuity_PPM" ! This module's name.
2716-
logical :: visc_rem_bug ! Stores the value of runtime paramter VISC_REM_BUG.
27172693

27182694
CS%initialized = .true.
27192695

@@ -2774,11 +2750,6 @@ subroutine continuity_PPM_init(Time, G, GV, US, param_file, diag, CS)
27742750
"If true, use the marginal face areas from the continuity "//&
27752751
"solver for use as the weights in the barotropic solver. "//&
27762752
"Otherwise use the transport averaged areas.", default=.true.)
2777-
call get_param(param_file, mdl, "VISC_REM_BUG", visc_rem_bug, default=.true., do_not_log=.true.)
2778-
call get_param(param_file, mdl, "VISC_REM_CONT_HVEL_FIX", CS%visc_rem_hvel_fix, &
2779-
"If true, velocity cell thickness h_[uv] from the continuity solver "//&
2780-
"is not multiplied by visc_rem_[uv]. Default of this flag is set by "//&
2781-
"VISC_REM_BUG.", default=.False.) !, default=.not.visc_rem_bug)
27822753
CS%diag => diag
27832754

27842755
id_clock_reconstruct = cpu_clock_id('(Ocean continuity reconstruction)', grain=CLOCK_ROUTINE)

0 commit comments

Comments
 (0)