Skip to content

Commit

Permalink
Update some CICE variable names to clarify grid (CICE-Consortium#729)
Browse files Browse the repository at this point in the history
* Rename several variables to make compatible with C-grid names,
  strairxU, strairyU, strtltxU, strtltyU, strintxU, strintyU,
  taubxU, taubyU, strocnxU, strocnyU, fmU, TbU,
  waterxU, wateryU, forcexU, forceyU, aiU
Move iceumask, icenmask, iceemask from ice_flux to ice_grid
Make dyn_prep2, stepu, stepuv_CD, stepv_C, implicit_solver, and
  anderson_soler argument names a little more generic/specific
Inline boxslotcyl velocity calculation

* remove boxslotcyl_data_vel

* update documentation

* Additional updates to change to upper case for some variable names
Fix indentations as noted
  • Loading branch information
apcraig authored and dabail10 committed Oct 4, 2022
1 parent 0a5f92d commit df3efd7
Show file tree
Hide file tree
Showing 11 changed files with 559 additions and 600 deletions.
36 changes: 18 additions & 18 deletions cicecore/cicedynB/analysis/ice_diagnostics.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
50 changes: 25 additions & 25 deletions cicecore/cicedynB/analysis/ice_history.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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, &
Expand Down Expand Up @@ -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') &
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit df3efd7

Please sign in to comment.