Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New fig for Bgrid + minor modifs to comments and doc #616

Merged
merged 1 commit into from
Jul 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions cicecore/cicedynB/dynamics/ice_dyn_eap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1206,12 +1206,12 @@ subroutine stress_eap (nx_block, ny_block, &
vvel , & ! y-component of velocity (m/s)
dxt , & ! width of T-cell through the middle (m)
dyt , & ! height of T-cell through the middle (m)
dxhy , & ! 0.5*(HTE - HTE)
dyhx , & ! 0.5*(HTN - HTN)
cyp , & ! 1.5*HTE - 0.5*HTE
cxp , & ! 1.5*HTN - 0.5*HTN
cym , & ! 0.5*HTE - 1.5*HTE
cxm , & ! 0.5*HTN - 1.5*HTN
dxhy , & ! 0.5*(HTE - HTW)
dyhx , & ! 0.5*(HTN - HTS)
cyp , & ! 1.5*HTE - 0.5*HTW
cxp , & ! 1.5*HTN - 0.5*HTS
cym , & ! 0.5*HTE - 1.5*HTW
cxm , & ! 0.5*HTN - 1.5*HTS
tarear ! 1/tarea

real (kind=dbl_kind), dimension (nx_block,ny_block), intent(inout) :: &
Expand Down
12 changes: 6 additions & 6 deletions cicecore/cicedynB/dynamics/ice_dyn_evp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -610,12 +610,12 @@ subroutine stress (nx_block, ny_block, &
vvel , & ! y-component of velocity (m/s)
dxt , & ! width of T-cell through the middle (m)
dyt , & ! height of T-cell through the middle (m)
dxhy , & ! 0.5*(HTE - HTE)
dyhx , & ! 0.5*(HTN - HTN)
cyp , & ! 1.5*HTE - 0.5*HTE
cxp , & ! 1.5*HTN - 0.5*HTN
cym , & ! 0.5*HTE - 1.5*HTE
cxm , & ! 0.5*HTN - 1.5*HTN
dxhy , & ! 0.5*(HTE - HTW)
dyhx , & ! 0.5*(HTN - HTS)
cyp , & ! 1.5*HTE - 0.5*HTW
cxp , & ! 1.5*HTN - 0.5*HTS
cym , & ! 0.5*HTE - 1.5*HTW
cxm , & ! 0.5*HTN - 1.5*HTS
tarear , & ! 1/tarea
tinyarea ! puny*tarea

Expand Down
16 changes: 8 additions & 8 deletions cicecore/cicedynB/dynamics/ice_dyn_shared.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1204,10 +1204,10 @@ subroutine deformations (nx_block, ny_block, &
vvel , & ! y-component of velocity (m/s)
dxt , & ! width of T-cell through the middle (m)
dyt , & ! height of T-cell through the middle (m)
cyp , & ! 1.5*HTE - 0.5*HTE
cxp , & ! 1.5*HTN - 0.5*HTN
cym , & ! 0.5*HTE - 1.5*HTE
cxm , & ! 0.5*HTN - 1.5*HTN
cyp , & ! 1.5*HTE - 0.5*HTW
cxp , & ! 1.5*HTN - 0.5*HTS
cym , & ! 0.5*HTE - 1.5*HTW
cxm , & ! 0.5*HTN - 1.5*HTS
tarear ! 1/tarea

real (kind=dbl_kind), dimension (nx_block,ny_block), &
Expand Down Expand Up @@ -1305,10 +1305,10 @@ subroutine strain_rates (nx_block, ny_block, &
vvel , & ! y-component of velocity (m/s)
dxt , & ! width of T-cell through the middle (m)
dyt , & ! height of T-cell through the middle (m)
cyp , & ! 1.5*HTE - 0.5*HTE
cxp , & ! 1.5*HTN - 0.5*HTN
cym , & ! 0.5*HTE - 1.5*HTE
cxm ! 0.5*HTN - 1.5*HTN
cyp , & ! 1.5*HTE - 0.5*HTW
cxp , & ! 1.5*HTN - 0.5*HTS
cym , & ! 0.5*HTE - 1.5*HTW
cxm ! 0.5*HTN - 1.5*HTS

real (kind=dbl_kind), intent(out):: & ! at each corner :
divune, divunw, divuse, divusw , & ! divergence
Expand Down
44 changes: 22 additions & 22 deletions cicecore/cicedynB/dynamics/ice_dyn_vp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1149,12 +1149,12 @@ subroutine calc_zeta_dPr (nx_block, ny_block, &
vvel , & ! y-component of velocity (m/s)
dxt , & ! width of T-cell through the middle (m)
dyt , & ! height of T-cell through the middle (m)
dxhy , & ! 0.5*(HTE - HTE)
dyhx , & ! 0.5*(HTN - HTN)
cyp , & ! 1.5*HTE - 0.5*HTE
cxp , & ! 1.5*HTN - 0.5*HTN
cym , & ! 0.5*HTE - 1.5*HTE
cxm , & ! 0.5*HTN - 1.5*HTN
dxhy , & ! 0.5*(HTE - HTW)
dyhx , & ! 0.5*(HTN - HTS)
cyp , & ! 1.5*HTE - 0.5*HTW
cxp , & ! 1.5*HTN - 0.5*HTS
cym , & ! 0.5*HTE - 1.5*HTW
cxm , & ! 0.5*HTN - 1.5*HTS
tinyarea ! min_strain_rate*tarea

real (kind=dbl_kind), dimension(nx_block,ny_block,4), intent(out) :: &
Expand Down Expand Up @@ -1335,10 +1335,10 @@ subroutine stress_vp (nx_block , ny_block , &
vvel , & ! y-component of velocity (m/s)
dxt , & ! width of T-cell through the middle (m)
dyt , & ! height of T-cell through the middle (m)
cyp , & ! 1.5*HTE - 0.5*HTE
cxp , & ! 1.5*HTN - 0.5*HTN
cym , & ! 0.5*HTE - 1.5*HTE
cxm ! 0.5*HTN - 1.5*HTN
cyp , & ! 1.5*HTE - 0.5*HTW
cxp , & ! 1.5*HTN - 0.5*HTS
cym , & ! 0.5*HTE - 1.5*HTW
cxm ! 0.5*HTN - 1.5*HTS

real (kind=dbl_kind), dimension(nx_block,ny_block,4), intent(in) :: &
zetaD ! 2*zeta
Expand Down Expand Up @@ -1555,12 +1555,12 @@ subroutine matvec (nx_block, ny_block, &
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: &
dxt , & ! width of T-cell through the middle (m)
dyt , & ! height of T-cell through the middle (m)
dxhy , & ! 0.5*(HTE - HTE)
dyhx , & ! 0.5*(HTN - HTN)
cyp , & ! 1.5*HTE - 0.5*HTE
cxp , & ! 1.5*HTN - 0.5*HTN
cym , & ! 0.5*HTE - 1.5*HTE
cxm ! 0.5*HTN - 1.5*HTN
dxhy , & ! 0.5*(HTE - HTW)
dyhx , & ! 0.5*(HTN - HTS)
cyp , & ! 1.5*HTE - 0.5*HTW
cxp , & ! 1.5*HTN - 0.5*HTS
cym , & ! 0.5*HTE - 1.5*HTW
cxm ! 0.5*HTN - 1.5*HTS

real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: &
uvel , & ! x-component of velocity (m/s)
Expand Down Expand Up @@ -2004,12 +2004,12 @@ subroutine formDiag_step1 (nx_block, ny_block, &
real (kind=dbl_kind), dimension (nx_block,ny_block), intent(in) :: &
dxt , & ! width of T-cell through the middle (m)
dyt , & ! height of T-cell through the middle (m)
dxhy , & ! 0.5*(HTE - HTE)
dyhx , & ! 0.5*(HTN - HTN)
cyp , & ! 1.5*HTE - 0.5*HTE
cxp , & ! 1.5*HTN - 0.5*HTN
cym , & ! 0.5*HTE - 1.5*HTE
cxm ! 0.5*HTN - 1.5*HTN
dxhy , & ! 0.5*(HTE - HTW)
dyhx , & ! 0.5*(HTN - HTS)
cyp , & ! 1.5*HTE - 0.5*HTW
cxp , & ! 1.5*HTN - 0.5*HTS
cym , & ! 0.5*HTE - 1.5*HTW
cxm ! 0.5*HTN - 1.5*HTS

real (kind=dbl_kind), dimension(nx_block,ny_block,4), intent(in) :: &
zetaD ! 2*zeta
Expand Down
24 changes: 12 additions & 12 deletions cicecore/cicedynB/infrastructure/ice_grid.F90
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,12 @@ module ice_grid
! gridcell value of [1 - (land fraction)] (T-cell)

real (kind=dbl_kind), dimension (:,:,:), allocatable, public :: &
cyp , & ! 1.5*HTE - 0.5*HTE
cxp , & ! 1.5*HTN - 0.5*HTN
cym , & ! 0.5*HTE - 1.5*HTE
cxm , & ! 0.5*HTN - 1.5*HTN
dxhy , & ! 0.5*(HTE - HTE)
dyhx ! 0.5*(HTN - HTN)
cyp , & ! 1.5*HTE(i,j)-0.5*HTW(i,j) = 1.5*HTE(i,j)-0.5*HTE(i-1,j)
cxp , & ! 1.5*HTN(i,j)-0.5*HTS(i,j) = 1.5*HTN(i,j)-0.5*HTN(i,j-1)
cym , & ! 0.5*HTE(i,j)-1.5*HTW(i,j) = 0.5*HTE(i,j)-1.5*HTE(i-1,j)
cxm , & ! 0.5*HTN(i,j)-1.5*HTS(i,j) = 0.5*HTN(i,j)-1.5*HTN(i,j-1)
dxhy , & ! 0.5*(HTE(i,j) - HTW(i,j)) = 0.5*(HTE(i,j) - HTE(i-1,j))
dyhx ! 0.5*(HTN(i,j) - HTS(i,j)) = 0.5*(HTN(i,j) - HTN(i,j-1))

! grid dimensions for rectangular grid
real (kind=dbl_kind), public :: &
Expand Down Expand Up @@ -175,12 +175,12 @@ subroutine alloc_grid
ANGLET (nx_block,ny_block,max_blocks), & ! ANGLE converted to T-cells
bathymetry(nx_block,ny_block,max_blocks),& ! ocean depth, for grounding keels and bergs (m)
ocn_gridcell_frac(nx_block,ny_block,max_blocks),& ! only relevant for lat-lon grids
cyp (nx_block,ny_block,max_blocks), & ! 1.5*HTE - 0.5*HTE
cxp (nx_block,ny_block,max_blocks), & ! 1.5*HTN - 0.5*HTN
cym (nx_block,ny_block,max_blocks), & ! 0.5*HTE - 1.5*HTE
cxm (nx_block,ny_block,max_blocks), & ! 0.5*HTN - 1.5*HTN
dxhy (nx_block,ny_block,max_blocks), & ! 0.5*(HTE - HTE)
dyhx (nx_block,ny_block,max_blocks), & ! 0.5*(HTN - HTN)
cyp (nx_block,ny_block,max_blocks), & ! 1.5*HTE - 0.5*HTW
cxp (nx_block,ny_block,max_blocks), & ! 1.5*HTN - 0.5*HTS
cym (nx_block,ny_block,max_blocks), & ! 0.5*HTE - 1.5*HTW
cxm (nx_block,ny_block,max_blocks), & ! 0.5*HTN - 1.5*HTS
dxhy (nx_block,ny_block,max_blocks), & ! 0.5*(HTE - HTW)
dyhx (nx_block,ny_block,max_blocks), & ! 0.5*(HTN - HTS)
xav (nx_block,ny_block,max_blocks), & ! mean T-cell value of x
yav (nx_block,ny_block,max_blocks), & ! mean T-cell value of y
xxav (nx_block,ny_block,max_blocks), & ! mean T-cell value of xx
Expand Down
Binary file added doc/source/user_guide/figures/CICE_Bgrid.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 27 additions & 12 deletions doc/source/user_guide/ug_implementation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,20 +81,35 @@ Grid, boundary conditions and masks

The spatial discretization is specialized for a generalized orthogonal
B-grid as in :cite:`Murray96` or
:cite:`Smith95`. The ice and snow area, volume and energy are
given at the center of the cell, velocity is defined at the corners, and
the internal ice stress tensor takes four different values within a grid
:cite:`Smith95`. Figure :ref:`fig-Bgrid` is a schematic of CICE
B-grid. This cell with the tracer point :math:`t(i,j)` in the middle
is referred to as T-cell. The ice and snow area, volume and energy are
given at the t-point. The velocity :math:`{\bf u}(i,j)`
associated with :math:`t(i,j)` is defined in the northeast (NE)
corner. The other corners of the T-cell are northwest (NW), southwest
(SW) and southeast (SE). The lengths of the four edges of the T-cell
are respectively HTN, HTW, HTS and HTE for the northern, western,
southern and eastern edges. The lengths of the T-cell through the
middle are respectively dxt and dyt along the x and y axis.

We also occasionally refer to “U-cells,” which are centered on the
northeast corner of the corresponding T-cells and have velocity in the
center of each. The velocity components are aligned along grid lines.

The internal ice stress tensor takes four different values within a grid
cell; bilinear approximations are used for the stress tensor and the ice
velocity across the cell, as described in :cite:`Hunke02`.
This tends to avoid the grid decoupling problems associated with the
B-grid. EVP is available on the C-grid through the MITgcm code
distribution, http://mitgcm.org/viewvc/MITgcm/MITgcm/pkg/seaice/.

Since ice thickness and thermodynamic variables such as temperature are given
in the center of each cell, the grid cells are referred to as “T cells.”
We also occasionally refer to “U cells,” which are centered on the
northeast corner of the corresponding T cells and have velocity in the
center of each. The velocity components are aligned along grid lines.
.. _fig-Bgrid:

.. figure:: ./figures/CICE_Bgrid.png
:align: center
:scale: 55%

Schematic of CICE B-grid.

The user has several choices of grid routines: *popgrid* reads grid
lengths and other parameters for a nonuniform grid (including tripole
Expand Down Expand Up @@ -203,11 +218,11 @@ middle of the row. The grid is constructed by “folding” the top row, so
that the left-hand half and the right-hand half of it coincide. Two
choices for constructing the tripole grid are available. The one first
introduced to CICE is called “U-fold”, which means that the poles and
the grid cells between them are U cells on the grid. Alternatively the
poles and the cells between them can be grid T cells, making a “T-fold.”
the grid cells between them are U-cells on the grid. Alternatively the
poles and the cells between them can be grid T-cells, making a “T-fold.”
Both of these options are also supported by the OPA/NEMO ocean model,
which calls the U-fold an “f-fold” (because it uses the Arakawa C-grid
in which U cells are on T-rows). The choice of tripole grid is given by
in which U-cells are on T-rows). The choice of tripole grid is given by
the namelist variable ``ns_boundary_type``, ‘tripole’ for the U-fold and
‘tripoleT’ for the T-fold grid.

Expand Down Expand Up @@ -335,7 +350,7 @@ dynamics component to prevent unnecessary calculations on grid points
where there is no ice. They are not used in the thermodynamics
component, so that ice may form in previously ice-free cells. Like the
land masks ``hm`` and ``uvm``, the ice extent masks ``ice_tmask`` and ``ice_umask``
are for T cells and U cells, respectively.
are for T-cells and U-cells, respectively.

Improved parallel performance may result from utilizing halo masks for
boundary updates of the full ice state, incremental remapping transport,
Expand Down