Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cicecore/cicedynB/dynamics/ice_dyn_eap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ subroutine eap (dt)
stressp_1, stressp_2, stressp_3, stressp_4, &
stressm_1, stressm_2, stressm_3, stressm_4, &
stress12_1, stress12_2, stress12_3, stress12_4
use ice_grid, only: tmask, umask, dxt, dyt, dxhy, dyhx, cxp, cyp, cxm, cym, &
use ice_grid, only: tmask, umask, umaskCD, dxt, dyt, dxhy, dyhx, cxp, cyp, cxm, cym, &
tarear, uarear, grid_average_X2Y!, grid_system commented out until implementation of cd-grid
use ice_state, only: aice, vice, vsno, uvel, vvel, divu, shear, &
aice_init, aice0, aicen, vicen, strength !, uvelE, vvelN grid_system commented out until implementation of cd-grid
Expand Down Expand Up @@ -301,7 +301,7 @@ subroutine eap (dt)
indxui (:,iblk), indxuj (:,iblk), &
aiu (:,:,iblk), umass (:,:,iblk), &
umassdti (:,:,iblk), fcor_blk (:,:,iblk), &
umask (:,:,iblk), &
umask (:,:,iblk), umaskCD (:,:,iblk), &
uocn (:,:,iblk), vocn (:,:,iblk), &
strairx (:,:,iblk), strairy (:,:,iblk), &
ss_tltx (:,:,iblk), ss_tlty (:,:,iblk), &
Expand Down
99 changes: 60 additions & 39 deletions cicecore/cicedynB/dynamics/ice_dyn_evp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ subroutine evp (dt)
stress12_1, stress12_2, stress12_3, stress12_4, &
stresspT, stressmT, stress12T, &
stresspU, stressmU, stress12U
use ice_grid, only: tmask, umask, nmask, emask, uvm, epm, npm, &
use ice_grid, only: hm, tmask, umask, umaskCD, nmask, emask, uvm, epm, npm, &
dxe, dxn, dxt, dxu, dye, dyn, dyt, dyu, &
ratiodxN, ratiodxNr, ratiodyE, ratiodyEr, &
dxhy, dyhx, cxp, cyp, cxm, cym, &
tarear, uarear, tinyarea, grid_average_X2Y, &
tarear, uarear, tinyarea, grid_average_X2Y, tarea, &
grid_type, grid_system
use ice_state, only: aice, vice, vsno, uvel, vvel, uvelN, vvelN, &
uvelE, vvelE, divu, shear, &
Expand Down Expand Up @@ -349,7 +349,7 @@ subroutine evp (dt)
indxui (:,iblk), indxuj (:,iblk), &
aiu (:,:,iblk), umass (:,:,iblk), &
umassdti (:,:,iblk), fcor_blk (:,:,iblk), &
umask (:,:,iblk), &
umask (:,:,iblk), umaskCD (:,:,iblk), &
uocn (:,:,iblk), vocn (:,:,iblk), &
strairx (:,:,iblk), strairy (:,:,iblk), &
ss_tltx (:,:,iblk), ss_tlty (:,:,iblk), &
Expand Down Expand Up @@ -412,8 +412,8 @@ subroutine evp (dt)
indxti (:,iblk), indxtj (:,iblk), &
indxni (:,iblk), indxnj (:,iblk), &
aiN (:,:,iblk), nmass (:,:,iblk), &
nmassdti (:,:,iblk), fcorN_blk (:,:,iblk), &
nmask (:,:,iblk), &
nmassdti (:,:,iblk), fcorN_blk (:,:,iblk),&
nmask (:,:,iblk), nmask (:,:,iblk), &
uocnN (:,:,iblk), vocnN (:,:,iblk), &
strairxN (:,:,iblk), strairyN (:,:,iblk), &
ss_tltxN (:,:,iblk), ss_tltyN (:,:,iblk), &
Expand Down Expand Up @@ -445,8 +445,8 @@ subroutine evp (dt)
indxti (:,iblk), indxtj (:,iblk), &
indxei (:,iblk), indxej (:,iblk), &
aiE (:,:,iblk), emass (:,:,iblk), &
emassdti (:,:,iblk), fcorE_blk (:,:,iblk), &
emask (:,:,iblk), &
emassdti (:,:,iblk), fcorE_blk (:,:,iblk),&
emask (:,:,iblk), emask (:,:,iblk),&
uocnE (:,:,iblk), vocnE (:,:,iblk), &
strairxE (:,:,iblk), strairyE (:,:,iblk), &
ss_tltxE (:,:,iblk), ss_tltyE (:,:,iblk), &
Expand Down Expand Up @@ -691,10 +691,10 @@ subroutine evp (dt)
ratiodxN (:,:,iblk), ratiodxNr (:,:,iblk), &
ratiodyE (:,:,iblk), ratiodyEr (:,:,iblk), &
epm (:,:,iblk), npm (:,:,iblk), &
uvm (:,:,iblk), &
hm (:,:,iblk), uvm (:,:,iblk), &
zetax2T (:,:,iblk), etax2T (:,:,iblk), &
stresspU (:,:,iblk), stressmU (:,:,iblk), &
stress12U (:,:,iblk))
stress12U (:,:,iblk), tarea (:,:,iblk))

call step_vel (nx_block, ny_block, & ! E point
icelle (iblk), Cdn_ocn (:,:,iblk), &
Expand Down Expand Up @@ -951,7 +951,7 @@ subroutine stress (nx_block, ny_block, &
rdg_conv, rdg_shear, &
str )

use ice_dyn_shared, only: strain_rates, deformations, viscous_coeffs_and_rep_pressure
use ice_dyn_shared, only: strain_rates, deformations, viscous_coeffs_and_rep_pressure, viscous_coeffs_and_rep_pressure_T

integer (kind=int_kind), intent(in) :: &
nx_block, ny_block, & ! block dimensions
Expand Down Expand Up @@ -1015,7 +1015,7 @@ subroutine stress (nx_block, ny_block, &
str12ew, str12we, str12ns, str12sn , &
strp_tmp, strm_tmp, tmp

logical :: capping ! of the viscous coef
real(kind=dbl_kind),parameter :: capping = c1 ! of the viscous coef

character(len=*), parameter :: subname = '(stress)'

Expand All @@ -1024,7 +1024,6 @@ subroutine stress (nx_block, ny_block, &
!-----------------------------------------------------------------

str(:,:,:) = c0
capping = .true. ! could be later included in ice_in

do ij = 1, icellt
i = indxti(ij)
Expand Down Expand Up @@ -1054,16 +1053,37 @@ subroutine stress (nx_block, ny_block, &
! viscous coefficients and replacement pressure
!-----------------------------------------------------------------

call viscous_coeffs_and_rep_pressure (strength(i,j), tinyarea(i,j),&
Deltane, Deltanw, &
Deltasw, Deltase, &
zetax2ne, zetax2nw, &
zetax2sw, zetax2se, &
etax2ne, etax2nw, &
etax2sw, etax2se, &
rep_prsne, rep_prsnw, &
rep_prssw, rep_prsse, &
capping)
! call viscous_coeffs_and_rep_pressure (strength(i,j), tinyarea(i,j),&
! Deltane, Deltanw, &
! Deltasw, Deltase, &
! zetax2ne, zetax2nw, &
! zetax2sw, zetax2se, &
! etax2ne, etax2nw, &
! etax2sw, etax2se, &
! rep_prsne, rep_prsnw, &
! rep_prssw, rep_prsse, &
! capping)

call viscous_coeffs_and_rep_pressure_T (strength(i,j), tinyarea(i,j),&
Deltane, zetax2ne, &
etax2ne, rep_prsne, &
capping)

call viscous_coeffs_and_rep_pressure_T (strength(i,j), tinyarea(i,j),&
Deltanw, zetax2nw, &
etax2nw, rep_prsnw, &
capping)

call viscous_coeffs_and_rep_pressure_T (strength(i,j), tinyarea(i,j),&
Deltasw, zetax2sw, &
etax2sw, rep_prssw, &
capping)

call viscous_coeffs_and_rep_pressure_T (strength(i,j), tinyarea(i,j),&
Deltase, zetax2se, &
etax2se, rep_prsse, &
capping)


!-----------------------------------------------------------------
! the stresses ! kg/s^2
Expand Down Expand Up @@ -1319,15 +1339,14 @@ subroutine stress_T (nx_block, ny_block, &
divT, tensionT, shearT, DeltaT, & ! strain rates at T point
rep_prsT ! replacement pressure at T point

logical :: capping ! of the viscous coef
real(kind=dbl_kind),parameter :: capping = c1 ! of the viscous coef

character(len=*), parameter :: subname = '(stress_T)'

!-----------------------------------------------------------------
! Initialize
!-----------------------------------------------------------------

capping = .true. ! could be later included in ice_in

do ij = 1, icellt
i = indxti(ij)
Expand Down Expand Up @@ -1411,13 +1430,13 @@ subroutine stress_U (nx_block, ny_block, &
dxU, dyU, &
ratiodxN, ratiodxNr, &
ratiodyE, ratiodyEr, &
epm, npm, uvm, &
epm, npm, hm, uvm, &
Comment on lines -1440 to +1481

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be preferable to restrict ourselves to 2 arguments per line, for better readability.

zetax2T, etax2T, &
stresspU, stressmU, &
stress12U )
stress12U, Tarea )

use ice_dyn_shared, only: strain_rates_U!, &
! viscous_coeffs_and_rep_pressure_U
use ice_dyn_shared, only: strain_rates_U, &
viscous_coeffs_and_rep_pressure_T2U

integer (kind=int_kind), intent(in) :: &
nx_block, ny_block, & ! block dimensions
Expand Down Expand Up @@ -1445,6 +1464,8 @@ subroutine stress_U (nx_block, ny_block, &
ratiodyEr, & ! -dyE(i,j)/dyE(i,j+1) for BCs
epm , & ! E-cell mask
npm , & ! E-cell mask
hm , & ! T-cell mask
Tarea , & ! area of T-cell
uvm , & ! U-cell mask
zetax2T , & ! 2*zeta at the T point
etax2T ! 2*eta at the T point
Expand Down Expand Up @@ -1491,17 +1512,17 @@ subroutine stress_U (nx_block, ny_block, &
! viscous coefficients and replacement pressure at T point
!-----------------------------------------------------------------

! COMING SOON!!!

! call viscous_coeffs_and_rep_pressure_U (zetax2T(i,j), zetax2T(i,j+1), &
! zetax2T(i+1,j+1),zetax2T(i+1,j), &
! etax2T(i,j), etax2T(i,j+1), &
! etax2T(i+1,j+1), etax2T(i+1,j), &
! hm(i,j), hm(i,j+1), &
! hm(i+1,j+1), hm(i+1,j), &
! tarea(i,j), tarea(i,j+1), &
! tarea(i+1,j+1), tarea(i+1,j), &
! DeltaU )
call viscous_coeffs_and_rep_pressure_T2U (zetax2T(i ,j ), zetax2T(i ,j+1), &
zetax2T(i+1,j+1), zetax2T(i+1,j ), &
etax2T (i ,j ), etax2T (i ,j+1), &
etax2T (i+1,j+1), etax2T (i+1,j ), &
hm (i ,j ), hm (i ,j+1), &
hm (i+1,j+1), hm (i+1,j ), &
tarea (i ,j ), tarea (i,j+1), &
tarea (i+1,j+1), tarea (i+1,j), &
DeltaU, zetax2U, &
etax2U, rep_prsU)

!-----------------------------------------------------------------
! the stresses ! kg/s^2
Expand Down
Loading