Skip to content

Commit

Permalink
Merge branch 'near_surface_fluxes' of github.com:ashao/MOM6 into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
ashao committed Sep 14, 2019
2 parents 322aa77 + 332a264 commit 223a815
Show file tree
Hide file tree
Showing 6 changed files with 273 additions and 74 deletions.
10 changes: 5 additions & 5 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1087,7 +1087,7 @@ subroutine step_MOM_tracer_dyn(CS, G, GV, h, Time_local)

call advect_tracer(h, CS%uhtr, CS%vhtr, CS%OBC, CS%t_dyn_rel_adv, G, GV, &
CS%tracer_adv_CSp, CS%tracer_Reg)
call tracer_hordiff(h, CS%t_dyn_rel_adv, CS%MEKE, CS%VarMix, G, GV, &
call tracer_hordiff(h, CS%t_dyn_rel_adv, CS%MEKE, CS%VarMix, G, GV, CS%US, &
CS%tracer_diff_CSp, CS%tracer_Reg, CS%tv)
if (showCallTree) call callTree_waypoint("finished tracer advection/diffusion (step_MOM)")
call cpu_clock_end(id_clock_tracer) ; call cpu_clock_end(id_clock_thermo)
Expand Down Expand Up @@ -1407,7 +1407,7 @@ subroutine step_offline(forces, fluxes, sfc_state, Time_start, time_interval, CS
call calc_resoln_function(CS%h, CS%tv, G, GV, US, CS%VarMix)
call calc_slope_functions(CS%h, CS%tv, REAL(dt_offline), G, GV, US, CS%VarMix)
endif
call tracer_hordiff(CS%h, REAL(dt_offline), CS%MEKE, CS%VarMix, G, GV, &
call tracer_hordiff(CS%h, REAL(dt_offline), CS%MEKE, CS%VarMix, G, GV, US, &
CS%tracer_diff_CSp, CS%tracer_Reg, CS%tv)
endif
endif
Expand All @@ -1432,7 +1432,7 @@ subroutine step_offline(forces, fluxes, sfc_state, Time_start, time_interval, CS
call calc_resoln_function(CS%h, CS%tv, G, GV, US, CS%VarMix)
call calc_slope_functions(CS%h, CS%tv, REAL(dt_offline), G, GV, US, CS%VarMix)
endif
call tracer_hordiff(CS%h, REAL(dt_offline), CS%MEKE, CS%VarMix, G, GV, &
call tracer_hordiff(CS%h, REAL(dt_offline), CS%MEKE, CS%VarMix, G, GV, US, &
CS%tracer_diff_CSp, CS%tracer_Reg, CS%tv)
endif
endif
Expand Down Expand Up @@ -1467,7 +1467,7 @@ subroutine step_offline(forces, fluxes, sfc_state, Time_start, time_interval, CS
CS%h, eatr, ebtr, uhtr, vhtr)
! Perform offline diffusion if requested
if (.not. skip_diffusion) then
call tracer_hordiff(h_end, REAL(dt_offline), CS%MEKE, CS%VarMix, G, GV, &
call tracer_hordiff(h_end, REAL(dt_offline), CS%MEKE, CS%VarMix, G, GV, US, &
CS%tracer_diff_CSp, CS%tracer_Reg, CS%tv)
endif

Expand Down Expand Up @@ -2362,7 +2362,7 @@ subroutine initialize_MOM(Time, Time_init, param_file, dirs, CS, restart_CSp, &
endif

call tracer_advect_init(Time, G, param_file, diag, CS%tracer_adv_CSp)
call tracer_hor_diff_init(Time, G, param_file, diag, CS%tv%eqn_of_state, &
call tracer_hor_diff_init(Time, G, param_file, diag, CS%tv%eqn_of_state, CS%diabatic_CSp, &
CS%tracer_diff_CSp)

call lock_tracer_registry(CS%tracer_Reg)
Expand Down
2 changes: 1 addition & 1 deletion src/core/MOM_unit_tests.F90
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module MOM_unit_tests
use MOM_remapping, only : remapping_unit_tests
use MOM_neutral_diffusion, only : neutral_diffusion_unit_tests
use MOM_diag_vkernels, only : diag_vkernels_unit_tests
use MOM_boundary_lateral_mixing, only : near_boundary_unit_tests
use MOM_lateral_boundary_mixing, only : near_boundary_unit_tests

implicit none ; private

Expand Down
2 changes: 1 addition & 1 deletion src/parameterizations/vertical/MOM_CVMix_KPP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ logical function KPP_init(paramFile, G, GV, US, diag, Time, CS, passive, Waves)
!! 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)

! Read parameters
call log_version(paramFile, mdl, version, 'This is the MOM wrapper to CVMix:KPP\n' // &
Expand All @@ -207,6 +206,7 @@ logical function KPP_init(paramFile, G, GV, US, diag, Time, CS, passive, Waves)
default=.false.)
! Forego remainder of initialization if not using this scheme
if (.not. KPP_init) return
allocate(CS)

call openParameterBlock(paramFile,'KPP')
call get_param(paramFile, mdl, 'PASSIVE', CS%passiveMode, &
Expand Down
12 changes: 8 additions & 4 deletions src/parameterizations/vertical/MOM_diabatic_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2397,19 +2397,23 @@ end subroutine legacy_diabatic
!> Returns pointers or values of members within the diabatic_CS type. For extensibility,
!! each returned argument is an optional argument
subroutine extract_diabatic_member(CS, opacity_CSp, optics_CSp, &
evap_CFL_limit, minimum_forcing_depth)
type(diabatic_CS), intent(in ) :: CS !< module control structure
evap_CFL_limit, minimum_forcing_depth, KPP_CSp, energetic_PBL_CSp)
type(diabatic_CS), intent(in ) :: CS !< module control structure
! All output arguments are optional
type(opacity_CS), optional, pointer :: opacity_CSp !< A pointer to be set to the opacity control structure
type(optics_type), optional, pointer :: optics_CSp !< A pointer to be set to the optics control structure
type(KPP_CS), optional, pointer :: KPP_CSp !< A pointer to be set to the KPP CS
type(energetic_PBL_CS), optional, pointer :: energetic_PBL_CSp !< A pointer to be set to the ePBL CS
real, optional, intent( out) :: evap_CFL_limit !<The largest fraction of a layer that can be
!! evaporated in one time-step [nondim].
real, optional, intent( out) :: minimum_forcing_depth !< The smallest depth over which heat
!! and freshwater fluxes are applied [m].

! Pointers to control structures
if (present(opacity_CSp)) opacity_CSp => CS%opacity_CSp
if (present(optics_CSp)) optics_CSp => CS%optics
if (present(opacity_CSp)) opacity_CSp => CS%opacity_CSp
if (present(optics_CSp)) optics_CSp => CS%optics
if (present(KPP_CSp)) KPP_CSp => CS%KPP_CSp
if (present(energetic_PBL_CSp)) energetic_PBL_CSp => CS%energetic_PBL_CSp

! Constants within diabatic_CS
if (present(evap_CFL_limit)) evap_CFL_limit = CS%evap_CFL_limit
Expand Down
Loading

0 comments on commit 223a815

Please sign in to comment.