diff --git a/cicecore/cicedynB/analysis/ice_diagnostics.F90 b/cicecore/cicedynB/analysis/ice_diagnostics.F90 index fb9fc5f03..ec5ad05fa 100644 --- a/cicecore/cicedynB/analysis/ice_diagnostics.F90 +++ b/cicecore/cicedynB/analysis/ice_diagnostics.F90 @@ -1761,7 +1761,7 @@ subroutine print_state(plabel,i,j,iblk) uvelE, vvelE, uvelN, vvelN, trcrn use ice_flux, only: uatm, vatm, potT, Tair, Qa, flw, frain, fsnow, & fsens, flat, evap, flwout, swvdr, swvdf, swidr, swidf, rhoa, & - frzmlt, sst, sss, Tf, Tref, Qref, Uref, uocn, vocn, strtltx, strtlty + frzmlt, sst, sss, Tf, Tref, Qref, Uref, uocn, vocn, strtltxU, strtltyU character (len=20), intent(in) :: plabel @@ -1907,14 +1907,14 @@ subroutine print_state(plabel,i,j,iblk) write(nu_diag,*) ' fsnow = ',fsnow(i,j,iblk) write(nu_diag,*) ' ' write(nu_diag,*) 'ocn states and fluxes' - write(nu_diag,*) ' frzmlt = ',frzmlt (i,j,iblk) - write(nu_diag,*) ' sst = ',sst (i,j,iblk) - write(nu_diag,*) ' sss = ',sss (i,j,iblk) - write(nu_diag,*) ' Tf = ',Tf (i,j,iblk) - write(nu_diag,*) ' uocn = ',uocn (i,j,iblk) - write(nu_diag,*) ' vocn = ',vocn (i,j,iblk) - write(nu_diag,*) ' strtltx = ',strtltx(i,j,iblk) - write(nu_diag,*) ' strtlty = ',strtlty(i,j,iblk) + write(nu_diag,*) ' frzmlt = ',frzmlt (i,j,iblk) + write(nu_diag,*) ' sst = ',sst (i,j,iblk) + write(nu_diag,*) ' sss = ',sss (i,j,iblk) + write(nu_diag,*) ' Tf = ',Tf (i,j,iblk) + write(nu_diag,*) ' uocn = ',uocn (i,j,iblk) + write(nu_diag,*) ' vocn = ',vocn (i,j,iblk) + write(nu_diag,*) ' strtltxU= ',strtltxU(i,j,iblk) + write(nu_diag,*) ' strtltyU= ',strtltyU(i,j,iblk) write(nu_diag,*) ' ' write(nu_diag,*) 'srf states and fluxes' write(nu_diag,*) ' Tref = ',Tref (i,j,iblk) @@ -1944,7 +1944,7 @@ subroutine print_points_state(plabel,ilabel) uvelE, vvelE, uvelE, vvelE, trcrn use ice_flux, only: uatm, vatm, potT, Tair, Qa, flw, frain, fsnow, & fsens, flat, evap, flwout, swvdr, swvdf, swidr, swidf, rhoa, & - frzmlt, sst, sss, Tf, Tref, Qref, Uref, uocn, vocn, strtltx, strtlty + frzmlt, sst, sss, Tf, Tref, Qref, Uref, uocn, vocn, strtltxU, strtltyU character (len=*), intent(in),optional :: plabel integer , intent(in),optional :: ilabel @@ -2060,14 +2060,14 @@ subroutine print_points_state(plabel,ilabel) write(nu_diag,*) ' fsnow = ',fsnow(i,j,iblk) write(nu_diag,*) ' ' write(nu_diag,*) 'ocn states and fluxes' - write(nu_diag,*) ' frzmlt = ',frzmlt (i,j,iblk) - write(nu_diag,*) ' sst = ',sst (i,j,iblk) - write(nu_diag,*) ' sss = ',sss (i,j,iblk) - write(nu_diag,*) ' Tf = ',Tf (i,j,iblk) - write(nu_diag,*) ' uocn = ',uocn (i,j,iblk) - write(nu_diag,*) ' vocn = ',vocn (i,j,iblk) - write(nu_diag,*) ' strtltx = ',strtltx(i,j,iblk) - write(nu_diag,*) ' strtlty = ',strtlty(i,j,iblk) + write(nu_diag,*) ' frzmlt = ',frzmlt (i,j,iblk) + write(nu_diag,*) ' sst = ',sst (i,j,iblk) + write(nu_diag,*) ' sss = ',sss (i,j,iblk) + write(nu_diag,*) ' Tf = ',Tf (i,j,iblk) + write(nu_diag,*) ' uocn = ',uocn (i,j,iblk) + write(nu_diag,*) ' vocn = ',vocn (i,j,iblk) + write(nu_diag,*) ' strtltxU= ',strtltxU(i,j,iblk) + write(nu_diag,*) ' strtltyU= ',strtltyU(i,j,iblk) write(nu_diag,*) ' ' write(nu_diag,*) 'srf states and fluxes' write(nu_diag,*) ' Tref = ',Tref (i,j,iblk) diff --git a/cicecore/cicedynB/analysis/ice_history.F90 b/cicecore/cicedynB/analysis/ice_history.F90 index 2fc57044e..f3ca9b33e 100644 --- a/cicecore/cicedynB/analysis/ice_history.F90 +++ b/cicecore/cicedynB/analysis/ice_history.F90 @@ -2104,13 +2104,13 @@ subroutine accum_hist (dt) Tair, Tref, Qref, congel, frazil, frazil_diag, snoice, dsnow, & melts, meltb, meltt, meltl, fresh, fsalt, fresh_ai, fsalt_ai, & fhocn, fhocn_ai, uatm, vatm, fbot, Tbot, Tsnice, fswthru_ai, & - strairx, strairy, strtltx, strtlty, strintx, strinty, & - taubx, tauby, strocnx, strocny, & + strairxU, strairyU, strtltxU, strtltyU, strintxU, strintyU, & + taubxU, taubyU, strocnxU, strocnyU, & strairxN, strairyN, strtltxN, strtltyN, strintxN, strintyN, & taubxN, taubyN, strocnxN, strocnyN, & strairxE, strairyE, strtltxE, strtltyE, strintxE, strintyE, & taubxE, taubyE, strocnxE, strocnyE, & - fm, fmN, fmE, daidtt, dvidtt, daidtd, dvidtd, fsurf, & + fmU, fmN, fmE, daidtt, dvidtt, daidtd, dvidtd, fsurf, & fcondtop, fcondbot, fsurfn, fcondtopn, flatn, fsensn, albcnt, snwcnt, & stressp_1, stressm_1, stress12_1, & stresspT, stressmT, stress12T, & @@ -2528,29 +2528,29 @@ subroutine accum_hist (dt) call accum_hist_field(n_fswthru_ai,iblk, fswthru_ai(:,:,iblk), a2D) if (f_strairx(1:1) /= 'x') & - call accum_hist_field(n_strairx, iblk, strairx(:,:,iblk), a2D) + call accum_hist_field(n_strairx, iblk, strairxU(:,:,iblk), a2D) if (f_strairy(1:1) /= 'x') & - call accum_hist_field(n_strairy, iblk, strairy(:,:,iblk), a2D) + call accum_hist_field(n_strairy, iblk, strairyU(:,:,iblk), a2D) if (f_strtltx(1:1) /= 'x') & - call accum_hist_field(n_strtltx, iblk, strtltx(:,:,iblk), a2D) + call accum_hist_field(n_strtltx, iblk, strtltxU(:,:,iblk), a2D) if (f_strtlty(1:1) /= 'x') & - call accum_hist_field(n_strtlty, iblk, strtlty(:,:,iblk), a2D) + call accum_hist_field(n_strtlty, iblk, strtltyU(:,:,iblk), a2D) if (f_strcorx(1:1) /= 'x') & - call accum_hist_field(n_strcorx, iblk, fm(:,:,iblk)*vvel(:,:,iblk), a2D) + call accum_hist_field(n_strcorx, iblk, fmU(:,:,iblk)*vvel(:,:,iblk), a2D) if (f_strcory(1:1) /= 'x') & - call accum_hist_field(n_strcory, iblk,-fm(:,:,iblk)*uvel(:,:,iblk), a2D) + call accum_hist_field(n_strcory, iblk,-fmU(:,:,iblk)*uvel(:,:,iblk), a2D) if (f_strocnx(1:1) /= 'x') & - call accum_hist_field(n_strocnx, iblk, strocnx(:,:,iblk), a2D) + call accum_hist_field(n_strocnx, iblk, strocnxU(:,:,iblk), a2D) if (f_strocny(1:1) /= 'x') & - call accum_hist_field(n_strocny, iblk, strocny(:,:,iblk), a2D) + call accum_hist_field(n_strocny, iblk, strocnyU(:,:,iblk), a2D) if (f_strintx(1:1) /= 'x') & - call accum_hist_field(n_strintx, iblk, strintx(:,:,iblk), a2D) + call accum_hist_field(n_strintx, iblk, strintxU(:,:,iblk), a2D) if (f_strinty(1:1) /= 'x') & - call accum_hist_field(n_strinty, iblk, strinty(:,:,iblk), a2D) + call accum_hist_field(n_strinty, iblk, strintyU(:,:,iblk), a2D) if (f_taubx(1:1) /= 'x') & - call accum_hist_field(n_taubx, iblk, taubx(:,:,iblk), a2D) + call accum_hist_field(n_taubx, iblk, taubxU(:,:,iblk), a2D) if (f_tauby(1:1) /= 'x') & - call accum_hist_field(n_tauby, iblk, tauby(:,:,iblk), a2D) + call accum_hist_field(n_tauby, iblk, taubyU(:,:,iblk), a2D) if (f_strairxN(1:1) /= 'x') & call accum_hist_field(n_strairxN, iblk, strairxN(:,:,iblk), a2D) if (f_strairyN(1:1) /= 'x') & @@ -2791,7 +2791,7 @@ subroutine accum_hist (dt) do j = jlo, jhi do i = ilo, ihi if (aice_init(i,j,iblk) > puny) & - worka(i,j) = aice(i,j,iblk)*(aice(i,j,iblk)*strairx(i,j,iblk)/aice_init(i,j,iblk)) + worka(i,j) = aice(i,j,iblk)*(aice(i,j,iblk)*strairxU(i,j,iblk)/aice_init(i,j,iblk)) enddo enddo call accum_hist_field(n_sistrxdtop, iblk, worka(:,:), a2D) @@ -2802,7 +2802,7 @@ subroutine accum_hist (dt) do j = jlo, jhi do i = ilo, ihi if (aice_init(i,j,iblk) > puny) & - worka(i,j) = aice(i,j,iblk)*(aice(i,j,iblk)*strairy(i,j,iblk)/aice_init(i,j,iblk)) + worka(i,j) = aice(i,j,iblk)*(aice(i,j,iblk)*strairyU(i,j,iblk)/aice_init(i,j,iblk)) enddo enddo call accum_hist_field(n_sistrydtop, iblk, worka(:,:), a2D) @@ -2813,7 +2813,7 @@ subroutine accum_hist (dt) do j = jlo, jhi do i = ilo, ihi if (aice(i,j,iblk) > puny) & - worka(i,j) = aice(i,j,iblk)*strocnx(i,j,iblk) + worka(i,j) = aice(i,j,iblk)*strocnxU(i,j,iblk) enddo enddo call accum_hist_field(n_sistrxubot, iblk, worka(:,:), a2D) @@ -2824,7 +2824,7 @@ subroutine accum_hist (dt) do j = jlo, jhi do i = ilo, ihi if (aice(i,j,iblk) > puny) & - worka(i,j) = aice(i,j,iblk)*strocny(i,j,iblk) + worka(i,j) = aice(i,j,iblk)*strocnyU(i,j,iblk) enddo enddo call accum_hist_field(n_sistryubot, iblk, worka(:,:), a2D) @@ -3293,7 +3293,7 @@ subroutine accum_hist (dt) do j = jlo, jhi do i = ilo, ihi if (aice(i,j,iblk) > puny) then - worka(i,j) = aice(i,j,iblk)*strtltx(i,j,iblk) + worka(i,j) = aice(i,j,iblk)*strtltxU(i,j,iblk) endif enddo enddo @@ -3305,7 +3305,7 @@ subroutine accum_hist (dt) do j = jlo, jhi do i = ilo, ihi if (aice(i,j,iblk) > puny) then - worka(i,j) = aice(i,j,iblk)*strtlty(i,j,iblk) + worka(i,j) = aice(i,j,iblk)*strtltyU(i,j,iblk) endif enddo enddo @@ -3317,7 +3317,7 @@ subroutine accum_hist (dt) do j = jlo, jhi do i = ilo, ihi if (aice(i,j,iblk) > puny) then - worka(i,j) = aice(i,j,iblk)*fm(i,j,iblk)*vvel(i,j,iblk) + worka(i,j) = aice(i,j,iblk)*fmU(i,j,iblk)*vvel(i,j,iblk) endif enddo enddo @@ -3329,7 +3329,7 @@ subroutine accum_hist (dt) do j = jlo, jhi do i = ilo, ihi if (aice(i,j,iblk) > puny) then - worka(i,j) = -aice(i,j,iblk)*fm(i,j,iblk)*uvel(i,j,iblk) + worka(i,j) = -aice(i,j,iblk)*fmU(i,j,iblk)*uvel(i,j,iblk) endif enddo enddo @@ -3341,7 +3341,7 @@ subroutine accum_hist (dt) do j = jlo, jhi do i = ilo, ihi if (aice(i,j,iblk) > puny) then - worka(i,j) = aice(i,j,iblk)*strintx(i,j,iblk) + worka(i,j) = aice(i,j,iblk)*strintxU(i,j,iblk) endif enddo enddo @@ -3353,7 +3353,7 @@ subroutine accum_hist (dt) do j = jlo, jhi do i = ilo, ihi if (aice(i,j,iblk) > puny) then - worka(i,j) = aice(i,j,iblk)*strinty(i,j,iblk) + worka(i,j) = aice(i,j,iblk)*strintyU(i,j,iblk) endif enddo enddo diff --git a/cicecore/cicedynB/dynamics/ice_dyn_eap.F90 b/cicecore/cicedynB/dynamics/ice_dyn_eap.F90 index 317a6ba0d..5cf0b5dbc 100644 --- a/cicecore/cicedynB/dynamics/ice_dyn_eap.F90 +++ b/cicecore/cicedynB/dynamics/ice_dyn_eap.F90 @@ -136,15 +136,15 @@ subroutine eap (dt) seabed_stress_method, seabed_stress, & stack_fields, unstack_fields use ice_flux, only: rdg_conv, strairxT, strairyT, & - strairx, strairy, uocn, vocn, ss_tltx, ss_tlty, iceumask, fm, & - strtltx, strtlty, strocnx, strocny, strintx, strinty, taubx, tauby, & + strairxU, strairyU, uocn, vocn, ss_tltx, ss_tlty, fmU, & + strtltxU, strtltyU, strocnxU, strocnyU, strintxU, strintyU, taubxU, taubyU, & strocnxT, strocnyT, strax, stray, & - Tbu, hwater, & + TbU, hwater, & 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, & - tarear, uarear, grid_average_X2Y, & + tarear, uarear, grid_average_X2Y, iceumask, & grid_atm_dynu, grid_atm_dynv, grid_ocn_dynu, grid_ocn_dynv use ice_state, only: aice, vice, vsno, uvel, vvel, divu, shear, & aice_init, aice0, aicen, vicen, strength @@ -178,11 +178,11 @@ subroutine eap (dt) ss_tltxU , & ! sea surface slope, x-direction (m/m) ss_tltyU , & ! sea surface slope, y-direction (m/m) tmass , & ! total mass of ice and snow (kg/m^2) - waterx , & ! for ocean stress calculation, x (m/s) - watery , & ! for ocean stress calculation, y (m/s) - forcex , & ! work array: combined atm stress and ocn tilt, x - forcey , & ! work array: combined atm stress and ocn tilt, y - aiu , & ! ice fraction on u-grid + waterxU , & ! for ocean stress calculation, x (m/s) + wateryU , & ! for ocean stress calculation, y (m/s) + forcexU , & ! work array: combined atm stress and ocn tilt, x + forceyU , & ! work array: combined atm stress and ocn tilt, y + aiU , & ! ice fraction on u-grid umass , & ! total mass of ice and snow (u grid) umassdti ! mass of U-cell/dte (kg/m^2 s) @@ -271,7 +271,7 @@ subroutine eap (dt) !----------------------------------------------------------------- call grid_average_X2Y('F', tmass , 'T' , umass, 'U') - call grid_average_X2Y('F', aice_init, 'T' , aiu , 'U') + call grid_average_X2Y('F', aice_init, 'T' , aiU , 'U') call grid_average_X2Y('S', uocn , grid_ocn_dynu, uocnU , 'U') call grid_average_X2Y('S', vocn , grid_ocn_dynv, vocnU , 'U') call grid_average_X2Y('S', ss_tltx , grid_ocn_dynu, ss_tltxU, 'U') @@ -288,15 +288,15 @@ subroutine eap (dt) file=__FILE__, line=__LINE__) if (.not. calc_strair) then - call grid_average_X2Y('F', strax, grid_atm_dynu, strairx, 'U') - call grid_average_X2Y('F', stray, grid_atm_dynv, strairy, 'U') + call grid_average_X2Y('F', strax, grid_atm_dynu, strairxU, 'U') + call grid_average_X2Y('F', stray, grid_atm_dynv, strairyU, 'U') else call ice_HaloUpdate (strairxT, halo_info, & field_loc_center, field_type_vector) call ice_HaloUpdate (strairyT, halo_info, & field_loc_center, field_type_vector) - call grid_average_X2Y('F', strairxT, 'T', strairx, 'U') - call grid_average_X2Y('F', strairyT, 'T', strairy, 'U') + call grid_average_X2Y('F', strairxT, 'T', strairxU, 'U') + call grid_average_X2Y('F', strairyT, 'T', strairyU, 'U') endif !$OMP PARALLEL DO PRIVATE(iblk,ilo,ihi,jlo,jhi,this_block,ij,i,j) SCHEDULE(runtime) @@ -317,20 +317,20 @@ subroutine eap (dt) icellt (iblk), icellu (iblk), & indxti (:,iblk), indxtj (:,iblk), & indxui (:,iblk), indxuj (:,iblk), & - aiu (:,:,iblk), umass (:,:,iblk), & + aiU (:,:,iblk), umass (:,:,iblk), & umassdti (:,:,iblk), fcor_blk (:,:,iblk), & umask (:,:,iblk), & uocnU (:,:,iblk), vocnU (:,:,iblk), & - strairx (:,:,iblk), strairy (:,:,iblk), & + strairxU (:,:,iblk), strairyU (:,:,iblk), & ss_tltxU (:,:,iblk), ss_tltyU (:,:,iblk), & icetmask (:,:,iblk), iceumask (:,:,iblk), & - fm (:,:,iblk), dt, & - strtltx (:,:,iblk), strtlty (:,:,iblk), & - strocnx (:,:,iblk), strocny (:,:,iblk), & - strintx (:,:,iblk), strinty (:,:,iblk), & - taubx (:,:,iblk), tauby (:,:,iblk), & - waterx (:,:,iblk), watery (:,:,iblk), & - forcex (:,:,iblk), forcey (:,:,iblk), & + fmU (:,:,iblk), dt, & + strtltxU (:,:,iblk), strtltyU (:,:,iblk), & + strocnxU (:,:,iblk), strocnyU (:,:,iblk), & + strintxU (:,:,iblk), strintyU (:,:,iblk), & + taubxU (:,:,iblk), taubyU (:,:,iblk), & + waterxU (:,:,iblk), wateryU (:,:,iblk), & + forcexU (:,:,iblk), forceyU (:,:,iblk), & stressp_1 (:,:,iblk), stressp_2 (:,:,iblk), & stressp_3 (:,:,iblk), stressp_4 (:,:,iblk), & stressm_1 (:,:,iblk), stressm_2 (:,:,iblk), & @@ -339,7 +339,7 @@ subroutine eap (dt) stress12_3(:,:,iblk), stress12_4(:,:,iblk), & uvel_init (:,:,iblk), vvel_init (:,:,iblk), & uvel (:,:,iblk), vvel (:,:,iblk), & - Tbu (:,:,iblk)) + TbU (:,:,iblk)) !----------------------------------------------------------------- ! Initialize structure tensor @@ -413,7 +413,7 @@ subroutine eap (dt) endif !----------------------------------------------------------------- - ! seabed stress factor Tbu (Tbu is part of Cb coefficient) + ! seabed stress factor TbU (TbU is part of Cb coefficient) !----------------------------------------------------------------- if (seabed_stress) then @@ -424,7 +424,7 @@ subroutine eap (dt) icellu (iblk), & indxui (:,iblk), indxuj(:,iblk), & vice (:,:,iblk), aice(:,:,iblk), & - hwater(:,:,iblk), Tbu (:,:,iblk)) + hwater(:,:,iblk), TbU (:,:,iblk)) enddo !$OMP END PARALLEL DO @@ -435,7 +435,7 @@ subroutine eap (dt) icellt(iblk), indxti(:,iblk), indxtj(:,iblk), & icellu(iblk), indxui(:,iblk), indxuj(:,iblk), & aicen(:,:,:,iblk), vicen(:,:,:,iblk), & - hwater (:,:,iblk), Tbu (:,:,iblk)) + hwater (:,:,iblk), TbU (:,:,iblk)) enddo !$OMP END PARALLEL DO endif @@ -493,17 +493,17 @@ subroutine eap (dt) call stepu (nx_block, ny_block, & icellu (iblk), Cdn_ocn (:,:,iblk), & indxui (:,iblk), indxuj (:,iblk), & - aiu (:,:,iblk), strtmp (:,:,:), & + aiU (:,:,iblk), strtmp (:,:,:), & uocnU (:,:,iblk), vocnU (:,:,iblk), & - waterx (:,:,iblk), watery (:,:,iblk), & - forcex (:,:,iblk), forcey (:,:,iblk), & - umassdti (:,:,iblk), fm (:,:,iblk), & + waterxU (:,:,iblk), wateryU (:,:,iblk), & + forcexU (:,:,iblk), forceyU (:,:,iblk), & + umassdti (:,:,iblk), fmU (:,:,iblk), & uarear (:,:,iblk), & - strintx (:,:,iblk), strinty (:,:,iblk), & - taubx (:,:,iblk), tauby (:,:,iblk), & + strintxU (:,:,iblk), strintyU (:,:,iblk), & + taubxU (:,:,iblk), taubyU (:,:,iblk), & uvel_init(:,:,iblk), vvel_init(:,:,iblk), & uvel (:,:,iblk), vvel (:,:,iblk), & - Tbu (:,:,iblk)) + TbU (:,:,iblk)) ! call ice_timer_stop(timer_tmp2,iblk) !----------------------------------------------------------------- @@ -561,15 +561,15 @@ subroutine eap (dt) indxui (:,iblk), indxuj (:,iblk), & uvel (:,:,iblk), vvel (:,:,iblk), & uocnU (:,:,iblk), vocnU (:,:,iblk), & - aiu (:,:,iblk), fm (:,:,iblk), & - strocnx (:,:,iblk), strocny (:,:,iblk)) + aiU (:,:,iblk), fmU (:,:,iblk), & + strocnxU(:,:,iblk), strocnyU(:,:,iblk)) enddo !$OMP END PARALLEL DO - ! strocn computed on U, N, E as needed. Map strocn U divided by aiu to T + ! strocn computed on U, N, E as needed. Map strocn U divided by aiU to T ! TODO: This should be done elsewhere as part of generalization? - ! conservation requires aiu be divided before averaging + ! conservation requires aiU be divided before averaging work1 = c0 work2 = c0 !$OMP PARALLEL DO PRIVATE(iblk,ij,i,j) @@ -577,8 +577,8 @@ subroutine eap (dt) do ij = 1, icellu(iblk) i = indxui(ij,iblk) j = indxuj(ij,iblk) - work1(i,j,iblk) = strocnx(i,j,iblk)/aiu(i,j,iblk) - work2(i,j,iblk) = strocny(i,j,iblk)/aiu(i,j,iblk) + work1(i,j,iblk) = strocnxU(i,j,iblk)/aiU(i,j,iblk) + work2(i,j,iblk) = strocnyU(i,j,iblk)/aiU(i,j,iblk) enddo enddo call ice_HaloUpdate (work1, halo_info, & diff --git a/cicecore/cicedynB/dynamics/ice_dyn_evp.F90 b/cicecore/cicedynB/dynamics/ice_dyn_evp.F90 index 866775132..ecd283642 100644 --- a/cicecore/cicedynB/dynamics/ice_dyn_evp.F90 +++ b/cicecore/cicedynB/dynamics/ice_dyn_evp.F90 @@ -83,14 +83,14 @@ subroutine evp (dt) use ice_domain, only: nblocks, blocks_ice, halo_info, maskhalo_dyn use ice_domain_size, only: max_blocks, ncat, nx_global, ny_global use ice_flux, only: rdg_conv, rdg_shear, strairxT, strairyT, & - strairx, strairy, uocn, vocn, ss_tltx, ss_tlty, iceumask, fm, & - strtltx, strtlty, strocnx, strocny, strintx, strinty, taubx, tauby, & + strairxU, strairyU, uocn, vocn, ss_tltx, ss_tlty, fmU, & + strtltxU, strtltyU, strocnxU, strocnyU, strintxU, strintyU, taubxU, taubyU, & strocnxT, strocnyT, strax, stray, & - Tbu, hwater, & - strairxN, strairyN, icenmask, fmN, & + TbU, hwater, & + strairxN, strairyN, fmN, & strtltxN, strtltyN, strocnxN, strocnyN, strintxN, strintyN, taubxN, taubyN, & TbN, & - strairxE, strairyE, iceemask, fmE, & + strairxE, strairyE, fmE, & strtltxE, strtltyE, strocnxE, strocnyE, strintxE, strintyE, taubxE, taubyE, & TbE, & stressp_1, stressp_2, stressp_3, stressp_4, & @@ -99,6 +99,7 @@ subroutine evp (dt) stresspT, stressmT, stress12T, & stresspU, stressmU, stress12U use ice_grid, only: hm, tmask, umask, umaskCD, nmask, emask, uvm, epm, npm, & + iceumask, iceemask, icenmask, & dxE, dxN, dxT, dxU, dyE, dyN, dyT, dyU, & ratiodxN, ratiodxNr, ratiodyE, ratiodyEr, & dxhy, dyhx, cxp, cyp, cxm, cym, & @@ -150,11 +151,11 @@ subroutine evp (dt) ss_tltxU , & ! sea surface slope, x-direction (m/m) ss_tltyU , & ! sea surface slope, y-direction (m/m) tmass , & ! total mass of ice and snow (kg/m^2) - waterx , & ! for ocean stress calculation, x (m/s) - watery , & ! for ocean stress calculation, y (m/s) - forcex , & ! work array: combined atm stress and ocn tilt, x - forcey , & ! work array: combined atm stress and ocn tilt, y - aiu , & ! ice fraction on u-grid + waterxU , & ! for ocean stress calculation, x (m/s) + wateryU , & ! for ocean stress calculation, y (m/s) + forcexU , & ! work array: combined atm stress and ocn tilt, x + forceyU , & ! work array: combined atm stress and ocn tilt, y + aiU , & ! ice fraction on u-grid umass , & ! total mass of ice and snow (u grid) umassdti ! mass of U-cell/dte (kg/m^2 s) @@ -317,7 +318,7 @@ subroutine evp (dt) !----------------------------------------------------------------- call grid_average_X2Y('F', tmass , 'T' , umass , 'U') - call grid_average_X2Y('F', aice_init, 'T' , aiu , 'U') + call grid_average_X2Y('F', aice_init, 'T' , aiU , 'U') call grid_average_X2Y('S', uocn , grid_ocn_dynu, uocnU , 'U') call grid_average_X2Y('S', vocn , grid_ocn_dynv, vocnU , 'U') call grid_average_X2Y('S', ss_tltx , grid_ocn_dynu, ss_tltxU, 'U') @@ -348,15 +349,15 @@ subroutine evp (dt) file=__FILE__, line=__LINE__) if (.not. calc_strair) then - call grid_average_X2Y('F', strax, grid_atm_dynu, strairx, 'U') - call grid_average_X2Y('F', stray, grid_atm_dynv, strairy, 'U') + call grid_average_X2Y('F', strax, grid_atm_dynu, strairxU, 'U') + call grid_average_X2Y('F', stray, grid_atm_dynv, strairyU, 'U') else call ice_HaloUpdate (strairxT, halo_info, & field_loc_center, field_type_vector) call ice_HaloUpdate (strairyT, halo_info, & field_loc_center, field_type_vector) - call grid_average_X2Y('F', strairxT, 'T', strairx, 'U') - call grid_average_X2Y('F', strairyT, 'T', strairy, 'U') + call grid_average_X2Y('F', strairxT, 'T', strairxU, 'U') + call grid_average_X2Y('F', strairyT, 'T', strairyU, 'U') endif if (grid_ice == 'CD' .or. grid_ice == 'C') then @@ -392,20 +393,20 @@ subroutine evp (dt) icellt (iblk), icellu (iblk), & indxti (:,iblk), indxtj (:,iblk), & indxui (:,iblk), indxuj (:,iblk), & - aiu (:,:,iblk), umass (:,:,iblk), & + aiU (:,:,iblk), umass (:,:,iblk), & umassdti (:,:,iblk), fcor_blk (:,:,iblk), & umask (:,:,iblk), & uocnU (:,:,iblk), vocnU (:,:,iblk), & - strairx (:,:,iblk), strairy (:,:,iblk), & + strairxU (:,:,iblk), strairyU (:,:,iblk), & ss_tltxU (:,:,iblk), ss_tltyU (:,:,iblk), & icetmask (:,:,iblk), iceumask (:,:,iblk), & - fm (:,:,iblk), dt, & - strtltx (:,:,iblk), strtlty (:,:,iblk), & - strocnx (:,:,iblk), strocny (:,:,iblk), & - strintx (:,:,iblk), strinty (:,:,iblk), & - taubx (:,:,iblk), tauby (:,:,iblk), & - waterx (:,:,iblk), watery (:,:,iblk), & - forcex (:,:,iblk), forcey (:,:,iblk), & + fmU (:,:,iblk), dt, & + strtltxU (:,:,iblk), strtltyU (:,:,iblk), & + strocnxU (:,:,iblk), strocnyU (:,:,iblk), & + strintxU (:,:,iblk), strintyU (:,:,iblk), & + taubxU (:,:,iblk), taubyU (:,:,iblk), & + waterxU (:,:,iblk), wateryU (:,:,iblk), & + forcexU (:,:,iblk), forceyU (:,:,iblk), & stressp_1 (:,:,iblk), stressp_2 (:,:,iblk), & stressp_3 (:,:,iblk), stressp_4 (:,:,iblk), & stressm_1 (:,:,iblk), stressm_2 (:,:,iblk), & @@ -414,7 +415,7 @@ subroutine evp (dt) stress12_3(:,:,iblk), stress12_4(:,:,iblk), & uvel_init (:,:,iblk), vvel_init (:,:,iblk), & uvel (:,:,iblk), vvel (:,:,iblk), & - Tbu (:,:,iblk)) + TbU (:,:,iblk)) elseif (trim(grid_ice) == 'CD' .or. grid_ice == 'C') then call dyn_prep2 (nx_block, ny_block, & @@ -422,20 +423,20 @@ subroutine evp (dt) icellt (iblk), icellu (iblk), & indxti (:,iblk), indxtj (:,iblk), & indxui (:,iblk), indxuj (:,iblk), & - aiu (:,:,iblk), umass (:,:,iblk), & + aiU (:,:,iblk), umass (:,:,iblk), & umassdti (:,:,iblk), fcor_blk (:,:,iblk), & umaskCD (:,:,iblk), & uocnU (:,:,iblk), vocnU (:,:,iblk), & - strairx (:,:,iblk), strairy (:,:,iblk), & + strairxU (:,:,iblk), strairyU (:,:,iblk), & ss_tltxU (:,:,iblk), ss_tltyU (:,:,iblk), & icetmask (:,:,iblk), iceumask (:,:,iblk), & - fm (:,:,iblk), dt, & - strtltx (:,:,iblk), strtlty (:,:,iblk), & - strocnx (:,:,iblk), strocny (:,:,iblk), & - strintx (:,:,iblk), strinty (:,:,iblk), & - taubx (:,:,iblk), tauby (:,:,iblk), & - waterx (:,:,iblk), watery (:,:,iblk), & - forcex (:,:,iblk), forcey (:,:,iblk), & + fmU (:,:,iblk), dt, & + strtltxU (:,:,iblk), strtltyU (:,:,iblk), & + strocnxU (:,:,iblk), strocnyU (:,:,iblk), & + strintxU (:,:,iblk), strintyU (:,:,iblk), & + taubxU (:,:,iblk), taubyU (:,:,iblk), & + waterxU (:,:,iblk), wateryU (:,:,iblk), & + forcexU (:,:,iblk), forceyU (:,:,iblk), & stressp_1 (:,:,iblk), stressp_2 (:,:,iblk), & stressp_3 (:,:,iblk), stressp_4 (:,:,iblk), & stressm_1 (:,:,iblk), stressm_2 (:,:,iblk), & @@ -444,7 +445,7 @@ subroutine evp (dt) stress12_3(:,:,iblk), stress12_4(:,:,iblk), & uvel_init (:,:,iblk), vvel_init (:,:,iblk), & uvel (:,:,iblk), vvel (:,:,iblk), & - Tbu (:,:,iblk)) + TbU (:,:,iblk)) endif !----------------------------------------------------------------- @@ -642,7 +643,7 @@ subroutine evp (dt) endif !----------------------------------------------------------------- - ! seabed stress factor Tbu (Tbu is part of Cb coefficient) + ! seabed stress factor TbU (TbU is part of Cb coefficient) !----------------------------------------------------------------- if (seabed_stress) then @@ -656,7 +657,7 @@ subroutine evp (dt) icellu (iblk), & indxui (:,iblk), indxuj(:,iblk), & vice (:,:,iblk), aice(:,:,iblk), & - hwater(:,:,iblk), Tbu (:,:,iblk)) + hwater(:,:,iblk), TbU (:,:,iblk)) enddo !$OMP END PARALLEL DO @@ -667,7 +668,7 @@ subroutine evp (dt) icellt(iblk), indxti(:,iblk), indxtj(:,iblk), & icellu(iblk), indxui(:,iblk), indxuj(:,iblk), & aicen(:,:,:,iblk), vicen(:,:,:,iblk) , & - hwater (:,:,iblk), Tbu (:,:,iblk)) + hwater (:,:,iblk), TbU (:,:,iblk)) enddo !$OMP END PARALLEL DO endif @@ -697,7 +698,7 @@ subroutine evp (dt) icellt(iblk), indxti(:,iblk), indxtj(:,iblk), & icellu(iblk), indxui(:,iblk), indxuj(:,iblk), & aicen(:,:,:,iblk), vicen(:,:,:,iblk) , & - hwater (:,:,iblk), Tbu (:,:,iblk) , & + hwater (:,:,iblk), TbU (:,:,iblk) , & TbE (:,:,iblk), TbN (:,:,iblk) , & icelle(iblk), indxei(:,iblk), indxej(:,iblk), & icelln(iblk), indxni(:,iblk), indxnj(:,iblk) ) @@ -724,8 +725,8 @@ subroutine evp (dt) call ice_dyn_evp_1d_copyin( & nx_block,ny_block,nblocks,nx_global+2*nghost,ny_global+2*nghost, & icetmask, iceumask, & - cdn_ocn,aiu,uocnU,vocnU,forcex,forcey,Tbu, & - umassdti,fm,uarear,tarear,strintx,strinty,uvel_init,vvel_init,& + cdn_ocn,aiU,uocnU,vocnU,forcexU,forceyU,TbU, & + umassdti,fmU,uarear,tarear,strintxU,strintyU,uvel_init,vvel_init,& strength,uvel,vvel,dxT,dyT, & stressp_1 ,stressp_2, stressp_3, stressp_4, & stressm_1 ,stressm_2, stressm_3, stressm_4, & @@ -733,12 +734,12 @@ subroutine evp (dt) call ice_dyn_evp_1d_kernel() call ice_dyn_evp_1d_copyout( & nx_block,ny_block,nblocks,nx_global+2*nghost,ny_global+2*nghost, & -!strocn uvel,vvel, strocnx,strocny, strintx,strinty, & - uvel,vvel, strintx,strinty, & +!strocn uvel,vvel, strocnxU,strocnyU, strintxU,strintyU, & + uvel,vvel, strintxU,strintyU, & stressp_1, stressp_2, stressp_3, stressp_4, & stressm_1, stressm_2, stressm_3, stressm_4, & stress12_1,stress12_2,stress12_3,stress12_4, & - divu,rdg_conv,rdg_shear,shear,taubx,tauby ) + divu,rdg_conv,rdg_shear,shear,taubxU,taubyU ) call ice_timer_stop(timer_evp_1d) else ! evp_algorithm == standard_2d (Standard CICE) @@ -794,17 +795,17 @@ subroutine evp (dt) call stepu (nx_block , ny_block , & icellu (iblk), Cdn_ocn (:,:,iblk), & indxui (:,iblk), indxuj (:,iblk), & - aiu (:,:,iblk), strtmp (:,:,:), & + aiU (:,:,iblk), strtmp (:,:,:), & uocnU (:,:,iblk), vocnU (:,:,iblk), & - waterx (:,:,iblk), watery (:,:,iblk), & - forcex (:,:,iblk), forcey (:,:,iblk), & - umassdti (:,:,iblk), fm (:,:,iblk), & + waterxU (:,:,iblk), wateryU (:,:,iblk), & + forcexU (:,:,iblk), forceyU (:,:,iblk), & + umassdti (:,:,iblk), fmU (:,:,iblk), & uarear (:,:,iblk), & - strintx (:,:,iblk), strinty (:,:,iblk), & - taubx (:,:,iblk), tauby (:,:,iblk), & + strintxU (:,:,iblk), strintyU(:,:,iblk), & + taubxU (:,:,iblk), taubyU (:,:,iblk), & uvel_init(:,:,iblk), vvel_init(:,:,iblk),& uvel (:,:,iblk), vvel (:,:,iblk), & - Tbu (:,:,iblk)) + TbU (:,:,iblk)) enddo ! iblk !$OMP END PARALLEL DO @@ -1263,8 +1264,8 @@ subroutine evp (dt) indxui (:,iblk), indxuj (:,iblk), & uvel (:,:,iblk), vvel (:,:,iblk), & uocnU (:,:,iblk), vocnU (:,:,iblk), & - aiu (:,:,iblk), fm (:,:,iblk), & - strocnx (:,:,iblk), strocny (:,:,iblk)) + aiU (:,:,iblk), fmU (:,:,iblk), & + strocnxU(:,:,iblk), strocnyU(:,:,iblk)) enddo !$OMP END PARALLEL DO @@ -1296,10 +1297,10 @@ subroutine evp (dt) endif - ! strocn computed on U, N, E as needed. Map strocn U divided by aiu to T + ! strocn computed on U, N, E as needed. Map strocn U divided by aiU to T ! TODO: This should be done elsewhere as part of generalization? ! TODO: Rename strocn[x,y]T since it's different than strocn[x,y][U,N,E] - ! conservation requires aiu be divided before averaging + ! conservation requires aiU be divided before averaging work1 = c0 work2 = c0 !$OMP PARALLEL DO PRIVATE(iblk,ij,i,j) SCHEDULE(runtime) @@ -1307,8 +1308,8 @@ subroutine evp (dt) do ij = 1, icellu(iblk) i = indxui(ij,iblk) j = indxuj(ij,iblk) - work1(i,j,iblk) = strocnx(i,j,iblk)/aiu(i,j,iblk) - work2(i,j,iblk) = strocny(i,j,iblk)/aiu(i,j,iblk) + work1(i,j,iblk) = strocnxU(i,j,iblk)/aiU(i,j,iblk) + work2(i,j,iblk) = strocnyU(i,j,iblk)/aiU(i,j,iblk) enddo enddo !$OMP END PARALLEL DO @@ -1320,8 +1321,8 @@ subroutine evp (dt) call grid_average_X2Y('F', work2, 'U', strocnyT, 'T') if (grid_ice == 'CD' .or. grid_ice == 'C') then - call grid_average_X2Y('S', strintxE, 'E', strintx, 'U') ! diagnostic - call grid_average_X2Y('S', strintyN, 'N', strinty, 'U') ! diagnostic + call grid_average_X2Y('S', strintxE, 'E', strintxU, 'U') ! diagnostic + call grid_average_X2Y('S', strintyN, 'N', strintyU, 'U') ! diagnostic endif call ice_timer_stop(timer_dynamics) ! dynamics diff --git a/cicecore/cicedynB/dynamics/ice_dyn_shared.F90 b/cicecore/cicedynB/dynamics/ice_dyn_shared.F90 index a30cc1b1c..237861c60 100644 --- a/cicecore/cicedynB/dynamics/ice_dyn_shared.F90 +++ b/cicecore/cicedynB/dynamics/ice_dyn_shared.F90 @@ -192,14 +192,14 @@ subroutine init_dyn (dt) use ice_blocks, only: nx_block, ny_block use ice_domain, only: nblocks, halo_dynbundle use ice_domain_size, only: max_blocks - use ice_flux, only: rdg_conv, rdg_shear, iceumask, iceemask, icenmask, & + use ice_flux, only: rdg_conv, rdg_shear, & stressp_1, stressp_2, stressp_3, stressp_4, & stressm_1, stressm_2, stressm_3, stressm_4, & stress12_1, stress12_2, stress12_3, stress12_4, & stresspT, stressmT, stress12T, & stresspU, stressmU, stress12U use ice_state, only: uvel, vvel, uvelE, vvelE, uvelN, vvelN, divu, shear - use ice_grid, only: ULAT, NLAT, ELAT, tarea + use ice_grid, only: ULAT, NLAT, ELAT, tarea, iceumask, iceemask, icenmask real (kind=dbl_kind), intent(in) :: & dt ! time step @@ -376,8 +376,8 @@ end subroutine set_evp_parameters subroutine dyn_prep1 (nx_block, ny_block, & ilo, ihi, jlo, jhi, & aice, vice, & - vsno, tmask, & - tmass, icetmask) + vsno, Tmask, & + Tmass, iceTmask) integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions @@ -389,13 +389,13 @@ subroutine dyn_prep1 (nx_block, ny_block, & vsno ! volume per unit area of snow (m) logical (kind=log_kind), dimension (nx_block,ny_block), intent(in) :: & - tmask ! land/boundary mask, thickness (T-cell) + Tmask ! land/boundary mask, thickness (T-cell) real (kind=dbl_kind), dimension (nx_block,ny_block), intent(out) :: & - tmass ! total mass of ice and snow (kg/m^2) + Tmass ! total mass of ice and snow (kg/m^2) integer (kind=int_kind), dimension (nx_block,ny_block), intent(out) :: & - icetmask ! ice extent mask (T-cell) + iceTmask ! ice extent mask (T-cell) ! local variables @@ -423,22 +423,22 @@ subroutine dyn_prep1 (nx_block, ny_block, & ! NOTE: vice and vsno must be up to date in all grid cells, ! including ghost cells !----------------------------------------------------------------- - if (tmask(i,j)) then - tmass(i,j) = (rhoi*vice(i,j) + rhos*vsno(i,j)) ! kg/m^2 + if (Tmask(i,j)) then + Tmass(i,j) = (rhoi*vice(i,j) + rhos*vsno(i,j)) ! kg/m^2 else - tmass(i,j) = c0 + Tmass(i,j) = c0 endif !----------------------------------------------------------------- ! ice extent mask (T-cells) !----------------------------------------------------------------- - tmphm(i,j) = tmask(i,j) .and. (aice (i,j) > a_min) & - .and. (tmass(i,j) > m_min) + tmphm(i,j) = Tmask(i,j) .and. (aice (i,j) > a_min) & + .and. (Tmass(i,j) > m_min) !----------------------------------------------------------------- ! augmented mask (land + open ocean) !----------------------------------------------------------------- - icetmask (i,j) = 0 + iceTmask (i,j) = 0 enddo enddo @@ -450,10 +450,10 @@ subroutine dyn_prep1 (nx_block, ny_block, & if (tmphm(i-1,j+1) .or. tmphm(i,j+1) .or. tmphm(i+1,j+1) .or. & tmphm(i-1,j) .or. tmphm(i,j) .or. tmphm(i+1,j) .or. & tmphm(i-1,j-1) .or. tmphm(i,j-1) .or. tmphm(i+1,j-1) ) then - icetmask(i,j) = 1 + iceTmask(i,j) = 1 endif - if (.not.tmask(i,j)) icetmask(i,j) = 0 + if (.not.Tmask(i,j)) iceTmask(i,j) = 0 enddo enddo @@ -472,16 +472,16 @@ end subroutine dyn_prep1 subroutine dyn_prep2 (nx_block, ny_block, & ilo, ihi, jlo, jhi, & - icellt, icellu, & - indxti, indxtj, & - indxui, indxuj, & - aiu, umass, & - umassdti, fcor, & - umask, & + icellT, icellX, & + indxTi, indxTj, & + indxXi, indxXj, & + aiX, Xmass, & + Xmassdti, fcor, & + Xmask, & uocn, vocn, & strairx, strairy, & ss_tltx, ss_tlty, & - icetmask, iceumask, & + iceTmask, iceXmask, & fm, dt, & strtltx, strtlty, & strocnx, strocny, & @@ -497,34 +497,34 @@ subroutine dyn_prep2 (nx_block, ny_block, & stress12_3, stress12_4, & uvel_init, vvel_init, & uvel, vvel, & - Tbu) + TbU) integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions ilo,ihi,jlo,jhi ! beginning and end of physical domain integer (kind=int_kind), intent(out) :: & - icellt , & ! no. of cells where icetmask = 1 - icellu ! no. of cells where iceumask = 1 + icellT , & ! no. of cells where iceTmask = 1 + icellX ! no. of cells where iceXmask = 1 integer (kind=int_kind), dimension (nx_block*ny_block), intent(out) :: & - indxti , & ! compressed index in i-direction - indxtj , & ! compressed index in j-direction - indxui , & ! compressed index in i-direction - indxuj ! compressed index in j-direction + indxTi , & ! compressed index in i-direction on T grid + indxTj , & ! compressed index in j-direction + indxXi , & ! compressed index in i-direction on X grid, grid depends on call + indxXj ! compressed index in j-direction logical (kind=log_kind), dimension (nx_block,ny_block), intent(in) :: & - umask ! land/boundary mask, thickness (U-cell) + Xmask ! land/boundary mask, thickness (X-grid-cell) integer (kind=int_kind), dimension (nx_block,ny_block), intent(in) :: & - icetmask ! ice extent mask (T-cell) + iceTmask ! ice extent mask (T-cell) logical (kind=log_kind), dimension (nx_block,ny_block), intent(inout) :: & - iceumask ! ice extent mask (U-cell) + iceXmask ! ice extent mask (X-grid-cell) real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & - aiu , & ! ice fraction on u-grid - umass , & ! total mass of ice and snow (u grid) + aiX , & ! ice fraction on u-grid (X grid) + Xmass , & ! total mass of ice and snow (X grid) fcor , & ! Coriolis parameter (1/s) strairx , & ! stress on ice by air, x-direction strairy , & ! stress on ice by air, y-direction @@ -537,10 +537,10 @@ subroutine dyn_prep2 (nx_block, ny_block, & dt ! time step real (kind=dbl_kind), dimension (nx_block,ny_block), intent(out) :: & - Tbu, & ! seabed stress factor (N/m^2) + TbU, & ! seabed stress factor (N/m^2) 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) + Xmassdti, & ! mass of X-grid-cell/dt (kg/m^2 s) waterx , & ! for ocean stress calculation, x (m/s) watery , & ! for ocean stress calculation, y (m/s) forcex , & ! work array: combined atm stress and ocn tilt, x @@ -571,7 +571,7 @@ subroutine dyn_prep2 (nx_block, ny_block, & gravit logical (kind=log_kind), dimension(nx_block,ny_block) :: & - iceumask_old ! old-time iceumask + iceXmask_old ! old-time iceXmask character(len=*), parameter :: subname = '(dyn_prep2)' @@ -585,12 +585,12 @@ subroutine dyn_prep2 (nx_block, ny_block, & watery (i,j) = c0 forcex (i,j) = c0 forcey (i,j) = c0 - umassdti (i,j) = c0 - Tbu (i,j) = c0 + Xmassdti (i,j) = c0 + TbU (i,j) = c0 taubx (i,j) = c0 tauby (i,j) = c0 - if (icetmask(i,j)==0) then + if (iceTmask(i,j)==0) then stressp_1 (i,j) = c0 stressp_2 (i,j) = c0 stressp_3 (i,j) = c0 @@ -608,44 +608,44 @@ subroutine dyn_prep2 (nx_block, ny_block, & enddo ! j !----------------------------------------------------------------- - ! Identify cells where icetmask = 1 - ! Note: The icellt mask includes north and east ghost cells + ! Identify cells where iceTmask = 1 + ! Note: The icellT mask includes north and east ghost cells ! where stresses are needed. !----------------------------------------------------------------- - icellt = 0 + icellT = 0 do j = jlo, jhi+1 do i = ilo, ihi+1 - if (icetmask(i,j) == 1) then - icellt = icellt + 1 - indxti(icellt) = i - indxtj(icellt) = j + if (iceTmask(i,j) == 1) then + icellT = icellT + 1 + indxTi(icellT) = i + indxTj(icellT) = j endif enddo enddo !----------------------------------------------------------------- - ! Define iceumask - ! Identify cells where iceumask is true + ! Define iceXmask + ! Identify cells where iceXmask is true ! Initialize velocity where needed !----------------------------------------------------------------- - icellu = 0 + icellX = 0 do j = jlo, jhi do i = ilo, ihi - iceumask_old(i,j) = iceumask(i,j) ! save + iceXmask_old(i,j) = iceXmask(i,j) ! save ! ice extent mask (U-cells) - iceumask(i,j) = (umask(i,j)) .and. (aiu (i,j) > a_min) & - .and. (umass(i,j) > m_min) + iceXmask(i,j) = (Xmask(i,j)) .and. (aiX (i,j) > a_min) & + .and. (Xmass(i,j) > m_min) - if (iceumask(i,j)) then - icellu = icellu + 1 - indxui(icellu) = i - indxuj(icellu) = j + if (iceXmask(i,j)) then + icellX = icellX + 1 + indxXi(icellX) = i + indxXj(icellX) = j ! initialize velocity for new ice points to ocean sfc current - if (.not. iceumask_old(i,j)) then + if (.not. iceXmask_old(i,j)) then uvel(i,j) = uocn(i,j) vvel(i,j) = vocn(i,j) endif @@ -675,13 +675,13 @@ subroutine dyn_prep2 (nx_block, ny_block, & file=__FILE__, line=__LINE__) endif - do ij = 1, icellu - i = indxui(ij) - j = indxuj(ij) + do ij = 1, icellX + i = indxXi(ij) + j = indxXj(ij) - umassdti(i,j) = umass(i,j)/dt ! kg/m^2 s + Xmassdti(i,j) = Xmass(i,j)/dt ! kg/m^2 s - fm(i,j) = fcor(i,j)*umass(i,j) ! Coriolis * mass + fm(i,j) = fcor(i,j)*Xmass(i,j) ! Coriolis * mass ! for ocean stress waterx(i,j) = uocn(i,j)*cosw - vocn(i,j)*sinw*sign(c1,fm(i,j)) @@ -693,8 +693,8 @@ subroutine dyn_prep2 (nx_block, ny_block, & strtltx(i,j) = -fm(i,j)*vocn(i,j) strtlty(i,j) = fm(i,j)*uocn(i,j) elseif (trim(ssh_stress) == 'coupled') then - strtltx(i,j) = -gravit*umass(i,j)*ss_tltx(i,j) - strtlty(i,j) = -gravit*umass(i,j)*ss_tlty(i,j) + strtltx(i,j) = -gravit*Xmass(i,j)*ss_tltx(i,j) + strtlty(i,j) = -gravit*Xmass(i,j)*ss_tlty(i,j) else call abort_ice(subname//' ERROR: unknown ssh_stress='//trim(ssh_stress), & file=__FILE__, line=__LINE__) @@ -713,38 +713,38 @@ end subroutine dyn_prep2 ! author: Elizabeth C. Hunke, LANL subroutine stepu (nx_block, ny_block, & - icellu, Cw, & - indxui, indxuj, & - aiu, str, & + icellU, Cw, & + indxUi, indxUj, & + aiX, str, & uocn, vocn, & waterx, watery, & forcex, forcey, & - umassdti, fm, & + Umassdti, fm, & uarear, & strintx, strinty, & taubx, tauby, & uvel_init, vvel_init,& uvel, vvel, & - Tbu) + TbU) integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions - icellu ! total count when iceumask is true + icellU ! total count when iceumask is true integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: & - indxui , & ! compressed index in i-direction - indxuj ! compressed index in j-direction + indxUi , & ! compressed index in i-direction + indxUj ! compressed index in j-direction real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & - Tbu, & ! seabed stress factor (N/m^2) + TbU, & ! seabed stress factor (N/m^2) uvel_init,& ! x-component of velocity (m/s), beginning of timestep vvel_init,& ! y-component of velocity (m/s), beginning of timestep - aiu , & ! ice fraction on u-grid + aiX , & ! ice fraction on X-grid waterx , & ! for ocean stress calculation, x (m/s) watery , & ! for ocean stress calculation, y (m/s) forcex , & ! work array: combined atm stress and ocn tilt, x forcey , & ! work array: combined atm stress and ocn tilt, y - umassdti, & ! mass of U-cell/dt (kg/m^2 s) + Umassdti, & ! mass of U-cell/dt (kg/m^2 s) uocn , & ! ocean current, x-direction (m/s) vocn , & ! ocean current, y-direction (m/s) fm , & ! Coriolis param. * mass in U-cell (kg/s) @@ -790,23 +790,23 @@ subroutine stepu (nx_block, ny_block, & if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & file=__FILE__, line=__LINE__) - do ij =1, icellu - i = indxui(ij) - j = indxuj(ij) + do ij =1, icellU + i = indxUi(ij) + j = indxUj(ij) uold = uvel(i,j) vold = vvel(i,j) ! (magnitude of relative ocean current)*rhow*drag*aice - vrel = aiu(i,j)*rhow*Cw(i,j)*sqrt((uocn(i,j) - uold)**2 + & + vrel = aiX(i,j)*rhow*Cw(i,j)*sqrt((uocn(i,j) - uold)**2 + & (vocn(i,j) - vold)**2) ! m/s ! ice/ocean stress taux = vrel*waterx(i,j) ! NOTE this is not the entire tauy = vrel*watery(i,j) ! ocn stress term - Cb = Tbu(i,j) / (sqrt(uold**2 + vold**2) + u0) ! for seabed stress + Cb = TbU(i,j) / (sqrt(uold**2 + vold**2) + u0) ! for seabed stress ! revp = 0 for classic evp, 1 for revised evp - cca = (brlx + revp)*umassdti(i,j) + vrel * cosw + Cb ! kg/m^2 s + cca = (brlx + revp)*Umassdti(i,j) + vrel * cosw + Cb ! kg/m^2 s ccb = fm(i,j) + sign(c1,fm(i,j)) * vrel * sinw ! kg/m^2 s @@ -820,9 +820,9 @@ subroutine stepu (nx_block, ny_block, & ! finally, the velocity components cc1 = strintx(i,j) + forcex(i,j) + taux & - + umassdti(i,j)*(brlx*uold + revp*uvel_init(i,j)) + + Umassdti(i,j)*(brlx*uold + revp*uvel_init(i,j)) cc2 = strinty(i,j) + forcey(i,j) + tauy & - + umassdti(i,j)*(brlx*vold + revp*vvel_init(i,j)) + + Umassdti(i,j)*(brlx*vold + revp*vvel_init(i,j)) uvel(i,j) = (cca*cc1 + ccb*cc2) / ab2 ! m/s vvel(i,j) = (cca*cc2 - ccb*cc1) / ab2 @@ -839,18 +839,18 @@ end subroutine stepu ! Integration of the momentum equation to find velocity (u,v) at E and N locations subroutine stepuv_CD (nx_block, ny_block, & - icell, Cw, & - indxi, indxj, & - aiu, & - uocn, vocn, & - waterx, watery, & - forcex, forcey, & - massdti, fm, & - strintx, strinty, & - taubx, tauby, & - uvel_init, vvel_init,& - uvel, vvel, & - Tb) + icell, Cw, & + indxi, indxj, & + aiX, & + uocn, vocn, & + waterx, watery, & + forcex, forcey, & + massdti, fm, & + strintx, strinty, & + taubx, tauby, & + uvel_init, vvel_init,& + uvel, vvel, & + Tb) integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions @@ -864,7 +864,7 @@ subroutine stepuv_CD (nx_block, ny_block, & Tb, & ! seabed stress factor (N/m^2) uvel_init,& ! x-component of velocity (m/s), beginning of timestep vvel_init,& ! y-component of velocity (m/s), beginning of timestep - aiu , & ! ice fraction on [en]-grid + aiX , & ! ice fraction on X-grid waterx , & ! for ocean stress calculation, x (m/s) watery , & ! for ocean stress calculation, y (m/s) forcex , & ! work array: combined atm stress and ocn tilt, x @@ -920,7 +920,7 @@ subroutine stepuv_CD (nx_block, ny_block, & vold = vvel(i,j) ! (magnitude of relative ocean current)*rhow*drag*aice - vrel = aiu(i,j)*rhow*Cw(i,j)*sqrt((uocn(i,j) - uold)**2 + & + vrel = aiX(i,j)*rhow*Cw(i,j)*sqrt((uocn(i,j) - uold)**2 + & (vocn(i,j) - vold)**2) ! m/s ! ice/ocean stress taux = vrel*waterx(i,j) ! NOTE this is not the entire @@ -956,16 +956,16 @@ end subroutine stepuv_CD ! Integration of the momentum equation to find velocity u at E location on C grid subroutine stepu_C (nx_block, ny_block, & - icell, Cw, & - indxi, indxj, & - aiu, & - uocn, vocn, & - waterx, forcex, & - massdti, fm, & - strintx, taubx, & - uvel_init, & - uvel, vvel, & - Tb) + icell, Cw, & + indxi, indxj, & + aiX, & + uocn, vocn, & + waterx, forcex, & + massdti, fm, & + strintx, taubx, & + uvel_init, & + uvel, vvel, & + Tb) integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions @@ -978,7 +978,7 @@ subroutine stepu_C (nx_block, ny_block, & real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & Tb, & ! seabed stress factor (N/m^2) uvel_init,& ! x-component of velocity (m/s), beginning of timestep - aiu , & ! ice fraction on [en]-grid + aiX , & ! ice fraction on X-grid waterx , & ! for ocean stress calculation, x (m/s) forcex , & ! work array: combined atm stress and ocn tilt, x massdti , & ! mass of e-cell/dt (kg/m^2 s) @@ -1025,7 +1025,7 @@ subroutine stepu_C (nx_block, ny_block, & vold = vvel(i,j) ! (magnitude of relative ocean current)*rhow*drag*aice - vrel = aiu(i,j)*rhow*Cw(i,j)*sqrt((uocn(i,j) - uold)**2 + & + vrel = aiX(i,j)*rhow*Cw(i,j)*sqrt((uocn(i,j) - uold)**2 + & (vocn(i,j) - vold)**2) ! m/s ! ice/ocean stress taux = vrel*waterx(i,j) ! NOTE this is not the entire @@ -1055,16 +1055,16 @@ end subroutine stepu_C ! Integration of the momentum equation to find velocity v at N location on C grid subroutine stepv_C (nx_block, ny_block, & - icell, Cw, & - indxi, indxj, & - aiu, & - uocn, vocn, & - watery, forcey, & - massdti, fm, & - strinty, tauby, & - vvel_init, & - uvel, vvel, & - Tb) + icell, Cw, & + indxi, indxj, & + aiX, & + uocn, vocn, & + watery, forcey, & + massdti, fm, & + strinty, tauby, & + vvel_init, & + uvel, vvel, & + Tb) integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions @@ -1077,7 +1077,7 @@ subroutine stepv_C (nx_block, ny_block, & real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & Tb, & ! seabed stress factor (N/m^2) vvel_init,& ! y-component of velocity (m/s), beginning of timestep - aiu , & ! ice fraction on [en]-grid + aiX , & ! ice fraction on X-grid watery , & ! for ocean stress calculation, y (m/s) forcey , & ! work array: combined atm stress and ocn tilt, y massdti , & ! mass of n-cell/dt (kg/m^2 s) @@ -1124,7 +1124,7 @@ subroutine stepv_C (nx_block, ny_block, & vold = vvel(i,j) ! (magnitude of relative ocean current)*rhow*drag*aice - vrel = aiu(i,j)*rhow*Cw(i,j)*sqrt((uocn(i,j) - uold)**2 + & + vrel = aiX(i,j)*rhow*Cw(i,j)*sqrt((uocn(i,j) - uold)**2 + & (vocn(i,j) - vold)**2) ! m/s ! ice/ocean stress tauy = vrel*watery(i,j) ! NOTE this is not the entire ocn stress @@ -1157,27 +1157,27 @@ end subroutine stepv_C ! author: Elizabeth C. Hunke, LANL subroutine dyn_finish (nx_block, ny_block, & - icellu, Cw, & - indxui, indxuj, & + icellU, Cw, & + indxUi, indxUj, & uvel, vvel, & uocn, vocn, & - aiu, fm, & + aiX, fm, & strocnx, strocny) integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions - icellu ! total count when iceumask is true + icellU ! total count when iceumask is true integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: & - indxui , & ! compressed index in i-direction - indxuj ! compressed index in j-direction + indxUi , & ! compressed index in i-direction + indxUj ! compressed index in j-direction 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) uocn , & ! ocean current, x-direction (m/s) vocn , & ! ocean current, y-direction (m/s) - aiu , & ! ice fraction on u-grid + aiX , & ! ice fraction on X-grid fm ! Coriolis param. * mass in U-cell (kg/s) real (kind=dbl_kind), dimension (nx_block,ny_block), intent(inout) :: & @@ -1204,20 +1204,20 @@ subroutine dyn_finish (nx_block, ny_block, & file=__FILE__, line=__LINE__) ! ocean-ice stress for coupling - do ij =1, icellu - i = indxui(ij) - j = indxuj(ij) + do ij =1, icellU + i = indxUi(ij) + j = indxUj(ij) vrel = rhow*Cw(i,j)*sqrt((uocn(i,j) - uvel(i,j))**2 + & (vocn(i,j) - vvel(i,j))**2) ! m/s ! strocnx(i,j) = strocnx(i,j) & -! - vrel*(uvel(i,j)*cosw - vvel(i,j)*sinw) * aiu(i,j) +! - vrel*(uvel(i,j)*cosw - vvel(i,j)*sinw) * aiX(i,j) ! strocny(i,j) = strocny(i,j) & -! - vrel*(vvel(i,j)*cosw + uvel(i,j)*sinw) * aiu(i,j) +! - vrel*(vvel(i,j)*cosw + uvel(i,j)*sinw) * aiX(i,j) ! update strocnx to most recent iterate and complete the term - vrel = vrel * aiu(i,j) + vrel = vrel * aiX(i,j) strocnx(i,j) = vrel*((uocn(i,j) - uvel(i,j))*cosw & - (vocn(i,j) - vvel(i,j))*sinw*sign(c1,fm(i,j))) strocny(i,j) = vrel*((vocn(i,j) - vvel(i,j))*cosw & @@ -1233,7 +1233,7 @@ subroutine dyn_finish (nx_block, ny_block, & end subroutine dyn_finish !======================================================================= -! Computes seabed (basal) stress factor Tbu (landfast ice) based on mean +! Computes seabed (basal) stress factor TbU (landfast ice) based on mean ! thickness and bathymetry data. LKD refers to linear keel draft. This ! parameterization assumes that the largest keel draft varies linearly ! with the mean thickness. @@ -1248,25 +1248,25 @@ end subroutine dyn_finish ! ! author: JF Lemieux, Philippe Blain (ECCC) ! -! note1: Tbu is a part of the Cb as defined in Lemieux et al. 2015 and 2016. +! note1: TbU is a part of the Cb as defined in Lemieux et al. 2015 and 2016. ! note2: Seabed stress (better name) was called basal stress in Lemieux et al. 2015 subroutine seabed_stress_factor_LKD (nx_block, ny_block, & - icellu, & - indxui, indxuj, & + icellU, & + indxUi, indxUj, & vice, aice, & - hwater, Tbu, & + hwater, TbU, & grid_location) use ice_grid, only: grid_neighbor_min, grid_neighbor_max integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions - icellu ! no. of cells where ice[uen]mask = 1 + icellU ! no. of cells where ice[uen]mask = 1 integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: & - indxui , & ! compressed index in i-direction - indxuj ! compressed index in j-direction + indxUi , & ! compressed index in i-direction + indxUj ! compressed index in j-direction real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & aice , & ! concentration of ice at tracer location @@ -1274,7 +1274,7 @@ subroutine seabed_stress_factor_LKD (nx_block, ny_block, & hwater ! water depth at tracer location (m) real (kind=dbl_kind), dimension (nx_block,ny_block), intent(inout) :: & - Tbu ! seabed stress factor at 'grid_location' (N/m^2) + TbU ! seabed stress factor at 'grid_location' (N/m^2) character(len=*), optional, intent(inout) :: & grid_location ! grid location (U, E, N), U assumed if not present @@ -1301,9 +1301,9 @@ subroutine seabed_stress_factor_LKD (nx_block, ny_block, & l_grid_location = grid_location endif - do ij = 1, icellu - i = indxui(ij) - j = indxuj(ij) + do ij = 1, icellU + i = indxUi(ij) + j = indxUj(ij) ! convert quantities to grid_location @@ -1319,14 +1319,14 @@ subroutine seabed_stress_factor_LKD (nx_block, ny_block, & hcu = au * hwu / k1 ! 2- calculate seabed stress factor - Tbu(i,j) = docalc_tbu*k2 * max(c0,(hu - hcu)) * exp(-alphab * (c1 - au)) + TbU(i,j) = docalc_tbu*k2 * max(c0,(hu - hcu)) * exp(-alphab * (c1 - au)) enddo ! ij end subroutine seabed_stress_factor_LKD !======================================================================= -! Computes seabed (basal) stress factor Tbu (landfast ice) based on +! Computes seabed (basal) stress factor TbU (landfast ice) based on ! probability of contact between the ITD and the seabed. The water depth ! could take into account variations of the SSH. In the simplest ! formulation, hwater is simply the value of the bathymetry. To calculate @@ -1340,13 +1340,13 @@ end subroutine seabed_stress_factor_LKD ! authors: D. Dumont, J.F. Lemieux, E. Dumas-Lefebvre, F. Dupont ! subroutine seabed_stress_factor_prob (nx_block, ny_block, & - icellt, indxti, indxtj, & - icellu, indxui, indxuj, & + icellT, indxTi, indxTj, & + icellU, indxUi, indxUj, & aicen, vicen, & - hwater, Tbu, & + hwater, TbU, & TbE, TbN, & - icelle, indxei, indxej, & - icelln, indxni, indxnj) + icellE, indxEi, indxEj, & + icellN, indxNi, indxNj) ! use modules use ice_arrays_column, only: hin_max @@ -1355,13 +1355,13 @@ subroutine seabed_stress_factor_prob (nx_block, ny_block, & integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions - icellt, icellu ! no. of cells where ice[tu]mask = 1 + icellT, icellU ! no. of cells where ice[tu]mask = 1 integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: & - indxti , & ! compressed index in i-direction - indxtj , & ! compressed index in j-direction - indxui , & ! compressed index in i-direction - indxuj ! compressed index in j-direction + indxTi , & ! compressed index in i-direction + indxTj , & ! compressed index in j-direction + indxUi , & ! compressed index in i-direction + indxUj ! compressed index in j-direction real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & hwater ! water depth at tracer location (m) @@ -1371,20 +1371,20 @@ subroutine seabed_stress_factor_prob (nx_block, ny_block, & vicen ! partial volume for last thickness category in ITD (m) real (kind=dbl_kind), dimension (nx_block,ny_block), intent(inout) :: & - Tbu ! seabed stress factor at U location (N/m^2) + TbU ! seabed stress factor at U location (N/m^2) real (kind=dbl_kind), dimension (nx_block,ny_block), intent(inout), optional :: & TbE, & ! seabed stress factor at E location (N/m^2) TbN ! seabed stress factor at N location (N/m^2) integer (kind=int_kind), intent(in), optional :: & - icelle, icelln ! no. of cells where ice[en]mask = 1 + icellE, icellN ! no. of cells where ice[en]mask = 1 integer (kind=int_kind), dimension (nx_block*ny_block), intent(in), optional :: & - indxei , & ! compressed index in i-direction - indxej , & ! compressed index in j-direction - indxni , & ! compressed index in i-direction - indxnj ! compressed index in j-direction + indxEi , & ! compressed index in i-direction + indxEj , & ! compressed index in j-direction + indxNi , & ! compressed index in i-direction + indxNj ! compressed index in j-direction ! local variables @@ -1444,9 +1444,9 @@ subroutine seabed_stress_factor_prob (nx_block, ny_block, & Tbt=c0 - do ij = 1, icellt - i = indxti(ij) - j = indxtj(ij) + do ij = 1, icellT + i = indxTi(ij) + j = indxTj(ij) atot = sum(aicen(i,j,1:ncat)) @@ -1517,27 +1517,27 @@ subroutine seabed_stress_factor_prob (nx_block, ny_block, & enddo if (grid_ice == "B") then - do ij = 1, icellu - i = indxui(ij) - j = indxuj(ij) + do ij = 1, icellU + i = indxUi(ij) + j = indxUj(ij) ! convert quantities to U-location - Tbu(i,j) = grid_neighbor_max(Tbt, i, j, 'U') + TbU(i,j) = grid_neighbor_max(Tbt, i, j, 'U') enddo ! ij elseif (grid_ice == "C" .or. grid_ice == "CD") then if (present(Tbe) .and. present(TbN) .and. & - present(icelle) .and. present(icelln) .and. & - present(indxei) .and. present(indxej) .and. & - present(indxni) .and. present(indxnj)) then + present(icellE) .and. present(icellN) .and. & + present(indxEi) .and. present(indxEj) .and. & + present(indxNi) .and. present(indxNj)) then - do ij = 1, icelle - i = indxei(ij) - j = indxej(ij) + do ij = 1, icellE + i = indxEi(ij) + j = indxEj(ij) ! convert quantities to E-location TbE(i,j) = grid_neighbor_max(Tbt, i, j, 'E') enddo - do ij = 1, icelln - i = indxni(ij) - j = indxnj(ij) + do ij = 1, icellN + i = indxNi(ij) + j = indxNj(ij) ! convert quantities to N-location TbN(i,j) = grid_neighbor_max(Tbt, i, j, 'N') enddo @@ -1621,8 +1621,8 @@ end subroutine principal_stress ! 2019: subroutine created by Philippe Blain, ECCC subroutine deformations (nx_block, ny_block, & - icellt, & - indxti, indxtj, & + icellT, & + indxTi, indxTj, & uvel, vvel, & dxT, dyT, & cxp, cyp, & @@ -1635,11 +1635,11 @@ subroutine deformations (nx_block, ny_block, & integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions - icellt ! no. of cells where icetmask = 1 + icellT ! no. of cells where iceTmask = 1 integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: & - indxti , & ! compressed index in i-direction - indxtj ! compressed index in j-direction + indxTi , & ! compressed index in i-direction + indxTj ! compressed index in j-direction real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & uvel , & ! x-component of velocity (m/s) @@ -1672,9 +1672,9 @@ subroutine deformations (nx_block, ny_block, & character(len=*), parameter :: subname = '(deformations)' - do ij = 1, icellt - i = indxti(ij) - j = indxtj(ij) + do ij = 1, icellT + i = indxTi(ij) + j = indxTj(ij) !----------------------------------------------------------------- ! strain rates @@ -1719,8 +1719,8 @@ end subroutine deformations ! Nov 2021 subroutine deformationsCD_T (nx_block, ny_block, & - icellt, & - indxti, indxtj, & + icellT, & + indxTi, indxTj, & uvelE, vvelE, & uvelN, vvelN, & dxN, dyE, & @@ -1733,11 +1733,11 @@ subroutine deformationsCD_T (nx_block, ny_block, & integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions - icellt ! no. of cells where icetmask = 1 + icellT ! no. of cells where iceTmask = 1 integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: & - indxti , & ! compressed index in i-direction - indxtj ! compressed index in j-direction + indxTi , & ! compressed index in i-direction + indxTj ! compressed index in j-direction real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & uvelE , & ! x-component of velocity (m/s) at the E point @@ -1778,8 +1778,8 @@ subroutine deformationsCD_T (nx_block, ny_block, & !----------------------------------------------------------------- call strain_rates_T (nx_block , ny_block , & - icellt , & - indxti(:) , indxtj (:) , & + icellT , & + indxTi(:) , indxTj (:) , & uvelE (:,:), vvelE (:,:), & uvelN (:,:), vvelN (:,:), & dxN (:,:), dyE (:,:), & @@ -1787,9 +1787,9 @@ subroutine deformationsCD_T (nx_block, ny_block, & divT (:,:), tensionT(:,:), & shearT(:,:), DeltaT (:,:) ) - do ij = 1, icellt - i = indxti(ij) - j = indxtj(ij) + do ij = 1, icellT + i = indxTi(ij) + j = indxTj(ij) !----------------------------------------------------------------- ! deformations for mechanical redistribution @@ -1815,8 +1815,8 @@ end subroutine deformationsCD_T ! Nov 2021 subroutine deformationsC_T (nx_block, ny_block, & - icellt, & - indxti, indxtj, & + icellT, & + indxTi, indxTj, & uvelE, vvelE, & uvelN, vvelN, & dxN, dyE, & @@ -1830,11 +1830,11 @@ subroutine deformationsC_T (nx_block, ny_block, & integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions - icellt ! no. of cells where icetmask = 1 + icellT ! no. of cells where iceTmask = 1 integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: & - indxti , & ! compressed index in i-direction - indxtj ! compressed index in j-direction + indxTi , & ! compressed index in i-direction + indxTj ! compressed index in j-direction real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & uvelE , & ! x-component of velocity (m/s) at the E point @@ -1878,8 +1878,8 @@ subroutine deformationsC_T (nx_block, ny_block, & !----------------------------------------------------------------- call strain_rates_T (nx_block , ny_block , & - icellt , & - indxti(:) , indxtj (:) , & + icellT , & + indxTi(:) , indxTj (:) , & uvelE (:,:), vvelE (:,:), & uvelN (:,:), vvelN (:,:), & dxN (:,:), dyE (:,:), & @@ -1889,9 +1889,9 @@ subroutine deformationsC_T (nx_block, ny_block, & ! DeltaT is calc by strain_rates_T but replaced by calculation below. - do ij = 1, icellt - i = indxti(ij) - j = indxtj(ij) + do ij = 1, icellT + i = indxTi(ij) + j = indxTj(ij) !----------------------------------------------------------------- ! deformations for mechanical redistribution @@ -2014,22 +2014,22 @@ end subroutine strain_rates ! Nov 2021 subroutine strain_rates_Tdtsd (nx_block, ny_block, & - icellt, & - indxti, indxtj, & - uvelE, vvelE, & - uvelN, vvelN, & - dxN, dyE, & - dxT, dyT, & - divT, tensionT, & - shearT, DeltaT ) + icellT, & + indxTi, indxTj, & + uvelE, vvelE, & + uvelN, vvelN, & + dxN, dyE, & + dxT, dyT, & + divT, tensionT, & + shearT, DeltaT ) integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions - icellt + icellT integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: & - indxti , & ! compressed index in i-direction - indxtj ! compressed index in j-direction + indxTi , & ! compressed index in i-direction + indxTj ! compressed index in j-direction real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & uvelE , & ! x-component of velocity (m/s) at the E point @@ -2061,8 +2061,8 @@ subroutine strain_rates_Tdtsd (nx_block, ny_block, & ! compute divT, tensionT call strain_rates_Tdt (nx_block, ny_block, & - icellt, & - indxti, indxtj, & + icellT, & + indxTi, indxTj, & uvelE, vvelE, & uvelN, vvelN, & dxN, dyE, & @@ -2072,9 +2072,9 @@ subroutine strain_rates_Tdtsd (nx_block, ny_block, & shearT (:,:) = c0 deltaT (:,:) = c0 - do ij = 1, icellt - i = indxti(ij) - j = indxtj(ij) + do ij = 1, icellT + i = indxTi(ij) + j = indxTj(ij) ! shearing strain rate = 2*e_12 shearT(i,j) = (dxT(i,j)**2)*(uvelN(i,j)/dxN(i,j) - uvelN(i,j-1)/dxN(i,j-1)) & @@ -2094,21 +2094,21 @@ end subroutine strain_rates_Tdtsd ! Nov 2021 subroutine strain_rates_Tdt (nx_block, ny_block, & - icellt, & - indxti, indxtj, & - uvelE, vvelE, & - uvelN, vvelN, & - dxN, dyE, & - dxT, dyT, & - divT, tensionT ) + icellT, & + indxTi, indxTj, & + uvelE, vvelE, & + uvelN, vvelN, & + dxN, dyE, & + dxT, dyT, & + divT, tensionT ) integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions - icellt + icellT integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: & - indxti , & ! compressed index in i-direction - indxtj ! compressed index in j-direction + indxTi , & ! compressed index in i-direction + indxTj ! compressed index in j-direction real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & uvelE , & ! x-component of velocity (m/s) at the E point @@ -2139,9 +2139,9 @@ subroutine strain_rates_Tdt (nx_block, ny_block, & divT (:,:) = c0 tensionT(:,:) = c0 - do ij = 1, icellt - i = indxti(ij) - j = indxtj(ij) + do ij = 1, icellT + i = indxTi(ij) + j = indxTj(ij) ! divergence = e_11 + e_22 divT (i,j)= dyE(i,j)*uvelE(i ,j ) - dyE(i-1,j)*uvelE(i-1,j ) & @@ -2162,8 +2162,8 @@ end subroutine strain_rates_Tdt ! Nov 2021 subroutine strain_rates_U (nx_block, ny_block, & - icellu, & - indxui, indxuj, & + icellU, & + indxUi, indxUj, & uvelE, vvelE, & uvelN, vvelN, & uvelU, vvelU, & @@ -2177,11 +2177,11 @@ subroutine strain_rates_U (nx_block, ny_block, & integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions - icellu + icellU integer (kind=int_kind), dimension (nx_block*ny_block), intent(in) :: & - indxui , & ! compressed index in i-direction - indxuj ! compressed index in j-direction + indxUi , & ! compressed index in i-direction + indxUj ! compressed index in j-direction real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & uvelE , & ! x-component of velocity (m/s) at the E point @@ -2227,9 +2227,9 @@ subroutine strain_rates_U (nx_block, ny_block, & shearU (:,:) = c0 deltaU (:,:) = c0 - do ij = 1, icellu - i = indxui(ij) - j = indxuj(ij) + do ij = 1, icellU + i = indxUi(ij) + j = indxUj(ij) uNip1j = uvelN(i+1,j) * npm(i+1,j) & +(npm(i,j)-npm(i+1,j)) * npm(i,j) * ratiodxN(i,j) * uvelN(i,j) diff --git a/cicecore/cicedynB/dynamics/ice_dyn_vp.F90 b/cicecore/cicedynB/dynamics/ice_dyn_vp.F90 index 24421a91f..7e0bdb745 100644 --- a/cicecore/cicedynB/dynamics/ice_dyn_vp.F90 +++ b/cicecore/cicedynB/dynamics/ice_dyn_vp.F90 @@ -50,7 +50,7 @@ module ice_dyn_vp seabed_stress_factor_LKD, seabed_stress_factor_prob, seabed_stress_method, & seabed_stress, Ktens, stack_fields, unstack_fields use ice_fileunits, only: nu_diag - use ice_flux, only: fm + use ice_flux, only: fmU use ice_global_reductions, only: global_sum, global_allreduce_sum use ice_grid, only: dxT, dyT, dxhy, dyhx, cxp, cyp, cxm, cym, uarear use ice_exit, only: abort_ice @@ -167,15 +167,15 @@ subroutine implicit_solver (dt) use ice_domain_size, only: max_blocks, ncat use ice_dyn_shared, only: deformations use ice_flux, only: rdg_conv, rdg_shear, strairxT, strairyT, & - strairx, strairy, uocn, vocn, ss_tltx, ss_tlty, iceumask, fm, & - strtltx, strtlty, strocnx, strocny, strintx, strinty, taubx, tauby, & + strairxU, strairyU, uocn, vocn, ss_tltx, ss_tlty, fmU, & + strtltxU, strtltyU, strocnxU, strocnyU, strintxU, strintyU, taubxU, taubyU, & strocnxT, strocnyT, strax, stray, & - Tbu, hwater, & + TbU, hwater, & 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, cxp, cyp, cxm, cym, & - tarear, grid_type, grid_average_X2Y, & + tarear, grid_type, grid_average_X2Y, iceumask, & grid_atm_dynu, grid_atm_dynv, grid_ocn_dynu, grid_ocn_dynv use ice_state, only: aice, vice, vsno, uvel, vvel, divu, shear, & aice_init, aice0, aicen, vicen, strength @@ -199,16 +199,16 @@ subroutine implicit_solver (dt) ss_tltxU , & ! sea surface slope, x-direction (m/m) ss_tltyU , & ! sea surface slope, y-direction (m/m) tmass , & ! total mass of ice and snow (kg/m^2) - waterx , & ! for ocean stress calculation, x (m/s) - watery , & ! for ocean stress calculation, y (m/s) - forcex , & ! work array: combined atm stress and ocn tilt, x - forcey , & ! work array: combined atm stress and ocn tilt, y + waterxU , & ! for ocean stress calculation, x (m/s) + wateryU , & ! for ocean stress calculation, y (m/s) + forcexU , & ! work array: combined atm stress and ocn tilt, x + forceyU , & ! work array: combined atm stress and ocn tilt, y bxfix , & ! part of bx that is constant during Picard byfix , & ! part of by that is constant during Picard Cb , & ! seabed stress coefficient fpresx , & ! fixed point residual vector, x components: fx = uvel - uprev_k fpresy , & ! fixed point residual vector, y components: fy = vvel - vprev_k - aiu , & ! ice fraction on u-grid + aiU , & ! ice fraction on u-grid umass , & ! total mass of ice and snow (u grid) umassdti ! mass of U-cell/dte (kg/m^2 s) @@ -303,7 +303,7 @@ subroutine implicit_solver (dt) !----------------------------------------------------------------- call grid_average_X2Y('F',tmass , 'T', umass, 'U') - call grid_average_X2Y('F',aice_init, 'T', aiu , 'U') + call grid_average_X2Y('F',aice_init, 'T', aiU , 'U') call grid_average_X2Y('S',uocn , grid_ocn_dynu, uocnU , 'U') call grid_average_X2Y('S',vocn , grid_ocn_dynv, vocnU , 'U') call grid_average_X2Y('S',ss_tltx, grid_ocn_dynu, ss_tltxU, 'U') @@ -319,15 +319,15 @@ subroutine implicit_solver (dt) file=__FILE__, line=__LINE__) if (.not. calc_strair) then - call grid_average_X2Y('F', strax, grid_atm_dynu, strairx, 'U') - call grid_average_X2Y('F', stray, grid_atm_dynv, strairy, 'U') + call grid_average_X2Y('F', strax, grid_atm_dynu, strairxU, 'U') + call grid_average_X2Y('F', stray, grid_atm_dynv, strairyU, 'U') else call ice_HaloUpdate (strairxT, halo_info, & field_loc_center, field_type_vector) call ice_HaloUpdate (strairyT, halo_info, & field_loc_center, field_type_vector) - call grid_average_X2Y('F',strairxT,'T',strairx,'U') - call grid_average_X2Y('F',strairyT,'T',strairy,'U') + call grid_average_X2Y('F',strairxT,'T',strairxU,'U') + call grid_average_X2Y('F',strairyT,'T',strairyU,'U') endif ! tcraig, tcx, threading here leads to some non-reproducbile results and failures in icepack_ice_strength @@ -350,20 +350,20 @@ subroutine implicit_solver (dt) icellt(iblk), icellu(iblk), & indxti (:,iblk), indxtj (:,iblk), & indxui (:,iblk), indxuj (:,iblk), & - aiu (:,:,iblk), umass (:,:,iblk), & + aiU (:,:,iblk), umass (:,:,iblk), & umassdti (:,:,iblk), fcor_blk (:,:,iblk), & umask (:,:,iblk), & uocnU (:,:,iblk), vocnU (:,:,iblk), & - strairx (:,:,iblk), strairy (:,:,iblk), & + strairxU (:,:,iblk), strairyU (:,:,iblk), & ss_tltxU (:,:,iblk), ss_tltyU (:,:,iblk), & icetmask (:,:,iblk), iceumask (:,:,iblk), & - fm (:,:,iblk), dt, & - strtltx (:,:,iblk), strtlty (:,:,iblk), & - strocnx (:,:,iblk), strocny (:,:,iblk), & - strintx (:,:,iblk), strinty (:,:,iblk), & - taubx (:,:,iblk), tauby (:,:,iblk), & - waterx (:,:,iblk), watery (:,:,iblk), & - forcex (:,:,iblk), forcey (:,:,iblk), & + fmU (:,:,iblk), dt, & + strtltxU (:,:,iblk), strtltyU (:,:,iblk), & + strocnxU (:,:,iblk), strocnyU (:,:,iblk), & + strintxU (:,:,iblk), strintyU (:,:,iblk), & + taubxU (:,:,iblk), taubyU (:,:,iblk), & + waterxU (:,:,iblk), wateryU (:,:,iblk), & + forcexU (:,:,iblk), forceyU (:,:,iblk), & stressp_1 (:,:,iblk), stressp_2 (:,:,iblk), & stressp_3 (:,:,iblk), stressp_4 (:,:,iblk), & stressm_1 (:,:,iblk), stressm_2 (:,:,iblk), & @@ -372,13 +372,13 @@ subroutine implicit_solver (dt) stress12_3(:,:,iblk), stress12_4(:,:,iblk), & uvel_init (:,:,iblk), vvel_init (:,:,iblk), & uvel (:,:,iblk), vvel (:,:,iblk), & - Tbu (:,:,iblk)) + TbU (:,:,iblk)) call calc_bfix (nx_block , ny_block , & icellu(iblk) , & indxui (:,iblk), indxuj (:,iblk), & umassdti (:,:,iblk), & - forcex (:,:,iblk), forcey (:,:,iblk), & + forcexU (:,:,iblk), forceyU (:,:,iblk), & uvel_init (:,:,iblk), vvel_init (:,:,iblk), & bxfix (:,:,iblk), byfix (:,:,iblk)) @@ -427,7 +427,7 @@ subroutine implicit_solver (dt) endif !----------------------------------------------------------------- - ! seabed stress factor Tbu (Tbu is part of Cb coefficient) + ! seabed stress factor TbU (TbU is part of Cb coefficient) !----------------------------------------------------------------- if (seabed_stress) then if ( seabed_stress_method == 'LKD' ) then @@ -437,7 +437,7 @@ subroutine implicit_solver (dt) icellu (iblk), & indxui(:,iblk), indxuj(:,iblk), & vice(:,:,iblk), aice(:,:,iblk), & - hwater(:,:,iblk), Tbu(:,:,iblk)) + hwater(:,:,iblk), TbU(:,:,iblk)) enddo !$OMP END PARALLEL DO @@ -449,7 +449,7 @@ subroutine implicit_solver (dt) icellt(iblk), indxti(:,iblk), indxtj(:,iblk), & icellu(iblk), indxui(:,iblk), indxuj(:,iblk), & aicen(:,:,:,iblk), vicen(:,:,:,iblk), & - hwater(:,:,iblk), Tbu(:,:,iblk)) + hwater(:,:,iblk), TbU(:,:,iblk)) enddo !$OMP END PARALLEL DO @@ -472,17 +472,17 @@ subroutine implicit_solver (dt) !----------------------------------------------------------------- ! Start of nonlinear iteration !----------------------------------------------------------------- - call anderson_solver (icellt , icellu, & - indxti , indxtj, & - indxui , indxuj, & - aiu , ntot , & - uocnU , vocnU , & - waterx , watery, & - bxfix , byfix , & - umassdti, sol , & - fpresx , fpresy, & - zetax2 , etax2 , & - rep_prs , & + call anderson_solver (icellt , icellu , & + indxti , indxtj , & + indxui , indxuj , & + aiU , ntot , & + uocnU , vocnU , & + waterxU , wateryU, & + bxfix , byfix , & + umassdti, sol , & + fpresx , fpresy , & + zetax2 , etax2 , & + rep_prs , & Cb, halo_info_mask) !----------------------------------------------------------------- ! End of nonlinear iteration @@ -544,7 +544,7 @@ subroutine implicit_solver (dt) indxui (:,iblk), indxuj (:,iblk), & uvel (:,:,iblk), vvel (:,:,iblk), & Cb (:,:,iblk), & - taubx (:,:,iblk), tauby (:,:,iblk)) + taubxU (:,:,iblk), taubyU (:,:,iblk)) enddo !$OMP END PARALLEL DO endif @@ -630,17 +630,17 @@ subroutine implicit_solver (dt) indxui (:,iblk), indxuj (:,iblk), & uvel (:,:,iblk), vvel (:,:,iblk), & uocnU (:,:,iblk), vocnU (:,:,iblk), & - aiu (:,:,iblk), fm (:,:,iblk), & -! strintx (:,:,iblk), strinty (:,:,iblk), & -! strairx (:,:,iblk), strairy (:,:,iblk), & - strocnx (:,:,iblk), strocny (:,:,iblk)) + aiU (:,:,iblk), fmU (:,:,iblk), & +! strintxU(:,:,iblk), strintyU(:,:,iblk), & +! strairxU(:,:,iblk), strairyU(:,:,iblk), & + strocnxU(:,:,iblk), strocnyU(:,:,iblk)) enddo !$OMP END PARALLEL DO - ! strocn computed on U, N, E as needed. Map strocn U divided by aiu to T + ! strocn computed on U, N, E as needed. Map strocn U divided by aiU to T ! TODO: This should be done elsewhere as part of generalization? - ! conservation requires aiu be divided before averaging + ! conservation requires aiU be divided before averaging work1 = c0 work2 = c0 !$OMP PARALLEL DO PRIVATE(iblk,ij,i,j) @@ -648,8 +648,8 @@ subroutine implicit_solver (dt) do ij = 1, icellu(iblk) i = indxui(ij,iblk) j = indxuj(ij,iblk) - work1(i,j,iblk) = strocnx(i,j,iblk)/aiu(i,j,iblk) - work2(i,j,iblk) = strocny(i,j,iblk)/aiu(i,j,iblk) + work1(i,j,iblk) = strocnxU(i,j,iblk)/aiU(i,j,iblk) + work2(i,j,iblk) = strocnyU(i,j,iblk)/aiU(i,j,iblk) enddo enddo call ice_HaloUpdate (work1, halo_info, & @@ -683,17 +683,17 @@ end subroutine implicit_solver ! H. F. Walker, “Anderson Acceleration: Algorithms and Implementations” ! [Online]. Available: https://users.wpi.edu/~walker/Papers/anderson_accn_algs_imps.pdf - subroutine anderson_solver (icellt , icellu, & - indxti , indxtj, & - indxui , indxuj, & - aiu , ntot , & - uocn , vocn , & - waterx , watery, & - bxfix , byfix , & - umassdti, sol , & - fpresx , fpresy, & - zetax2 , etax2 , & - rep_prs , & + subroutine anderson_solver (icellt , icellu , & + indxti , indxtj , & + indxui , indxuj , & + aiU , ntot , & + uocn , vocn , & + waterxU , wateryU, & + bxfix , byfix , & + umassdti, sol , & + fpresx , fpresy , & + zetax2 , etax2 , & + rep_prs , & Cb, halo_info_mask) use ice_arrays_column, only: Cdn_ocn @@ -702,7 +702,7 @@ subroutine anderson_solver (icellt , icellu, & use ice_constants, only: c1 use ice_domain, only: maskhalo_dyn, halo_info use ice_domain_size, only: max_blocks - use ice_flux, only: fm, Tbu + use ice_flux, only: fmU, TbU use ice_grid, only: dxT, dyT, dxhy, dyhx, cxp, cyp, cxm, cym, & uarear use ice_dyn_shared, only: DminTarea @@ -723,11 +723,11 @@ subroutine anderson_solver (icellt , icellu, & indxuj ! compressed index in j-direction real (kind=dbl_kind), dimension (nx_block,ny_block,max_blocks), intent(in) :: & - aiu , & ! ice fraction on u-grid + aiU , & ! ice fraction on u-grid uocn , & ! i ocean current (m/s) vocn , & ! j ocean current (m/s) - waterx , & ! for ocean stress calculation, x (m/s) - watery , & ! for ocean stress calculation, y (m/s) + waterxU , & ! for ocean stress calculation, x (m/s) + wateryU , & ! for ocean stress calculation, y (m/s) bxfix , & ! part of bx that is constant during Picard byfix , & ! part of by that is constant during Picard umassdti ! mass of U-cell/dte (kg/m^2 s) @@ -862,7 +862,7 @@ subroutine anderson_solver (icellt , icellu, & call calc_vrel_Cb (nx_block , ny_block , & icellu (iblk), Cdn_ocn (:,:,iblk), & indxui (:,iblk), indxuj (:,iblk), & - aiu (:,:,iblk), Tbu (:,:,iblk), & + aiU (:,:,iblk), TbU (:,:,iblk), & uocn (:,:,iblk), vocn (:,:,iblk), & ulin (:,:,iblk), vlin (:,:,iblk), & vrel (:,:,iblk), Cb (:,:,iblk)) @@ -872,7 +872,7 @@ subroutine anderson_solver (icellt , icellu, & icellu (iblk), & indxui (:,iblk), indxuj (:,iblk), & stress_Pr (:,:,:), uarear (:,:,iblk), & - waterx (:,:,iblk), watery (:,:,iblk), & + waterxU (:,:,iblk), wateryU (:,:,iblk), & bxfix (:,:,iblk), byfix (:,:,iblk), & bx (:,:,iblk), by (:,:,iblk), & vrel (:,:,iblk)) @@ -889,7 +889,7 @@ subroutine anderson_solver (icellt , icellu, & uprev_k (:,:,iblk) , vprev_k (:,:,iblk), & vrel (:,:,iblk) , Cb (:,:,iblk), & zetax2 (:,:,iblk,:), etax2 (:,:,iblk,:), & - umassdti (:,:,iblk) , fm (:,:,iblk), & + umassdti (:,:,iblk) , fmU (:,:,iblk), & uarear (:,:,iblk) , & Au (:,:,iblk) , Av (:,:,iblk)) call residual_vec (nx_block , ny_block , & @@ -1457,7 +1457,7 @@ end subroutine stress_vp subroutine calc_vrel_Cb (nx_block, ny_block, & icellu , Cw , & indxui , indxuj , & - aiu , Tbu , & + aiU , TbU , & uocn , vocn , & uvel , vvel , & vrel , Cb) @@ -1473,8 +1473,8 @@ subroutine calc_vrel_Cb (nx_block, ny_block, & indxuj ! compressed index in j-direction real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & - Tbu, & ! seabed stress factor (N/m^2) - aiu , & ! ice fraction on u-grid + TbU, & ! seabed stress factor (N/m^2) + aiU , & ! ice fraction on u-grid uocn , & ! ocean current, x-direction (m/s) vocn , & ! ocean current, y-direction (m/s) Cw ! ocean-ice neutral drag coefficient @@ -1507,10 +1507,10 @@ subroutine calc_vrel_Cb (nx_block, ny_block, & j = indxuj(ij) ! (magnitude of relative ocean current)*rhow*drag*aice - vrel(i,j) = aiu(i,j)*rhow*Cw(i,j)*sqrt((uocn(i,j) - uvel(i,j))**2 + & + vrel(i,j) = aiU(i,j)*rhow*Cw(i,j)*sqrt((uocn(i,j) - uvel(i,j))**2 + & (vocn(i,j) - vvel(i,j))**2) ! m/s - Cb(i,j) = Tbu(i,j) / (sqrt(uvel(i,j)**2 + vvel(i,j)**2) + u0) ! for seabed stress + Cb(i,j) = TbU(i,j) / (sqrt(uvel(i,j)**2 + vvel(i,j)**2) + u0) ! for seabed stress enddo ! ij end subroutine calc_vrel_Cb @@ -1524,7 +1524,7 @@ subroutine calc_seabed_stress (nx_block, ny_block, & indxui , indxuj , & uvel , vvel , & Cb , & - taubx , tauby) + taubxU , taubyU) integer (kind=int_kind), intent(in) :: & nx_block, ny_block, & ! block dimensions @@ -1540,8 +1540,8 @@ subroutine calc_seabed_stress (nx_block, ny_block, & Cb ! seabed stress coefficient real (kind=dbl_kind), dimension (nx_block,ny_block), intent(out) :: & - taubx , & ! seabed stress, x-direction (N/m^2) - tauby ! seabed stress, y-direction (N/m^2) + taubxU , & ! seabed stress, x-direction (N/m^2) + taubyU ! seabed stress, y-direction (N/m^2) ! local variables @@ -1554,8 +1554,8 @@ subroutine calc_seabed_stress (nx_block, ny_block, & i = indxui(ij) j = indxuj(ij) - taubx(i,j) = -uvel(i,j)*Cb(i,j) - tauby(i,j) = -vvel(i,j)*Cb(i,j) + taubxU(i,j) = -uvel(i,j)*Cb(i,j) + taubyU(i,j) = -vvel(i,j)*Cb(i,j) enddo ! ij end subroutine calc_seabed_stress @@ -1577,7 +1577,7 @@ subroutine matvec (nx_block, ny_block, & uvel , vvel , & vrel , Cb , & zetax2 , etax2 , & - umassdti, fm , & + umassdti, fmU , & uarear , & Au , Av) @@ -1610,7 +1610,7 @@ subroutine matvec (nx_block, ny_block, & vrel , & ! coefficient for tauw Cb , & ! coefficient for seabed stress umassdti, & ! mass of U-cell/dt (kg/m^2 s) - fm , & ! Coriolis param. * mass in U-cell (kg/s) + fmU , & ! Coriolis param. * mass in U-cell (kg/s) uarear ! 1/uarea real (kind=dbl_kind), dimension(nx_block,ny_block,4), intent(in) :: & @@ -1816,7 +1816,7 @@ subroutine matvec (nx_block, ny_block, & ccaimp = umassdti(i,j) + vrel(i,j) * cosw + Cb(i,j) ! kg/m^2 s - ccb = fm(i,j) + sign(c1,fm(i,j)) * vrel(i,j) * sinw ! kg/m^2 s + ccb = fmU(i,j) + sign(c1,fmU(i,j)) * vrel(i,j) * sinw ! kg/m^2 s ! divergence of the internal stress tensor strintx = uarear(i,j)* & @@ -1839,7 +1839,7 @@ subroutine calc_bfix (nx_block , ny_block , & icellu , & indxui , indxuj , & umassdti , & - forcex , forcey , & + forcexU , forceyU , & uvel_init, vvel_init, & bxfix , byfix) @@ -1855,8 +1855,8 @@ subroutine calc_bfix (nx_block , ny_block , & 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 + forcexU , & ! work array: combined atm stress and ocn tilt, x + forceyU ! work array: combined atm stress and ocn tilt, y real (kind=dbl_kind), dimension (nx_block,ny_block), intent(out) :: & bxfix , & ! bx = taux + bxfix @@ -1873,8 +1873,8 @@ subroutine calc_bfix (nx_block , ny_block , & i = indxui(ij) j = indxuj(ij) - bxfix(i,j) = umassdti(i,j)*uvel_init(i,j) + forcex(i,j) - byfix(i,j) = umassdti(i,j)*vvel_init(i,j) + forcey(i,j) + bxfix(i,j) = umassdti(i,j)*uvel_init(i,j) + forcexU(i,j) + byfix(i,j) = umassdti(i,j)*vvel_init(i,j) + forceyU(i,j) enddo end subroutine calc_bfix @@ -1889,7 +1889,7 @@ subroutine calc_bvec (nx_block, ny_block, & icellu , & indxui , indxuj , & stPr , uarear , & - waterx , watery , & + waterxU , wateryU , & bxfix , byfix , & bx , by , & vrel) @@ -1904,8 +1904,8 @@ subroutine calc_bvec (nx_block, ny_block, & real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: & uarear , & ! 1/uarea - waterx , & ! for ocean stress calculation, x (m/s) - watery , & ! for ocean stress calculation, y (m/s) + waterxU , & ! for ocean stress calculation, x (m/s) + wateryU , & ! for ocean stress calculation, y (m/s) bxfix , & ! bx = taux + bxfix byfix , & ! by = tauy + byfix vrel ! relative ice-ocean velocity @@ -1943,8 +1943,8 @@ subroutine calc_bvec (nx_block, ny_block, & j = indxuj(ij) ! ice/ocean stress - taux = vrel(i,j)*waterx(i,j) ! NOTE this is not the entire - tauy = vrel(i,j)*watery(i,j) ! ocn stress term + taux = vrel(i,j)*waterxU(i,j) ! NOTE this is not the entire + tauy = vrel(i,j)*wateryU(i,j) ! ocn stress term ! divergence of the internal stress tensor (only Pr part, i.e. dPr/dx, dPr/dy) strintx = uarear(i,j)* & @@ -2831,7 +2831,7 @@ subroutine fgmres (zetax2 , etax2 , & solx (:,:,iblk) , soly (:,:,iblk), & vrel (:,:,iblk) , Cb (:,:,iblk), & zetax2 (:,:,iblk,:), etax2 (:,:,iblk,:), & - umassdti (:,:,iblk) , fm (:,:,iblk), & + umassdti (:,:,iblk) , fmU (:,:,iblk), & uarear (:,:,iblk) , & workspace_x(:,:,iblk) , workspace_y(:,:,iblk)) call residual_vec (nx_block , ny_block , & @@ -2938,7 +2938,7 @@ subroutine fgmres (zetax2 , etax2 , & workspace_x(:,:,iblk) , workspace_y(:,:,iblk), & vrel (:,:,iblk) , Cb (:,:,iblk), & zetax2 (:,:,iblk,:), etax2 (:,:,iblk,:), & - umassdti (:,:,iblk) , fm (:,:,iblk), & + umassdti (:,:,iblk) , fmU (:,:,iblk), & uarear (:,:,iblk) , & arnoldi_basis_x(:,:,iblk,nextit), & arnoldi_basis_y(:,:,iblk,nextit)) @@ -3224,7 +3224,7 @@ subroutine pgmres (zetax2 , etax2 , & solx (:,:,iblk) , soly (:,:,iblk), & vrel (:,:,iblk) , Cb (:,:,iblk), & zetax2 (:,:,iblk,:), etax2 (:,:,iblk,:), & - umassdti (:,:,iblk) , fm (:,:,iblk), & + umassdti (:,:,iblk) , fmU (:,:,iblk), & uarear (:,:,iblk) , & workspace_x(:,:,iblk) , workspace_y(:,:,iblk)) call residual_vec (nx_block , ny_block , & @@ -3320,7 +3320,7 @@ subroutine pgmres (zetax2 , etax2 , & workspace_x(:,:,iblk) , workspace_y(:,:,iblk), & vrel (:,:,iblk) , Cb (:,:,iblk), & zetax2 (:,:,iblk,:), etax2 (:,:,iblk,:), & - umassdti (:,:,iblk) , fm (:,:,iblk), & + umassdti (:,:,iblk) , fmU (:,:,iblk), & uarear (:,:,iblk) , & arnoldi_basis_x(:,:,iblk,nextit), & arnoldi_basis_y(:,:,iblk,nextit)) diff --git a/cicecore/cicedynB/general/ice_flux.F90 b/cicecore/cicedynB/general/ice_flux.F90 index 18727b63e..845491d2a 100644 --- a/cicecore/cicedynB/general/ice_flux.F90 +++ b/cicecore/cicedynB/general/ice_flux.F90 @@ -65,16 +65,16 @@ module ice_flux sig1 , & ! normalized principal stress component sig2 , & ! normalized principal stress component sigP , & ! internal ice pressure (N/m) - taubx , & ! seabed stress (x) (N/m^2) - tauby , & ! seabed stress (y) (N/m^2) - strairx , & ! stress on ice by air, x-direction at U points - strairy , & ! stress on ice by air, y-direction at U points - strocnx , & ! ice-ocean stress, x-direction at U points, computed in dyn_finish - strocny , & ! ice-ocean stress, y-direction at U points, computed in dyn_finish - strtltx , & ! stress due to sea surface slope, x-direction - strtlty , & ! stress due to sea surface slope, y-direction - strintx , & ! divergence of internal ice stress, x (N/m^2) - strinty , & ! divergence of internal ice stress, y (N/m^2) + taubxU , & ! seabed stress (x) (N/m^2) + taubyU , & ! seabed stress (y) (N/m^2) + strairxU, & ! stress on ice by air, x-direction at U points + strairyU, & ! stress on ice by air, y-direction at U points + strocnxU, & ! ice-ocean stress, x-direction at U points, computed in dyn_finish + strocnyU, & ! ice-ocean stress, y-direction at U points, computed in dyn_finish + strtltxU, & ! stress due to sea surface slope, x-direction + strtltyU, & ! stress due to sea surface slope, y-direction + strintxU, & ! divergence of internal ice stress, x (N/m^2) + strintyU, & ! divergence of internal ice stress, y (N/m^2) taubxN , & ! seabed stress (x) at N points (N/m^2) taubyN , & ! seabed stress (y) at N points (N/m^2) strairxN, & ! stress on ice by air, x-direction at N points @@ -129,23 +129,11 @@ module ice_flux stresspT, stressmT, stress12T, & ! sigma11+sigma22, sigma11-sigma22, sigma12 stresspU, stressmU, stress12U ! " - logical (kind=log_kind), & - dimension (:,:,:), allocatable, public :: & - iceumask ! ice extent mask (U-cell) - - logical (kind=log_kind), & - dimension (:,:,:), allocatable, public :: & - icenmask ! ice extent mask (N-cell) - - logical (kind=log_kind), & - dimension (:,:,:), allocatable, public :: & - iceemask ! ice extent mask (E-cell) - ! internal real (kind=dbl_kind), dimension (:,:,:), allocatable, public :: & - fm , & ! Coriolis param. * mass in U-cell (kg/s) - Tbu , & ! factor for seabed stress (N/m^2) + fmU , & ! Coriolis param. * mass in U-cell (kg/s) + TbU , & ! factor for seabed stress (N/m^2) fmE , & ! Coriolis param. * mass in E-cell (kg/s) TbE , & ! factor for seabed stress (N/m^2) fmN , & ! Coriolis param. * mass in N-cell (kg/s) @@ -406,16 +394,16 @@ subroutine alloc_flux sig1 (nx_block,ny_block,max_blocks), & ! normalized principal stress component sig2 (nx_block,ny_block,max_blocks), & ! normalized principal stress component sigP (nx_block,ny_block,max_blocks), & ! internal ice pressure (N/m) - taubx (nx_block,ny_block,max_blocks), & ! seabed stress (x) (N/m^2) - tauby (nx_block,ny_block,max_blocks), & ! seabed stress (y) (N/m^2) - strairx (nx_block,ny_block,max_blocks), & ! stress on ice by air, x-direction - strairy (nx_block,ny_block,max_blocks), & ! stress on ice by air, y-direction - strocnx (nx_block,ny_block,max_blocks), & ! ice-ocean stress, x-direction - strocny (nx_block,ny_block,max_blocks), & ! ice-ocean stress, y-direction - strtltx (nx_block,ny_block,max_blocks), & ! stress due to sea surface slope, x-direction - strtlty (nx_block,ny_block,max_blocks), & ! stress due to sea surface slope, y-direction - strintx (nx_block,ny_block,max_blocks), & ! divergence of internal ice stress, x (N/m^2) - strinty (nx_block,ny_block,max_blocks), & ! divergence of internal ice stress, y (N/m^2) + taubxU (nx_block,ny_block,max_blocks), & ! seabed stress (x) (N/m^2) + taubyU (nx_block,ny_block,max_blocks), & ! seabed stress (y) (N/m^2) + strairxU (nx_block,ny_block,max_blocks), & ! stress on ice by air, x-direction + strairyU (nx_block,ny_block,max_blocks), & ! stress on ice by air, y-direction + strocnxU (nx_block,ny_block,max_blocks), & ! ice-ocean stress, x-direction + strocnyU (nx_block,ny_block,max_blocks), & ! ice-ocean stress, y-direction + strtltxU (nx_block,ny_block,max_blocks), & ! stress due to sea surface slope, x-direction + strtltyU (nx_block,ny_block,max_blocks), & ! stress due to sea surface slope, y-direction + strintxU (nx_block,ny_block,max_blocks), & ! divergence of internal ice stress, x (N/m^2) + strintyU (nx_block,ny_block,max_blocks), & ! divergence of internal ice stress, y (N/m^2) daidtd (nx_block,ny_block,max_blocks), & ! ice area tendency due to transport (1/s) dvidtd (nx_block,ny_block,max_blocks), & ! ice volume tendency due to transport (m/s) dagedtd (nx_block,ny_block,max_blocks), & ! ice age tendency due to transport (s/s) @@ -435,9 +423,8 @@ subroutine alloc_flux stress12_2 (nx_block,ny_block,max_blocks), & ! sigma12 stress12_3 (nx_block,ny_block,max_blocks), & ! sigma12 stress12_4 (nx_block,ny_block,max_blocks), & ! sigma12 - iceumask (nx_block,ny_block,max_blocks), & ! ice extent mask (U-cell) - fm (nx_block,ny_block,max_blocks), & ! Coriolis param. * mass in U-cell (kg/s) - Tbu (nx_block,ny_block,max_blocks), & ! factor for seabed stress (landfast ice) + fmU (nx_block,ny_block,max_blocks), & ! Coriolis param. * mass in U-cell (kg/s) + TbU (nx_block,ny_block,max_blocks), & ! factor for seabed stress (landfast ice) zlvl (nx_block,ny_block,max_blocks), & ! atm level height (momentum) (m) zlvs (nx_block,ny_block,max_blocks), & ! atm level height (scalar quantities) (m) uatm (nx_block,ny_block,max_blocks), & ! wind velocity components (m/s) @@ -592,7 +579,6 @@ subroutine alloc_flux strtltyN (nx_block,ny_block,max_blocks), & ! stress due to sea surface slope, y-direction at N points strintxN (nx_block,ny_block,max_blocks), & ! divergence of internal ice stress, x at N points (N/m^2) strintyN (nx_block,ny_block,max_blocks), & ! divergence of internal ice stress, y at N points (N/m^2) - icenmask (nx_block,ny_block,max_blocks), & ! ice extent mask (N-cell) fmN (nx_block,ny_block,max_blocks), & ! Coriolis param. * mass in N-cell (kg/s) TbN (nx_block,ny_block,max_blocks), & ! factor for seabed stress (landfast ice) taubxE (nx_block,ny_block,max_blocks), & ! seabed stress (x) at E points (N/m^2) @@ -605,7 +591,6 @@ subroutine alloc_flux strtltyE (nx_block,ny_block,max_blocks), & ! stress due to sea surface slope, y-direction at E points strintxE (nx_block,ny_block,max_blocks), & ! divergence of internal ice stress, x at E points (N/m^2) strintyE (nx_block,ny_block,max_blocks), & ! divergence of internal ice stress, y at E points (N/m^2) - iceemask (nx_block,ny_block,max_blocks), & ! ice extent mask (E-cell) fmE (nx_block,ny_block,max_blocks), & ! Coriolis param. * mass in E-cell (kg/s) TbE (nx_block,ny_block,max_blocks), & ! factor for seabed stress (landfast ice) stresspT (nx_block,ny_block,max_blocks), & ! sigma11+sigma22 @@ -1041,17 +1026,17 @@ subroutine init_history_dyn sig1 (:,:,:) = c0 sig2 (:,:,:) = c0 - taubx (:,:,:) = c0 - tauby (:,:,:) = c0 + taubxU (:,:,:) = c0 + taubyU (:,:,:) = c0 strength (:,:,:) = c0 - strocnx (:,:,:) = c0 - strocny (:,:,:) = c0 - strairx (:,:,:) = c0 - strairy (:,:,:) = c0 - strtltx (:,:,:) = c0 - strtlty (:,:,:) = c0 - strintx (:,:,:) = c0 - strinty (:,:,:) = c0 + strocnxU(:,:,:) = c0 + strocnyU(:,:,:) = c0 + strairxU(:,:,:) = c0 + strairyU(:,:,:) = c0 + strtltxU(:,:,:) = c0 + strtltyU(:,:,:) = c0 + strintxU(:,:,:) = c0 + strintyU(:,:,:) = c0 dardg1dt(:,:,:) = c0 dardg2dt(:,:,:) = c0 dvirdgdt(:,:,:) = c0 @@ -1060,7 +1045,7 @@ subroutine init_history_dyn dvidtd (:,:,:) = vice(:,:,:) ! temporary initial volume if (tr_iage) & dagedtd (:,:,:) = trcr(:,:,nt_iage,:) ! temporary initial age - fm (:,:,:) = c0 + fmU (:,:,:) = c0 ardgn (:,:,:,:) = c0 vrdgn (:,:,:,:) = c0 krdgn (:,:,:,:) = c1 diff --git a/cicecore/cicedynB/general/ice_init.F90 b/cicecore/cicedynB/general/ice_init.F90 index 9b6bf673c..744b6bfe5 100644 --- a/cicecore/cicedynB/general/ice_init.F90 +++ b/cicecore/cicedynB/general/ice_init.F90 @@ -14,7 +14,8 @@ module ice_init use ice_kinds_mod use ice_communicate, only: my_task, master_task, ice_barrier - use ice_constants, only: c0, c1, c2, c3, c5, p2, p3, p5, p75, p166 + use ice_constants, only: c0, c1, c2, c3, c5, c12, p2, p3, p5, p75, p166, & + cm_to_m use ice_exit, only: abort_ice use ice_fileunits, only: nu_nml, nu_diag, nu_diag_set, nml_filename, diag_type, & ice_stdout, get_fileunit, release_fileunit, bfbflag, flush_fileunit, & @@ -2833,6 +2834,13 @@ subroutine set_state_var (nx_block, ny_block, & edge_init_nh = 70._dbl_kind, & ! initial ice edge, N.Hem. (deg) edge_init_sh = -60._dbl_kind ! initial ice edge, S.Hem. (deg) + real (kind=dbl_kind) :: & ! boxslotcyl + pi , & ! pi + secday , & ! seconds per day + max_vel , & ! max velocity + domain_length , & ! physical domain length + period ! rotational period + logical (kind=log_kind) :: tr_brine, tr_lvl, tr_snow integer (kind=int_kind) :: ntrcr integer (kind=int_kind) :: nt_Tsfc, nt_qice, nt_qsno, nt_sice @@ -2853,6 +2861,7 @@ subroutine set_state_var (nx_block, ny_block, & nt_rhos_out=nt_rhos, nt_rsnw_out=nt_rsnw) call icepack_query_parameters(rhos_out=rhos, Lfresh_out=Lfresh, puny_out=puny, & rad_to_deg_out=rad_to_deg, rsnw_fall_out=rsnw_fall) + call icepack_query_parameters(secday_out=secday, pi_out=pi) call icepack_warnings_flush(nu_diag) if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & file=__FILE__, line=__LINE__) @@ -3195,12 +3204,16 @@ subroutine set_state_var (nx_block, ny_block, & !--------------------------------------------------------- if (trim(ice_data_type) == 'boxslotcyl') then + domain_length = dxrect*cm_to_m*nx_global + period = c12*secday ! 12 days rotational period + max_vel = pi*domain_length/period do j = 1, ny_block do i = 1, nx_block - call boxslotcyl_data_vel(i, j, & - nx_block, ny_block, & - iglob, jglob, & - uvel, vvel) + + uvel(i,j) = c2*max_vel*(real(jglob(j), kind=dbl_kind) - p5) & + / real(ny_global - 1, kind=dbl_kind) - max_vel + vvel(i,j) = -c2*max_vel*(real(iglob(i), kind=dbl_kind) - p5) & + / real(nx_global - 1, kind=dbl_kind) + max_vel enddo ! j enddo ! i else @@ -3216,56 +3229,6 @@ subroutine set_state_var (nx_block, ny_block, & end subroutine set_state_var -!======================================================================= - -! Set ice velocity for slotted cylinder advection test -! -! author: Philippe Blain (ECCC) - - subroutine boxslotcyl_data_vel(i, j, & - nx_block, ny_block, & - iglob, jglob, & - uvel, vvel) - - use ice_constants, only: c2, c12, p5, cm_to_m - use ice_domain_size, only: nx_global, ny_global - use ice_grid, only: dxrect - - integer (kind=int_kind), intent(in) :: & - i, j, & ! local indices - nx_block, ny_block, & ! block dimensions - iglob(nx_block), & ! global indices - jglob(ny_block) - - real (kind=dbl_kind), dimension (nx_block,ny_block), intent(out) :: & - uvel, vvel ! ice velocity - - ! local variables - real (kind=dbl_kind) :: & - pi , & ! pi - secday , & ! seconds per day - max_vel , & ! max velocity - domain_length , & ! physical domain length - period ! rotational period - - character(len=*), parameter :: subname = '(boxslotcyl_data_vel)' - - call icepack_query_parameters(secday_out=secday, pi_out=pi) - call icepack_warnings_flush(nu_diag) - if (icepack_warnings_aborted()) call abort_ice(error_message=subname, & - file=__FILE__, line=__LINE__) - - domain_length = dxrect*cm_to_m*nx_global - period = c12*secday ! 12 days rotational period - max_vel = pi*domain_length/period - - uvel(i,j) = c2*max_vel*(real(jglob(j), kind=dbl_kind) - p5) & - / real(ny_global - 1, kind=dbl_kind) - max_vel - vvel(i,j) = -c2*max_vel*(real(iglob(i), kind=dbl_kind) - p5) & - / real(nx_global - 1, kind=dbl_kind) + max_vel - - end subroutine boxslotcyl_data_vel - !======================================================================= end module ice_init diff --git a/cicecore/cicedynB/infrastructure/ice_grid.F90 b/cicecore/cicedynB/infrastructure/ice_grid.F90 index f7b854b4f..0ea779399 100644 --- a/cicecore/cicedynB/infrastructure/ice_grid.F90 +++ b/cicecore/cicedynB/infrastructure/ice_grid.F90 @@ -173,8 +173,7 @@ module ice_grid use_bathymetry, & ! flag for reading in bathymetry_file pgl_global_ext ! flag for init primary grid lengths (global ext.) - logical (kind=log_kind), & - dimension (:,:,:), allocatable, public :: & + logical (kind=log_kind), dimension (:,:,:), allocatable, public :: & tmask , & ! land/boundary mask, thickness (T-cell) umask , & ! land/boundary mask (U-cell) (1 if all surrounding T cells are ocean) umaskCD, & ! land/boundary mask (U-cell) (1 if at least two surrounding T cells are ocean) @@ -183,6 +182,11 @@ module ice_grid lmask_n, & ! northern hemisphere mask lmask_s ! southern hemisphere mask + logical (kind=log_kind), dimension (:,:,:), allocatable, public :: & + iceumask, & ! ice extent mask (U-cell) + icenmask, & ! ice extent mask (N-cell) + iceemask ! ice extent mask (E-cell) + real (kind=dbl_kind), dimension (:,:,:), allocatable, public :: & rndex_global ! global index for local subdomain (dbl) @@ -263,6 +267,7 @@ subroutine alloc_grid umaskCD (nx_block,ny_block,max_blocks), & ! land/boundary mask, velocity (U-cell) nmask (nx_block,ny_block,max_blocks), & ! land/boundary mask (N-cell) emask (nx_block,ny_block,max_blocks), & ! land/boundary mask (E-cell) + iceumask (nx_block,ny_block,max_blocks), & ! u mask for dynamics lmask_n (nx_block,ny_block,max_blocks), & ! northern hemisphere mask lmask_s (nx_block,ny_block,max_blocks), & ! southern hemisphere mask rndex_global(nx_block,ny_block,max_blocks), & ! global index for local subdomain (dbl) @@ -283,6 +288,8 @@ subroutine alloc_grid if (grid_ice == 'CD' .or. grid_ice == 'C') then allocate( & + iceemask (nx_block,ny_block,max_blocks), & ! e mask for dynamics + icenmask (nx_block,ny_block,max_blocks), & ! n mask for dynamics ratiodxN (nx_block,ny_block,max_blocks), & ratiodyE (nx_block,ny_block,max_blocks), & ratiodxNr(nx_block,ny_block,max_blocks), & diff --git a/cicecore/cicedynB/infrastructure/ice_restart_driver.F90 b/cicecore/cicedynB/infrastructure/ice_restart_driver.F90 index 2e236b62a..70e70621a 100644 --- a/cicecore/cicedynB/infrastructure/ice_restart_driver.F90 +++ b/cicecore/cicedynB/infrastructure/ice_restart_driver.F90 @@ -56,14 +56,14 @@ subroutine dumpfile(filename_spec) use ice_domain, only: nblocks use ice_domain_size, only: nilyr, nslyr, ncat, max_blocks use ice_flux, only: scale_factor, swvdr, swvdf, swidr, swidf, & - strocnxT, strocnyT, sst, frzmlt, iceumask, iceemask, icenmask, & + strocnxT, strocnyT, sst, frzmlt, & stressp_1, stressp_2, stressp_3, stressp_4, & stressm_1, stressm_2, stressm_3, stressm_4, & stress12_1, stress12_2, stress12_3, stress12_4, & stresspT, stressmT, stress12T, & stresspU, stressmU, stress12U use ice_flux, only: coszen - use ice_grid, only: grid_ice, tmask + use ice_grid, only: grid_ice, tmask, iceumask, iceemask, icenmask use ice_state, only: aicen, vicen, vsnon, trcrn, uvel, vvel, & uvelE, vvelE, uvelN, vvelN @@ -277,14 +277,15 @@ subroutine restartfile (ice_ic) use ice_domain_size, only: nilyr, nslyr, ncat, & max_blocks use ice_flux, only: scale_factor, swvdr, swvdf, swidr, swidf, & - strocnxT, strocnyT, sst, frzmlt, iceumask, iceemask, icenmask, & + strocnxT, strocnyT, sst, frzmlt, & stressp_1, stressp_2, stressp_3, stressp_4, & stressm_1, stressm_2, stressm_3, stressm_4, & stress12_1, stress12_2, stress12_3, stress12_4, & stresspT, stressmT, stress12T, & stresspU, stressmU, stress12U use ice_flux, only: coszen - use ice_grid, only: tmask, grid_type, grid_ice + use ice_grid, only: tmask, grid_type, grid_ice, & + iceumask, iceemask, icenmask use ice_state, only: trcr_depend, aice, vice, vsno, trcr, & aice0, aicen, vicen, vsnon, trcrn, aice_init, uvel, vvel, & uvelE, vvelE, uvelN, vvelN, & @@ -707,12 +708,12 @@ subroutine restartfile_v4 (ice_ic) use ice_domain_size, only: nilyr, nslyr, ncat, nx_global, ny_global, & max_blocks use ice_flux, only: scale_factor, swvdr, swvdf, swidr, swidf, & - strocnxT, strocnyT, sst, frzmlt, iceumask, & + strocnxT, strocnyT, sst, frzmlt, & 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_gather_scatter, only: scatter_global_stress - use ice_grid, only: tmask + use ice_grid, only: tmask, iceumask use ice_read_write, only: ice_open, ice_read, ice_read_global use ice_state, only: trcr_depend, aice, vice, vsno, trcr, & aice0, aicen, vicen, vsnon, trcrn, aice_init, uvel, vvel, & diff --git a/doc/source/cice_index.rst b/doc/source/cice_index.rst index df8e4616b..a0e8df9ba 100644 --- a/doc/source/cice_index.rst +++ b/doc/source/cice_index.rst @@ -251,7 +251,7 @@ either Celsius or Kelvin units). "flux_bio_ai", "all biogeochemistry fluxes passed to ocean, grid cell mean", "" "flw", "incoming longwave radiation", "W/m\ :math:`^2`" "flwout", "outgoing longwave radiation", "W/m\ :math:`^2`" - "fm", "Coriolis parameter * mass in U cell", "kg/s" + "fmU", "Coriolis parameter * mass in U cell", "kg/s" "formdrag", "calculate form drag", "" "fpond", "fresh water flux to ponds", "kg/m\ :math:`^2`/s" "fr_resp", "bgc respiration fraction", "0.05" @@ -355,6 +355,8 @@ either Celsius or Kelvin units). "icells", "number of grid cells with specified property (for vectorization)", "" "iceruf", "ice surface roughness at atmosphere interface", "5.\ :math:`\times`\ 10\ :math:`^{-4}` m" "iceruf_ocn", "under-ice roughness (at ocean interface)", "0.03 m" + "iceemask", "ice extent mask (E-cell)", "" + "icenmask", "ice extent mask (N-cell)", "" "icetmask", "ice extent mask (T-cell)", "" "iceumask", "ice extent mask (U-cell)", "" "idate", "the date at the end of the current time step (yyyymmdd)", "" @@ -655,17 +657,17 @@ either Celsius or Kelvin units). "Sswabs", "shortwave radiation absorbed in snow layers", "W/m\ :math:`^2`" "stefan-boltzmann", "Stefan-Boltzmann constant", "5.67\ :math:`\times`\ 10\ :math:`^{-8}` W/m\ :math:`^2`\ K\ :math:`^4`" "stop_now", "if 1, end program execution", "" - "strairx(y)", "stress on ice by air in the x(y)-direction (centered in U cell)", "N/m\ :math:`^2`" + "strairx(y)U", "stress on ice by air in the x(y)-direction (centered in U cell)", "N/m\ :math:`^2`" "strairx(y)T", "stress on ice by air, x(y)-direction (centered in T cell)", "N/m\ :math:`^2`" "strax(y)", "wind stress components from data", "N/m\ :math:`^2`" "strength", "ice strength", "N/m" "stress12", "internal ice stress, :math:`\sigma_{12}`", "N/m" "stressm", "internal ice stress, :math:`\sigma_{11}-\sigma_{22}`", "N/m" "stressp", "internal ice stress, :math:`\sigma_{11}+\sigma_{22}`", "N/m" - "strintx(y)", "divergence of internal ice stress, x(y)", "N/m\ :math:`^2`" - "strocnx(y)", "ice–ocean stress in the x(y)-direction (U-cell)", "N/m\ :math:`^2`" + "strintx(y)U", "divergence of internal ice stress, x(y)", "N/m\ :math:`^2`" + "strocnx(y)U", "ice–ocean stress in the x(y)-direction (U-cell)", "N/m\ :math:`^2`" "strocnx(y)T", "ice–ocean stress, x(y)-dir. (T-cell)", "N/m\ :math:`^2`" - "strtltx(y)", "surface stress due to sea surface slope", "N/m\ :math:`^2`" + "strtltx(y)U", "surface stress due to sea surface slope", "N/m\ :math:`^2`" "swv(n)dr(f)", "incoming shortwave radiation, visible (near IR), direct (diffuse)", "W/m\ :math:`^2`" "**T**", "", "" "Tair", "air temperature at 10 m", "K"