Skip to content

Commit

Permalink
Fix logic for reading parameter in MOM_tracer_advect.F90
Browse files Browse the repository at this point in the history
We had random behavior in the doc files because the logical `CS%useHuynh`
was not set when using the PLM scheme.
  • Loading branch information
adcroft committed Jul 31, 2024
1 parent c3349ab commit 90749f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/tracer/MOM_tracer_advect.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1133,14 +1133,16 @@ subroutine tracer_advect_init(Time, G, US, param_file, diag, CS)
"Unknown TRACER_ADVECTION_SCHEME = "//trim(mesg))
end select

if (CS%useHuynh) then
call get_param(param_file, mdl, "USE_HUYNH_STENCIL_BUG", &
if (CS%usePPM) then
if (CS%useHuynh) then
call get_param(param_file, mdl, "USE_HUYNH_STENCIL_BUG", &
CS%useHuynhStencilBug, &
desc="If true, use a stencil width of 2 in PPM:H3 tracer advection. " &
// "This is incorrect and will produce regressions in certain " &
// "configurations, but may be required to reproduce results in " &
// "legacy simulations.", &
default=.false.)
endif
endif

id_clock_advect = cpu_clock_id('(Ocean advect tracer)', grain=CLOCK_MODULE)
Expand Down

0 comments on commit 90749f3

Please sign in to comment.