Skip to content

Commit 7a9cf32

Browse files
committed
Split excessively long lines in 2 files
Split excessively long lines and corrected the syntax for unit documentation in MOM_lateral_mixing_coeffs.F90 and MOM_thickness_diffuse.F90. All answers are bitwise identical.
1 parent 71693b5 commit 7a9cf32

File tree

2 files changed

+55
-44
lines changed

2 files changed

+55
-44
lines changed

src/parameterizations/lateral/MOM_lateral_mixing_coeffs.F90

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,8 @@ subroutine calc_resoln_function(h, tv, G, GV, US, CS)
180180
call wave_speed(h, tv, G, GV, US, CS%cg1, CS%wave_speed_CSp, modal_structure=CS%ebt_struct)
181181
else
182182
! Use EBT to get vertical structure first and then re-calculate cg1 using first baroclinic mode
183-
call wave_speed(h, tv, G, GV, US, CS%cg1, CS%wave_speed_CSp, modal_structure=CS%ebt_struct, use_ebt_mode=.true.)
183+
call wave_speed(h, tv, G, GV, US, CS%cg1, CS%wave_speed_CSp, modal_structure=CS%ebt_struct, &
184+
use_ebt_mode=.true.)
184185
call wave_speed(h, tv, G, GV, US, CS%cg1, CS%wave_speed_CSp)
185186
endif
186187
call pass_var(CS%ebt_struct, G%Domain)
@@ -729,43 +730,51 @@ end subroutine calc_slope_functions_using_just_e
729730
!> Calculates the Leith Laplacian and bi-harmonic viscosity coefficients
730731
subroutine calc_QG_Leith_viscosity(CS, G, GV, h, k, div_xx_dx, div_xx_dy, vort_xy_dx, vort_xy_dy)
731732
type(VarMix_CS), pointer :: CS !< Variable mixing coefficients
732-
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
733+
type(ocean_grid_type), intent(in) :: G !< Ocean grid structure
733734
type(verticalGrid_type), intent(in) :: GV !< The ocean's vertical grid structure.
734-
! real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(in) :: u !< Zonal flow (m s-1)
735-
! real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(in) :: v !< Meridional flow (m s-1)
736-
real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(inout) :: h !< Layer thickness (m or kg m-2)
737-
integer, intent(in) :: k !< Layer for which to calculate vorticity magnitude
738-
real, dimension(SZIB_(G),SZJ_(G)), intent(in) :: div_xx_dx !< x-derivative of horizontal divergence (d/dx(du/dx + dv/dy)) (m-1 s-1)
739-
real, dimension(SZI_(G),SZJB_(G)), intent(in) :: div_xx_dy !< y-derivative of horizontal divergence (d/dy(du/dx + dv/dy)) (m-1 s-1)
740-
real, dimension(SZI_(G),SZJB_(G)), intent(inout) :: vort_xy_dx !< x-derivative of vertical vorticity (d/dx(dv/dx - du/dy)) (m-1 s-1)
741-
real, dimension(SZIB_(G),SZJ_(G)), intent(inout) :: vort_xy_dy !< y-derivative of vertical vorticity (d/dy(dv/dx - du/dy)) (m-1 s-1)
742-
! real, dimension(SZI_(G),SZJ_(G)), intent(out) :: Leith_Kh_h !< Leith Laplacian viscosity at h-points (m2 s-1)
743-
! real, dimension(SZIB_(G),SZJB_(G)), intent(out) :: Leith_Kh_q !< Leith Laplacian viscosity at q-points (m2 s-1)
744-
! real, dimension(SZI_(G),SZJ_(G)), intent(out) :: Leith_Ah_h !< Leith bi-harmonic viscosity at h-points (m4 s-1)
745-
! real, dimension(SZIB_(G),SZJB_(G)), intent(out) :: Leith_Ah_q !< Leith bi-harmonic viscosity at q-points (m4 s-1)
735+
! real, dimension(SZIB_(G),SZJ_(G),SZK_(G)), intent(in) :: u !< Zonal flow [m s-1]
736+
! real, dimension(SZI_(G),SZJB_(G),SZK_(G)), intent(in) :: v !< Meridional flow [m s-1]
737+
real, dimension(SZI_(G),SZJ_(G),SZK_(G)), intent(inout) :: h !< Layer thickness [H ~> m or kg m-2]
738+
integer, intent(in) :: k !< Layer for which to calculate vorticity magnitude
739+
real, dimension(SZIB_(G),SZJ_(G)), intent(in) :: div_xx_dx !< x-derivative of horizontal divergence
740+
!! (d/dx(du/dx + dv/dy)) [m-1 s-1]
741+
real, dimension(SZI_(G),SZJB_(G)), intent(in) :: div_xx_dy !< y-derivative of horizontal divergence
742+
!! (d/dy(du/dx + dv/dy)) [m-1 s-1]
743+
real, dimension(SZI_(G),SZJB_(G)), intent(inout) :: vort_xy_dx !< x-derivative of vertical vorticity
744+
!! (d/dx(dv/dx - du/dy)) [m-1 s-1]
745+
real, dimension(SZIB_(G),SZJ_(G)), intent(inout) :: vort_xy_dy !< y-derivative of vertical vorticity
746+
!! (d/dy(dv/dx - du/dy)) [m-1 s-1]
747+
! real, dimension(SZI_(G),SZJ_(G)), intent(out) :: Leith_Kh_h !< Leith Laplacian viscosity
748+
!! at h-points [m2 s-1]
749+
! real, dimension(SZIB_(G),SZJB_(G)), intent(out) :: Leith_Kh_q !< Leith Laplacian viscosity
750+
!! at q-points [m2 s-1]
751+
! real, dimension(SZI_(G),SZJ_(G)), intent(out) :: Leith_Ah_h !< Leith bi-harmonic viscosity
752+
!! at h-points [m4 s-1]
753+
! real, dimension(SZIB_(G),SZJB_(G)), intent(out) :: Leith_Ah_q !< Leith bi-harmonic viscosity
754+
!! at q-points [m4 s-1]
746755

747756
! Local variables
748-
! real, dimension(SZIB_(G),SZJB_(G)) :: vort_xy, & ! Vertical vorticity (dv/dx - du/dy) (s-1)
749-
! dudy, & ! Meridional shear of zonal velocity (s-1)
750-
! dvdx ! Zonal shear of meridional velocity (s-1)
757+
! real, dimension(SZIB_(G),SZJB_(G)) :: vort_xy, & ! Vertical vorticity (dv/dx - du/dy) [s-1]
758+
! dudy, & ! Meridional shear of zonal velocity [s-1]
759+
! dvdx ! Zonal shear of meridional velocity [s-1]
751760
real, dimension(SZI_(G),SZJB_(G)) :: &
752-
! vort_xy_dx, & ! x-derivative of vertical vorticity (d/dx(dv/dx - du/dy)) (m-1 s-1)
753-
! div_xx_dy, & ! y-derivative of horizontal divergence (d/dy(du/dx + dv/dy)) (m-1 s-1)
754-
dslopey_dz, & ! z-derivative of y-slope at v-points (m-1)
755-
h_at_v, & ! Thickness at v-points (m or kg m-2)
756-
beta_v, & ! Beta at v-points (m-1 s-1)
757-
grad_vort_mag_v, & ! mag. of vort. grad. at v-points (s-1)
758-
grad_div_mag_v ! mag. of div. grad. at v-points (s-1)
761+
! vort_xy_dx, & ! x-derivative of vertical vorticity (d/dx(dv/dx - du/dy)) [m-1 s-1]
762+
! div_xx_dy, & ! y-derivative of horizontal divergence (d/dy(du/dx + dv/dy)) [m-1 s-1]
763+
dslopey_dz, & ! z-derivative of y-slope at v-points [m-1]
764+
h_at_v, & ! Thickness at v-points [H ~> m or kg m-2]
765+
beta_v, & ! Beta at v-points [m-1 s-1]
766+
grad_vort_mag_v, & ! mag. of vort. grad. at v-points [s-1]
767+
grad_div_mag_v ! mag. of div. grad. at v-points [s-1]
759768

760769
real, dimension(SZIB_(G),SZJ_(G)) :: &
761-
! vort_xy_dy, & ! y-derivative of vertical vorticity (d/dy(dv/dx - du/dy)) (m-1 s-1)
762-
! div_xx_dx, & ! x-derivative of horizontal divergence (d/dx(du/dx + dv/dy)) (m-1 s-1)
770+
! vort_xy_dy, & ! y-derivative of vertical vorticity (d/dy(dv/dx - du/dy)) [m-1 s-1]
771+
! div_xx_dx, & ! x-derivative of horizontal divergence (d/dx(du/dx + dv/dy)) [m-1 s-1]
763772
dslopex_dz, & ! z-derivative of x-slope at u-points (m-1)
764-
h_at_u, & ! Thickness at u-points (m or kg m-2)
765-
beta_u, & ! Beta at u-points (m-1 s-1)
766-
grad_vort_mag_u, & ! mag. of vort. grad. at u-points (s-1)
767-
grad_div_mag_u ! mag. of div. grad. at u-points (s-1)
768-
! real, dimension(SZI_(G),SZJ_(G)) :: div_xx ! Estimate of horizontal divergence at h-points (s-1)
773+
h_at_u, & ! Thickness at u-points [H ~> m or kg m-2]
774+
beta_u, & ! Beta at u-points [m-1 s-1]
775+
grad_vort_mag_u, & ! mag. of vort. grad. at u-points [s-1]
776+
grad_div_mag_u ! mag. of div. grad. at u-points [s-1]
777+
! real, dimension(SZI_(G),SZJ_(G)) :: div_xx ! Estimate of horizontal divergence at h-points [s-1]
769778
! real :: mod_Leith, DY_dxBu, DX_dyBu, vert_vort_mag
770779
real :: h_at_slope_above, h_at_slope_below, Ih, f
771780
integer :: i, j, is, ie, js, je, Isq, Ieq, Jsq, Jeq,nz

src/parameterizations/lateral/MOM_thickness_diffuse.F90

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,8 @@ subroutine thickness_diffuse(h, uhtr, vhtr, tv, dt, G, GV, US, MEKE, VarMix, CDp
215215
!$OMP do
216216
if (CS%MEKE_GEOMETRIC) then
217217
do j=js,je ; do I=is-1,ie
218-
Khth_Loc_u(I,j) = Khth_Loc_u(I,j) + G%mask2dCu(I,j) * CS%MEKE_GEOMETRIC_alpha * 0.5*(MEKE%MEKE(i,j)+MEKE%MEKE(i+1,j)) / &
218+
Khth_Loc_u(I,j) = Khth_Loc_u(I,j) + &
219+
G%mask2dCu(I,j) * CS%MEKE_GEOMETRIC_alpha * 0.5*(MEKE%MEKE(i,j)+MEKE%MEKE(i+1,j)) / &
219220
(VarMix%SN_u(I,j) + CS%MEKE_GEOMETRIC_epsilon)
220221
enddo ; enddo
221222
else
@@ -293,8 +294,9 @@ subroutine thickness_diffuse(h, uhtr, vhtr, tv, dt, G, GV, US, MEKE, VarMix, CDp
293294
!$OMP do
294295
if (CS%MEKE_GEOMETRIC) then
295296
do j=js-1,je ; do I=is,ie
296-
Khth_Loc(I,j) = Khth_Loc(I,j) + G%mask2dCv(i,J) * CS%MEKE_GEOMETRIC_alpha * 0.5*(MEKE%MEKE(i,j)+MEKE%MEKE(i,j+1)) / &
297-
(VarMix%SN_v(i,J) + CS%MEKE_GEOMETRIC_epsilon)
297+
Khth_Loc(I,j) = Khth_Loc(I,j) + &
298+
G%mask2dCv(i,J) * CS%MEKE_GEOMETRIC_alpha * 0.5*(MEKE%MEKE(i,j)+MEKE%MEKE(i,j+1)) / &
299+
(VarMix%SN_v(i,J) + CS%MEKE_GEOMETRIC_epsilon)
298300
enddo ; enddo
299301
else
300302
do J=js-1,je ; do i=is,ie
@@ -525,12 +527,12 @@ subroutine thickness_diffuse_full(h, e, Kh_u, Kh_v, tv, uhD, vhD, cg1, dt, G, GV
525527
type(MEKE_type), pointer :: MEKE !< MEKE control structure
526528
type(thickness_diffuse_CS), pointer :: CS !< Control structure for thickness diffusion
527529
real, dimension(SZIB_(G),SZJ_(G),SZK_(G)+1), optional, intent(in) :: int_slope_u !< Ratio that determine how much of
528-
!! the isopycnal slopes are taken directly from the
529-
!! interface slopes without consideration of
530+
!! the isopycnal slopes are taken directly from
531+
!! the interface slopes without consideration of
530532
!! density gradients.
531533
real, dimension(SZI_(G),SZJB_(G),SZK_(G)+1), optional, intent(in) :: int_slope_v !< Ratio that determine how much of
532-
!! the isopycnal slopes are taken directly from the
533-
!! interface slopes without consideration of
534+
!! the isopycnal slopes are taken directly from
535+
!! the interface slopes without consideration of
534536
!! density gradients.
535537
real, dimension(SZIB_(G),SZJ_(G),SZK_(G)+1), optional, intent(in) :: slope_x !< Isopycnal slope at u-points
536538
real, dimension(SZI_(G),SZJB_(G),SZK_(G)+1), optional, intent(in) :: slope_y !< Isopycnal slope at v-points
@@ -1344,13 +1346,13 @@ subroutine add_detangling_Kh(h, e, Kh_u, Kh_v, KH_u_CFL, KH_v_CFL, tv, dt, G, GV
13441346
real, intent(in) :: dt !< Time increment [s]
13451347
type(thickness_diffuse_CS), pointer :: CS !< Control structure for thickness diffusion
13461348
real, dimension(SZIB_(G),SZJ_(G),SZK_(G)+1), intent(inout) :: int_slope_u !< Ratio that determine how much of
1347-
!! the isopycnal slopes are taken directly from the
1348-
!! interface slopes without consideration of
1349-
!! density gradients.
1349+
!! the isopycnal slopes are taken directly from
1350+
!! the interface slopes without consideration
1351+
!! of density gradients.
13501352
real, dimension(SZI_(G),SZJB_(G),SZK_(G)+1), intent(inout) :: int_slope_v !< Ratio that determine how much of
1351-
!! the isopycnal slopes are taken directly from the
1352-
!! interface slopes without consideration of
1353-
!! density gradients.
1353+
!! the isopycnal slopes are taken directly from
1354+
!! the interface slopes without consideration
1355+
!! of density gradients.
13541356
! Local variables
13551357
real, dimension(SZI_(G),SZJ_(G),SZK_(G)) :: &
13561358
de_top ! The distances between the top of a layer and the top of the

0 commit comments

Comments
 (0)