Skip to content

Commit

Permalink
Modifications to run idealized two-column LBD
Browse files Browse the repository at this point in the history
* turned off pressure force
* hard-coded BLD
* turned off advect_tracer
* set NTR = 2
  • Loading branch information
gustavo-marques committed Mar 10, 2020
1 parent a446d0f commit b5132d9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 9 deletions.
6 changes: 4 additions & 2 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,7 @@ subroutine step_MOM_dynamics(forces, p_surf_begin, p_surf_end, dt, dt_thermo, &
p_surf_begin, p_surf_end, CS%uh, CS%vh, CS%uhtr, CS%vhtr, &
CS%eta_av_bc, G, GV, US, CS%dyn_unsplit_RK2_CSp, CS%VarMix, CS%MEKE)
else
! GMM do nothing
call step_MOM_dyn_unsplit(u, v, h, CS%tv, CS%visc, Time_local, dt, forces, &
p_surf_begin, p_surf_end, CS%uh, CS%vh, CS%uhtr, CS%vhtr, &
CS%eta_av_bc, G, GV, US, CS%dyn_unsplit_CSp, CS%VarMix, CS%MEKE, Waves=Waves)
Expand Down Expand Up @@ -1087,8 +1088,9 @@ subroutine step_MOM_tracer_dyn(CS, G, GV, US, h, Time_local)
call cpu_clock_begin(id_clock_thermo) ; call cpu_clock_begin(id_clock_tracer)
call enable_averages(CS%t_dyn_rel_adv, Time_local, CS%diag)

call advect_tracer(h, CS%uhtr, CS%vhtr, CS%OBC, CS%t_dyn_rel_adv, G, GV, US, &
CS%tracer_adv_CSp, CS%tracer_Reg)
! GMM, turn off advection
! call advect_tracer(h, CS%uhtr, CS%vhtr, CS%OBC, CS%t_dyn_rel_adv, G, GV, US, &
! CS%tracer_adv_CSp, CS%tracer_Reg)
call tracer_hordiff(h, CS%t_dyn_rel_adv, CS%MEKE, CS%VarMix, G, GV, US, &
CS%tracer_diff_CSp, CS%tracer_Reg, CS%tv)
if (showCallTree) call callTree_waypoint("finished tracer advection/diffusion (step_MOM)")
Expand Down
15 changes: 9 additions & 6 deletions src/core/MOM_dynamics_unsplit.F90
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,9 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
if (dyn_p_surf) then ; do j=js-2,je+2 ; do i=is-2,ie+2
p_surf(i,j) = 0.75*p_surf_begin(i,j) + 0.25*p_surf_end(i,j)
enddo ; enddo ; endif
call PressureForce(h_av, tv, CS%PFu, CS%PFv, G, GV, US, &
CS%PressureForce_CSp, CS%ALE_CSp, p_surf)
! GMM, turn off pressure force
! call PressureForce(h_av, tv, CS%PFu, CS%PFv, G, GV, US, &
! CS%PressureForce_CSp, CS%ALE_CSp, p_surf)
call cpu_clock_end(id_clock_pres)

if (associated(CS%OBC)) then; if (CS%OBC%update_OBC) then
Expand Down Expand Up @@ -377,8 +378,9 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &
if (dyn_p_surf) then ; do j=js-2,je+2 ; do i=is-2,ie+2
p_surf(i,j) = 0.25*p_surf_begin(i,j) + 0.75*p_surf_end(i,j)
enddo ; enddo ; endif
call PressureForce(h_av, tv, CS%PFu, CS%PFv, G, GV, US, &
CS%PressureForce_CSp, CS%ALE_CSp, p_surf)
! GMM, turn off pressure force
! call PressureForce(h_av, tv, CS%PFu, CS%PFv, G, GV, US, &
! CS%PressureForce_CSp, CS%ALE_CSp, p_surf)
call cpu_clock_end(id_clock_pres)

if (associated(CS%OBC)) then; if (CS%OBC%update_OBC) then
Expand Down Expand Up @@ -456,8 +458,9 @@ subroutine step_MOM_dyn_unsplit(u, v, h, tv, visc, Time_local, dt, forces, &

! PFu = d/dx M(h_av,T,S)
call cpu_clock_begin(id_clock_pres)
call PressureForce(h_av, tv, CS%PFu, CS%PFv, G, GV, US, &
CS%PressureForce_CSp, CS%ALE_CSp, p_surf)
! GMM, turn off pressure force
! call PressureForce(h_av, tv, CS%PFu, CS%PFv, G, GV, US, &
! CS%PressureForce_CSp, CS%ALE_CSp, p_surf)
call cpu_clock_end(id_clock_pres)

if (associated(CS%OBC)) then; if (CS%OBC%update_OBC) then
Expand Down
1 change: 1 addition & 0 deletions src/tracer/MOM_lateral_boundary_diffusion.F90
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ subroutine lateral_boundary_diffusion(G, GV, US, h, Coef_x, Coef_y, dt, Reg, CS)

Idt = 1./dt
hbl(:,:) = 100.
hbl(4:6,:) = 50.
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
1 change: 1 addition & 0 deletions src/tracer/MOM_neutral_diffusion.F90
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,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(:,:) = 100.
hbl(4:6,:) = 50.
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
2 changes: 1 addition & 1 deletion src/tracer/tracer_example.F90
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module USER_tracer_example
public USER_register_tracer_example, USER_initialize_tracer, USER_tracer_stock
public tracer_column_physics, USER_tracer_surface_state, USER_tracer_example_end

integer, parameter :: NTR = 1 !< The number of tracers in this module.
integer, parameter :: NTR = 2 !< The number of tracers in this module.

!> The control structure for the USER_tracer_example module
type, public :: USER_tracer_example_CS ; private
Expand Down

0 comments on commit b5132d9

Please sign in to comment.