Skip to content

Commit

Permalink
Deletes unneeded variables from calc_depth_function
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavo-marques committed Oct 16, 2019
1 parent 67016eb commit 223037c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/core/MOM.F90
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ subroutine step_MOM(forces, fluxes, sfc_state, Time_start, time_interval, CS, &
call enable_averaging(cycle_time, Time_start + real_to_time(cycle_time), &
CS%diag)
call calc_resoln_function(h, CS%tv, G, GV, US, CS%VarMix)
call calc_depth_function(h, CS%tv, G, GV, US, CS%VarMix)
call calc_depth_function(G, CS%VarMix)
call disable_averaging(CS%diag)
endif
endif
Expand Down Expand Up @@ -1404,7 +1404,7 @@ subroutine step_offline(forces, fluxes, sfc_state, Time_start, time_interval, CS
if (associated(CS%VarMix)) then
call pass_var(CS%h, G%Domain)
call calc_resoln_function(CS%h, CS%tv, G, GV, US, CS%VarMix)
call calc_depth_function(CS%h, CS%tv, G, GV, US, CS%VarMix)
call calc_depth_function(G, 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, US, &
Expand All @@ -1430,7 +1430,7 @@ subroutine step_offline(forces, fluxes, sfc_state, Time_start, time_interval, CS
if (associated(CS%VarMix)) then
call pass_var(CS%h, G%Domain)
call calc_resoln_function(CS%h, CS%tv, G, GV, US, CS%VarMix)
call calc_depth_function(CS%h, CS%tv, G, GV, US, CS%VarMix)
call calc_depth_function(G, 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, US, &
Expand Down
14 changes: 5 additions & 9 deletions src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -155,20 +155,16 @@ module MOM_lateral_mixing_coeffs
contains

!> Calculates and stires the non-dimensional depth functions.
subroutine calc_depth_function(h, tv, G, GV, US, CS)
type(ocean_grid_type), intent(inout) :: G !< Ocean grid structure
real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(in) :: h !< Layer thickness [H ~> m or kg m-2]
type(thermo_var_ptrs), intent(in) :: tv !< Thermodynamic variables
type(verticalGrid_type), intent(in) :: GV !< Vertical grid structure
type(unit_scale_type), intent(in) :: US !< A dimensional unit scaling type
subroutine calc_depth_function(G, CS)
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
type(VarMix_CS), pointer :: CS !< Variable mixing coefficients

! Local variables
integer :: is, ie, js, je, Isq, Ieq, Jsq, Jeq, nz
integer :: i, j, k
integer :: is, ie, js, je, Isq, Ieq, Jsq, Jeq
integer :: i, j
real :: H0 ! local variable for reference depth
real :: expo ! exponent used in the depth dependent scaling
is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec ; nz = G%ke
is = G%isc ; ie = G%iec ; js = G%jsc ; je = G%jec
Isq = G%IscB ; Ieq = G%IecB ; Jsq = G%JscB ; Jeq = G%JecB

if (.not. associated(CS)) call MOM_error(FATAL, "calc_depth_function:"// &
Expand Down

0 comments on commit 223037c

Please sign in to comment.