Skip to content

Commit

Permalink
Sets lnoDGat1=.true. when gradient should not be matched
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Jun 28, 2018
1 parent 18b1598 commit 41883ee
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/parameterizations/vertical/MOM_CVMix_KPP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,11 @@ logical function KPP_init(paramFile, G, diag, Time, CS, passive, Waves)

! Local variables
#include "version_variable.h"
character(len=40) :: mdl = 'MOM_CVMix_KPP' ! name of this module
character(len=20) :: string ! local temporary string
logical :: CS_IS_ONE=.false. ! Logical for setting Cs based on Non-local

character(len=40) :: mdl = 'MOM_CVMix_KPP' !< name of this module
character(len=20) :: string !< local temporary string
logical :: CS_IS_ONE=.false. !< Logical for setting Cs based on Non-local
logical :: lnoDGat1=.false. !< True => G'(1) = 0 (shape function)
!! False => compute G'(1) as in LMD94
if (associated(CS)) call MOM_error(FATAL, 'MOM_CVMix_KPP, KPP_init: '// &
'Control structure has already been initialized')
allocate(CS)
Expand Down Expand Up @@ -329,6 +330,10 @@ logical function KPP_init(paramFile, G, diag, Time, CS, passive, Waves)
! May be used during CVMix initialization.
Cs_is_one=.true.
endif
if (CS%MatchTechnique == 'ParabolicNonLocal' .or. CS%MatchTechnique == 'SimpleShapes') then
! if gradient won't be matched, lnoDGat1=.true.
lnoDGat1=.true.
endif

! safety check to avoid negative diff/visc
if (CS%MatchTechnique == 'MatchBoth' .and. (CS%interpType2 == 'cubic' .or. &
Expand Down Expand Up @@ -448,7 +453,7 @@ logical function KPP_init(paramFile, G, diag, Time, CS, passive, Waves)
MatchTechnique=CS%MatchTechnique, &
lenhanced_diff=CS%enhance_diffusion,&
lnonzero_surf_nonlocal=Cs_is_one ,&
lnoDGat1=.false. ,&
lnoDGat1=lnoDGat1 ,&
CVMix_kpp_params_user=CS%KPP_params )

! Register diagnostics
Expand Down

0 comments on commit 41883ee

Please sign in to comment.