From af410950e5baf70ec66f88d129ee8c9d4420dd78 Mon Sep 17 00:00:00 2001 From: Andrew Shao Date: Thu, 26 Sep 2019 17:17:01 -0600 Subject: [PATCH] Fix uninitialized variables in find_surface when NDIFF_INTERIOR_ONLY = False --- src/tracer/MOM_neutral_diffusion.F90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tracer/MOM_neutral_diffusion.F90 b/src/tracer/MOM_neutral_diffusion.F90 index 25adcf3820..4e7b87886a 100644 --- a/src/tracer/MOM_neutral_diffusion.F90 +++ b/src/tracer/MOM_neutral_diffusion.F90 @@ -1177,6 +1177,9 @@ subroutine find_neutral_surface_positions_discontinuous(CS, nk, Pres_l, hcol_l, p_init_L = zeta_bot_L; p_init_R = zeta_bot_R lastP_left = zeta_bot_L; lastP_right = zeta_bot_R kl_left = k_bot_L; kl_right = k_bot_R + else + k_init_L = 1 ; k_init_R = 1 + p_init_L = 0. ; p_init_R = 0. endif ! Loop over each neutral surface, working from top to bottom neutral_surfaces: do k_surface = 1, ns