Skip to content

Commit

Permalink
Hook in lateral boundary mixing initialization
Browse files Browse the repository at this point in the history
- Pass diabatic CS through tracer_hor_diff_init and
lateral_boundary_mixing_init.
- Modify extract_diabatic_member to return KPP and ePBL CS
- Finish initialization for lateral_boundary_mixing
  • Loading branch information
ashao committed Sep 13, 2019
1 parent 2b10a8b commit a4dbeb1
Show file tree
Hide file tree
Showing 4 changed files with 688 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/core/MOM.F90
Original file line number Diff line number Diff line change
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
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 a4dbeb1

Please sign in to comment.