Skip to content

Commit

Permalink
ice_dyn_vp: put 'intent's on same lines as types
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-blain committed Jul 16, 2020
1 parent b32bdfe commit 9b6c2bf
Showing 1 changed file with 34 additions and 65 deletions.
99 changes: 34 additions & 65 deletions cicecore/cicedynB/dynamics/ice_dyn_vp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1109,8 +1109,7 @@ subroutine calc_zeta_Pr (nx_block, ny_block, &
nx_block, ny_block, & ! block dimensions
icellt ! no. of cells where icetmask = 1

integer (kind=int_kind), dimension (nx_block*ny_block), &
intent(in) :: &
integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: &
indxti , & ! compressed index in i-direction
indxtj ! compressed index in j-direction

Expand All @@ -1128,12 +1127,10 @@ subroutine calc_zeta_Pr (nx_block, ny_block, &
cxm , & ! 0.5*HTN - 1.5*HTN
tinyarea ! min_strain_rate*tarea

real (kind=dbl_kind), dimension(nx_block,ny_block,4), &
intent(out) :: &
real (kind=dbl_kind), dimension(nx_block,ny_block,4), intent(out) :: &
zetaD ! 2*zeta

real (kind=dbl_kind), dimension(nx_block,ny_block,8), &
intent(out) :: &
real (kind=dbl_kind), dimension(nx_block,ny_block,8), intent(out) :: &
stPr ! stress Pr combinations

! local variables
Expand Down Expand Up @@ -1302,8 +1299,7 @@ subroutine stress_vp (nx_block, ny_block, &
nx_block, ny_block, & ! block dimensions
icellt ! no. of cells where icetmask = 1

integer (kind=int_kind), dimension (nx_block*ny_block), &
intent(in) :: &
integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: &
indxti , & ! compressed index in i-direction
indxtj ! compressed index in j-direction

Expand All @@ -1317,12 +1313,10 @@ subroutine stress_vp (nx_block, ny_block, &
cym , & ! 0.5*HTE - 1.5*HTE
cxm ! 0.5*HTN - 1.5*HTN

real (kind=dbl_kind), dimension(nx_block,ny_block,4), &
intent(in) :: &
real (kind=dbl_kind), dimension(nx_block,ny_block,4), intent(in) :: &
zetaD ! 2*zeta

real (kind=dbl_kind), dimension (nx_block,ny_block), &
intent(inout) :: &
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(inout) :: &
stressp_1, stressp_2, stressp_3, stressp_4 , & ! sigma11+sigma22
stressm_1, stressm_2, stressm_3, stressm_4 , & ! sigma11-sigma22
stress12_1,stress12_2,stress12_3,stress12_4 ! sigma12
Expand Down Expand Up @@ -1405,8 +1399,7 @@ subroutine calc_vrel_Cb (nx_block, ny_block, &
nx_block, ny_block, & ! block dimensions
icellu ! total count when iceumask is true

integer (kind=int_kind), dimension (nx_block*ny_block), &
intent(in) :: &
integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: &
indxui , & ! compressed index in i-direction
indxuj ! compressed index in j-direction

Expand All @@ -1417,13 +1410,11 @@ subroutine calc_vrel_Cb (nx_block, ny_block, &
vocn , & ! ocean current, y-direction (m/s)
Cw ! ocean-ice neutral drag coefficient

real (kind=dbl_kind), dimension (nx_block,ny_block), &
intent(in) :: &
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: &
uvel , & ! x-component of velocity (m/s)
vvel ! y-component of velocity (m/s)

real (kind=dbl_kind), dimension (nx_block,ny_block), &
intent(inout) :: &
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(inout) :: &
vrel , & ! coeff for tauw
Cb ! seabed stress coeff

Expand Down Expand Up @@ -1474,8 +1465,7 @@ subroutine calc_seabed_stress (nx_block , ny_block, &
nx_block, ny_block, & ! block dimensions
icellu ! total count when iceumask is true

integer (kind=int_kind), dimension (nx_block*ny_block), &
intent(in) :: &
integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: &
indxui , & ! compressed index in i-direction
indxuj ! compressed index in j-direction

Expand Down Expand Up @@ -1533,8 +1523,7 @@ subroutine matvec (nx_block, ny_block, &
icellu, & ! total count when iceumask is true
icellt ! no. of cells where icetmask = 1

integer (kind=int_kind), dimension (nx_block*ny_block), &
intent(in) :: &
integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: &
indxui , & ! compressed index in i-direction
indxuj , & ! compressed index in j-direction
indxti , & ! compressed index in i-direction
Expand All @@ -1550,8 +1539,7 @@ subroutine matvec (nx_block, ny_block, &
cym , & ! 0.5*HTE - 1.5*HTE
cxm ! 0.5*HTN - 1.5*HTN

real (kind=dbl_kind), dimension (nx_block,ny_block), &
intent(in) :: &
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: &
uvel , & ! x-component of velocity (m/s)
vvel , & ! y-component of velocity (m/s)
vrel , & ! coefficient for tauw
Expand All @@ -1560,12 +1548,10 @@ subroutine matvec (nx_block, ny_block, &
fm , & ! Coriolis param. * mass in U-cell (kg/s)
uarear ! 1/uarea

real (kind=dbl_kind), dimension(nx_block,ny_block,4), &
intent(in) :: &
real (kind=dbl_kind), dimension(nx_block,ny_block,4), intent(in) :: &
zetaD ! 2*zeta

real (kind=dbl_kind), dimension (nx_block,ny_block), &
intent(inout) :: &
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(inout) :: &
Au , & ! matvec, Fx = bx - Au (N/m^2)
Av ! matvec, Fy = by - Av (N/m^2)

Expand Down Expand Up @@ -1802,22 +1788,19 @@ subroutine calc_bfix (nx_block, ny_block, &
integer (kind=int_kind), intent(in) :: &
nx_block, ny_block, & ! block dimensions
icellu ! no. of cells where iceumask = 1

integer (kind=int_kind), dimension (nx_block*ny_block), &
intent(in) :: &

integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: &
indxui , & ! compressed index in i-direction
indxuj ! compressed index in j-direction

real (kind=dbl_kind), dimension (nx_block,ny_block), &
intent(in) :: &
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: &
uvel_init,& ! x-component of velocity (m/s), beginning of time step
vvel_init,& ! y-component of velocity (m/s), beginning of time step
umassdti, & ! mass of U-cell/dt (kg/m^2 s)
forcex , & ! work array: combined atm stress and ocn tilt, x
forcey ! work array: combined atm stress and ocn tilt, y

real (kind=dbl_kind), dimension (nx_block,ny_block), &
intent(out) :: &
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(out) :: &
bxfix , & ! bx = taux + bxfix
byfix ! by = tauy + byfix

Expand Down Expand Up @@ -1862,8 +1845,7 @@ subroutine calc_bvec (nx_block, ny_block, &
nx_block, ny_block, & ! block dimensions
icellu ! total count when iceumask is true

integer (kind=int_kind), dimension (nx_block*ny_block), &
intent(in) :: &
integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: &
indxui , & ! compressed index in i-direction
indxuj ! compressed index in j-direction

Expand All @@ -1877,12 +1859,10 @@ subroutine calc_bvec (nx_block, ny_block, &
byfix , & ! by = tauy + byfix
vrel ! relative ice-ocean velocity

real (kind=dbl_kind), dimension(nx_block,ny_block,8), &
intent(in) :: &
real (kind=dbl_kind), dimension(nx_block,ny_block,8), intent(in) :: &
stPr

real (kind=dbl_kind), dimension (nx_block,ny_block), &
intent(out) :: &
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(out) :: &
bx , & ! b vector, bx = taux + bxfix (N/m^2)
by ! b vector, by = tauy + byfix (N/m^2)

Expand Down Expand Up @@ -1950,8 +1930,7 @@ subroutine residual_vec (nx_block, ny_block, &
nx_block, ny_block, & ! block dimensions
icellu ! total count when iceumask is true

integer (kind=int_kind), dimension (nx_block*ny_block), &
intent(in) :: &
integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: &
indxui , & ! compressed index in i-direction
indxuj ! compressed index in j-direction

Expand All @@ -1961,8 +1940,7 @@ subroutine residual_vec (nx_block, ny_block, &
Au , & ! matvec, Fx = bx - Au (N/m^2)
Av ! matvec, Fy = by - Av (N/m^2)

real (kind=dbl_kind), dimension (nx_block,ny_block), &
intent(inout) :: &
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(inout) :: &
Fx , & ! x residual vector, Fx = bx - Au (N/m^2)
Fy ! y residual vector, Fy = by - Av (N/m^2)

Expand Down Expand Up @@ -2015,8 +1993,7 @@ subroutine formDiag_step1 (nx_block, ny_block, &
nx_block, ny_block, & ! block dimensions
icellu ! no. of cells where icetmask = 1

integer (kind=int_kind), dimension (nx_block*ny_block), &
intent(in) :: &
integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: &
indxui , & ! compressed index in i-direction
indxuj ! compressed index in j-direction

Expand All @@ -2029,13 +2006,11 @@ subroutine formDiag_step1 (nx_block, ny_block, &
cxp , & ! 1.5*HTN - 0.5*HTN
cym , & ! 0.5*HTE - 1.5*HTE
cxm ! 0.5*HTN - 1.5*HTN

real (kind=dbl_kind), dimension(nx_block,ny_block,4), &
intent(in) :: &

real (kind=dbl_kind), dimension(nx_block,ny_block,4), intent(in) :: &
zetaD ! 2*zeta

real (kind=dbl_kind), dimension(nx_block,ny_block,8), &
intent(out) :: &

real (kind=dbl_kind), dimension(nx_block,ny_block,8), intent(out) :: &
Dstr ! intermediate calc for diagonal components of matrix A associated
! with rheology term

Expand Down Expand Up @@ -2391,8 +2366,7 @@ subroutine formDiag_step2 (nx_block, ny_block, &
nx_block, ny_block, & ! block dimensions
icellu ! total count when iceumask is true

integer (kind=int_kind), dimension (nx_block*ny_block), &
intent(in) :: &
integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: &
indxui , & ! compressed index in i-direction
indxuj ! compressed index in j-direction

Expand All @@ -2402,12 +2376,10 @@ subroutine formDiag_step2 (nx_block, ny_block, &
umassdti, & ! mass of U-cell/dt (kg/m^2 s)
uarear ! 1/uarea

real (kind=dbl_kind), dimension(nx_block,ny_block,8), &
intent(in) :: &
real (kind=dbl_kind), dimension(nx_block,ny_block,8), intent(in) :: &
Dstr

real (kind=dbl_kind), dimension (nx_block,ny_block), &
intent(out) :: &
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(out) :: &
diagx , & ! Diagonal (x component) of the matrix A
diagy ! Diagonal (y component) of the matrix A

Expand Down Expand Up @@ -2472,8 +2444,7 @@ subroutine calc_L2norm_squared (nx_block, ny_block, &
nx_block, ny_block, & ! block dimensions
icellu ! total count when iceumask is true

integer (kind=int_kind), dimension (nx_block*ny_block), &
intent(in) :: &
integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: &
indxui , & ! compressed index in i-direction
indxuj ! compressed index in j-direction

Expand Down Expand Up @@ -2526,8 +2497,7 @@ subroutine arrays_to_vec (nx_block, ny_block, nblocks, &
integer (kind=int_kind), dimension (max_blocks), intent(in) :: &
icellu

integer (kind=int_kind), dimension (nx_block*ny_block, max_blocks), &
intent(in) :: &
integer (kind=int_kind), dimension (nx_block*ny_block, max_blocks), intent(in) :: &
indxui , & ! compressed index in i-direction
indxuj ! compressed index in j-direction

Expand Down Expand Up @@ -2585,8 +2555,7 @@ subroutine vec_to_arrays (nx_block, ny_block, nblocks, &
integer (kind=int_kind), dimension (max_blocks), intent(in) :: &
icellu

integer (kind=int_kind), dimension (nx_block*ny_block, max_blocks), &
intent(in) :: &
integer (kind=int_kind), dimension (nx_block*ny_block, max_blocks), intent(in) :: &
indxui , & ! compressed index in i-direction
indxuj ! compressed index in j-direction

Expand Down

0 comments on commit 9b6c2bf

Please sign in to comment.