Skip to content

Commit

Permalink
Remove dependence on the boundary layer scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Mar 2, 2020
1 parent 83da090 commit a446d0f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/tracer/MOM_lateral_boundary_diffusion.F90
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ logical function lateral_boundary_diffusion_init(Time, G, param_file, diag, diab
call extract_diabatic_member(diabatic_CSp, energetic_PBL_CSp=CS%energetic_PBL_CSp)

CS%surface_boundary_scheme = -1
if ( .not. ASSOCIATED(CS%energetic_PBL_CSp) .and. .not. ASSOCIATED(CS%KPP_CSp) ) then
call MOM_error(FATAL,"Lateral boundary diffusion is true, but no valid boundary layer scheme was found")
endif
! if ( .not. ASSOCIATED(CS%energetic_PBL_CSp) .and. .not. ASSOCIATED(CS%KPP_CSp) ) then
! call MOM_error(FATAL,"Lateral boundary diffusion is true, but no valid boundary layer scheme was found")
! endif

! Read all relevant parameters and write them to the model log.
call get_param(param_file, mdl, "LATERAL_BOUNDARY_METHOD", CS%method, &
Expand Down Expand Up @@ -151,7 +151,7 @@ subroutine lateral_boundary_diffusion(G, GV, US, h, Coef_x, Coef_y, dt, Reg, CS)
real :: Idt !< inverse of the time step [s-1]

Idt = 1./dt
hbl(:,:) = 0.
hbl(:,:) = 100.
if (ASSOCIATED(CS%KPP_CSp)) call KPP_get_BLD(CS%KPP_CSp, hbl, G)
if (ASSOCIATED(CS%energetic_PBL_CSp)) call energetic_PBL_get_MLD(CS%energetic_PBL_CSp, hbl, G, US)

Expand Down
16 changes: 8 additions & 8 deletions src/tracer/MOM_neutral_diffusion.F90
Original file line number Diff line number Diff line change
Expand Up @@ -211,13 +211,13 @@ logical function neutral_diffusion_init(Time, G, param_file, diag, EOS, diabatic
default = .true.)
endif

if (CS%interior_only) then
call extract_diabatic_member(diabatic_CSp, KPP_CSp=CS%KPP_CSp)
call extract_diabatic_member(diabatic_CSp, energetic_PBL_CSp=CS%energetic_PBL_CSp)
if ( .not. ASSOCIATED(CS%energetic_PBL_CSp) .and. .not. ASSOCIATED(CS%KPP_CSp) ) then
call MOM_error(FATAL,"NDIFF_INTERIOR_ONLY is true, but no valid boundary layer scheme was found")
endif
endif
! if (CS%interior_only) then
! call extract_diabatic_member(diabatic_CSp, KPP_CSp=CS%KPP_CSp)
! call extract_diabatic_member(diabatic_CSp, energetic_PBL_CSp=CS%energetic_PBL_CSp)
! if ( .not. ASSOCIATED(CS%energetic_PBL_CSp) .and. .not. ASSOCIATED(CS%KPP_CSp) ) then
! call MOM_error(FATAL,"NDIFF_INTERIOR_ONLY is true, but no valid boundary layer scheme was found")
! endif
! endif

! call get_param(param_file, mdl, "KHTR", CS%KhTr, &
! "The background along-isopycnal tracer diffusivity.", &
Expand Down Expand Up @@ -293,7 +293,7 @@ subroutine neutral_diffusion_calc_coeffs(G, GV, US, h, T, S, CS)

! check if hbl needs to be extracted
if (CS%interior_only) then
hbl(:,:) = 0.
hbl(:,:) = 100.
if (ASSOCIATED(CS%KPP_CSp)) call KPP_get_BLD(CS%KPP_CSp, hbl, G)
if (ASSOCIATED(CS%energetic_PBL_CSp)) call energetic_PBL_get_MLD(CS%energetic_PBL_CSp, hbl, G, US)
call pass_var(hbl,G%Domain)
Expand Down

0 comments on commit a446d0f

Please sign in to comment.