Skip to content

Commit

Permalink
Merged with latest master
Browse files Browse the repository at this point in the history
  • Loading branch information
alperaltuntas committed Apr 5, 2018
2 parents 696462c + 78bb40c commit 81a5ef8
Show file tree
Hide file tree
Showing 15 changed files with 975 additions and 556 deletions.
2 changes: 1 addition & 1 deletion config_src/mct_driver/ocn_comp_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ subroutine ocn_init_mct( EClock, cdata_o, x2o_o, o2x_o, NLFilename )

if (debug .and. root_pe().eq.pe_here()) print *, "calling ocn_domain_mct"
call ocn_domain_mct(lsize, MOM_MCT_gsmap, MOM_MCT_dom)
call ocn_domain_mct(lsize*km, MOM_MCT_gsmap3d, MOM_MCT_dom3d) !TODO: this is not used
!call ocn_domain_mct(lsize*km, MOM_MCT_gsmap3d, MOM_MCT_dom3d) !TODO: this is not used

! Inialize mct attribute vectors

Expand Down
2 changes: 1 addition & 1 deletion pkg/CVMix-src
9 changes: 6 additions & 3 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,8 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
real, dimension(:,:), pointer :: shelf_area
type(MOM_restart_CS), pointer :: restart_CSp_tmp => NULL()
type(group_pass_type) :: tmp_pass_uv_T_S_h, pass_uv_T_S_h
type(group_pass_type) :: tmp_pass_Kv_turb
! GMM, the following *is not* used. Should we delete it?
type(group_pass_type) :: tmp_pass_Kv_shear

real :: default_val ! default value for a parameter
logical :: write_geom_files ! If true, write out the grid geometry files.
Expand Down Expand Up @@ -2288,8 +2289,8 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &

call do_group_pass(pass_uv_T_S_h, G%Domain)

if (associated(CS%visc%Kv_turb)) &
call pass_var(CS%visc%Kv_turb, G%Domain, To_All+Omit_Corners, halo=1)
if (associated(CS%visc%Kv_shear)) &
call pass_var(CS%visc%Kv_shear, G%Domain, To_All+Omit_Corners, halo=1)

call cpu_clock_end(id_clock_pass_init)

Expand Down Expand Up @@ -2900,6 +2901,8 @@ subroutine MOM_end(CS)
call tracer_registry_end(CS%tracer_Reg)
call tracer_flow_control_end(CS%tracer_flow_CSp)

if (associated(CS%diabatic_CSp)) call diabatic_driver_end(CS%diabatic_CSp)

if (CS%offline_tracer_mode) call offline_transport_end(CS%offline_CSp)

DEALLOC_(CS%uhtr) ; DEALLOC_(CS%vhtr)
Expand Down
13 changes: 8 additions & 5 deletions src/core/MOM_variables.F90
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ module MOM_variables
!! coefficients, and related fields.
type, public :: vertvisc_type
real :: Prandtl_turb !< The Prandtl number for the turbulent diffusion
!! that is captured in Kd_turb.
!! that is captured in Kd_shear.
real, pointer, dimension(:,:) :: &
bbl_thick_u => NULL(), & !< The bottom boundary layer thickness at the
!! u-points, in m.
Expand Down Expand Up @@ -224,10 +224,13 @@ module MOM_variables
! Kd_extra_S is positive for salt fingering; Kd_extra_T
! is positive for double diffusive convection. These
! are only allocated if DOUBLE_DIFFUSION is true.
Kd_turb => NULL(), &!< The turbulent diapycnal diffusivity at the interfaces
!! between each layer, in m2 s-1.
Kv_turb => NULL(), &!< The turbulent vertical viscosity at the interfaces
!! between each layer, in m2 s-1.
Kd_shear => NULL(), &!< The shear-driven turbulent diapycnal diffusivity
!! at the interfaces between each layer, in m2 s-1.
Kv_shear => NULL(), &!< The shear-driven turbulent vertical viscosity
!! at the interfaces between each layer, in m2 s-1.
Kv_slow => NULL(), &!< The turbulent vertical viscosity component due to
!! "slow" processes (e.g., tidal, background,
!! convection etc).
TKE_turb => NULL() !< The turbulent kinetic energy per unit mass defined
!! at the interfaces between each layer, in m2 s-2.
end type vertvisc_type
Expand Down
14 changes: 13 additions & 1 deletion src/parameterizations/vertical/MOM_KPP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ module MOM_KPP
public :: KPP_end
public :: KPP_NonLocalTransport_temp
public :: KPP_NonLocalTransport_saln
public :: KPP_get_BLD

! Enumerated constants
integer, private, parameter :: NLT_SHAPE_CVMIX = 0 !< Use the CVmix profile
Expand Down Expand Up @@ -936,7 +937,18 @@ subroutine KPP_calculate(CS, G, GV, h, Temp, Salt, u, v, EOS, uStar, &

end subroutine KPP_calculate


!> Copies KPP surface boundary layer depth into BLD
subroutine KPP_get_BLD(CS, BLD, G)
type(KPP_CS), pointer :: CS !< Control structure for
!! this module
type(ocean_grid_type), intent(in) :: G !< Grid structure
real, dimension(SZI_(G),SZJ_(G)), intent(out) :: BLD!< bnd. layer depth (m)
! Local variables
integer :: i,j
do j = G%jsc, G%jec ; do i = G%isc, G%iec
BLD(i,j) = CS%OBLdepth(i,j)
enddo ; enddo
end subroutine KPP_get_BLD

!> Apply KPP non-local transport of surface fluxes for temperature.
subroutine KPP_NonLocalTransport_temp(CS, G, GV, h, nonLocalTrans, surfFlux, &
Expand Down
Loading

0 comments on commit 81a5ef8

Please sign in to comment.