Skip to content

Commit

Permalink
Fix typos and bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Dec 4, 2019
1 parent f3dba16 commit 9303e99
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/tracer/MOM_neutral_diffusion.F90
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ logical function neutral_diffusion_init(Time, G, param_file, diag, EOS, diabatic
"diffusion routines.", &
default = .false.)
call get_param(param_file, mdl, "HARD_FAIL_HEFF", CS%hard_fail_heff, &
"Bring down the model if a problem with heff is detected",
"Bring down the model if a problem with heff is detected",&
default = .true.)
endif

Expand Down Expand Up @@ -431,7 +431,7 @@ subroutine neutral_diffusion_calc_coeffs(G, GV, US, h, T, S, CS)
CS%ppoly_coeffs_S(i,j,:,:),CS%stable_cell(i,j,:), &
CS%P_i(i+1,j,:,:), h(i+1,j,:), CS%T_i(i+1,j,:,:), CS%S_i(i+1,j,:,:), CS%ppoly_coeffs_T(i+1,j,:,:), &
CS%ppoly_coeffs_S(i+1,j,:,:), CS%stable_cell(i+1,j,:), &
CS%uPoL(I,j,:), CS%uPoR(I,j,:), CS%uKoL(I,j,:), CS%uKoR(I,j,:), CS%uhEff(I,j,:), &
CS%uPoL(I,j,:), CS%uPoR(I,j,:), CS%uKoL(I,j,:), CS%uKoR(I,j,:), CS%uhEff(I,j,:), &
hard_fail_heff = CS%hard_fail_heff)
endif
endif
Expand All @@ -451,7 +451,7 @@ subroutine neutral_diffusion_calc_coeffs(G, GV, US, h, T, S, CS)
CS%ppoly_coeffs_S(i,j,:,:),CS%stable_cell(i,j,:), &
CS%P_i(i,j+1,:,:), h(i,j+1,:), CS%T_i(i,j+1,:,:), CS%S_i(i,j+1,:,:), CS%ppoly_coeffs_T(i,j+1,:,:), &
CS%ppoly_coeffs_S(i,j+1,:,:), CS%stable_cell(i,j+1,:), &
CS%vPoL(I,j,:), CS%vPoR(I,j,:), CS%vKoL(I,j,:), CS%vKoR(I,j,:), CS%vhEff(I,j,:),
CS%vPoL(I,j,:), CS%vPoR(I,j,:), CS%vKoL(I,j,:), CS%vKoR(I,j,:), CS%vhEff(I,j,:), &
hard_fail_heff = CS%hard_fail_heff)
endif
endif
Expand Down Expand Up @@ -1147,8 +1147,8 @@ subroutine find_neutral_surface_positions_discontinuous(CS, nk, Pres_l, hcol_l,

integer, optional, intent(in) :: k_bot_L !< k-index for the boundary layer (left) [nondim]
integer, optional, intent(in) :: k_bot_R !< k-index for the boundary layer (right) [nondim]
logical, optional, intent(in) :: fail_heff_in !< If true (default) bring down the model if the
!! neutral surfaces ever cross [logical]
logical, optional, intent(in) :: hard_fail_heff !< If true (default) bring down the model if the
!! neutral surfaces ever cross [logical]
! Local variables
integer :: ns ! Number of neutral surfaces
integer :: k_surface ! Index of neutral surface
Expand All @@ -1158,7 +1158,7 @@ subroutine find_neutral_surface_positions_discontinuous(CS, nk, Pres_l, hcol_l,
logical :: searching_right_column ! True if searching for the position of a left interface in the right column
logical :: reached_bottom ! True if one of the bottom-most interfaces has been used as the target
logical :: search_layer
logical :: fail_heff ! By default,
logical :: fail_heff ! By default,
real :: dRho, dRhoTop, dRhoBot, hL, hR
real :: z0, pos
real :: dRdT_from_top, dRdS_from_top ! Density derivatives at the searched from interface
Expand All @@ -1180,9 +1180,9 @@ subroutine find_neutral_surface_positions_discontinuous(CS, nk, Pres_l, hcol_l,
reached_bottom = .false.
searching_left_column = .false.
searching_right_column = .false.

fail_heff = .true.
if (PRESENT(fail_heff_in)) fail_heff = fail_heff_in
if (PRESENT(hard_fail_heff)) fail_heff = hard_fail_heff

if (PRESENT(k_bot_L) .and. PRESENT(k_bot_R) .and. PRESENT(zeta_bot_L) .and. PRESENT(zeta_bot_R)) then
k_init_L = k_bot_L; k_init_R = k_bot_R
Expand Down Expand Up @@ -1323,7 +1323,7 @@ subroutine find_neutral_surface_positions_discontinuous(CS, nk, Pres_l, hcol_l,
if (searching_left_column) then
PoL(k_surface) = PoL(k_surface-1)
KoL(k_surface) = KoL(k_surface-1)
elseif (searcing_right_column) then
elseif (searching_right_column) then
PoR(k_surface) = PoR(k_surface-1)
KoR(k_surface) = KoR(k_surface-1)
endif
Expand Down

0 comments on commit 9303e99

Please sign in to comment.