Spatial grids, masks, and boundary conditions
REVISION HISTORY:
authors: Elizabeth C. Hunke, LANL Tony Craig, NCARINTERFACE:
module ice_gridUSES:
use ice_kinds_mod use ice_constants use ice_domain
INTERFACE:
subroutine init_grid(oceanmixed_ice)DESCRIPTION:
Horizontal grid initialization:
HTN,E = cell widths on N,E sides of T cell;
ULAT,LONG = true latitude,longitude of U points;
DX,YT,U = x,y spacing centered at T,U points.
REVISION HISTORY:
author: Elizabeth C. Hunke, LANLUSES:
use ice_mpi_internal use shr_sys_mod, only : shr_sys_abortINPUT/OUTPUT PARAMETERS:
INTERFACE:
subroutine popgrid(oceanmixed_ice)DESCRIPTION:
POP displaced pole grid and land mask. Grid record number,
field and units are:
(1) ULAT (radians)
(2) ULON (radians)
(3) HTN (cm)
(4) HTE (cm)
(5) HUS (cm)
(6) HUW (cm)
(7) ANGLE (radians).
Land mask record number and field is (1) KMT.
REVISION HISTORY:
author: Elizabeth C. Hunke, LANLUSES:
use ice_read_writeINPUT/OUTPUT PARAMETERS:
INTERFACE:
subroutine columngridDESCRIPTION:
Column grid and mask
REVISION HISTORY:
author: C. M. Bitz UW, (based on rectgrid by Hunke)USES:
use ice_model_size use ice_mpi_internal use shr_sys_mod, only : shr_sys_abortINPUT/OUTPUT PARAMETERS:
INTERFACE:
subroutine rectgridDESCRIPTION:
Regular rectangular grid and mask
REVISION HISTORY:
author: Elizabeth C. Hunke, LANLUSES:
use ice_model_size use ice_mpi_internalINPUT/OUTPUT PARAMETERS:
INTERFACE:
subroutine makemaskDESCRIPTION:
Sets the boundary values for the T cell land mask (hm) and makes the logical land masks for T and U cells (tmask, umask). Also creates hemisphere masks (mask-n northern, mask-s southern)
REVISION HISTORY:
author: Elizabeth C. Hunke, LANLUSES:
INPUT/OUTPUT PARAMETERS:
INTERFACE:
subroutine TlatlonDESCRIPTION:
Initializes latitude and longitude on T grid
REVISION HISTORY:
author: Elizabeth C. Hunke, LANL; code originally based on POP grid generation routineUSES:
use ice_model_size use ice_mpi_internal use ice_read_write ! if reading ULAT, ULON directly from fileINPUT/OUTPUT PARAMETERS:
INTERFACE:
subroutine t2ugrid(work)DESCRIPTION:
Transfer from T-cell centers to U-cell centers. Writes work into another array that has ghost cells
REVISION HISTORY:
author: Elizabeth C. Hunke, LANLUSES:
INPUT/OUTPUT PARAMETERS:
real (kind=dbl_kind) :: work (ilo:ihi,jlo:jhi)
INTERFACE:
subroutine to_ugrid(work1,work2)DESCRIPTION:
Shifts quantities from the T-cell midpoint (work1) to the U-cell midpoint (work2)
REVISION HISTORY:
author: Elizabeth C. Hunke, LANLUSES:
INPUT/OUTPUT PARAMETERS:
real (kind=dbl_kind) :: work1(imt_local,jmt_local) &, work2(ilo:ihi,jlo:jhi)
INTERFACE:
subroutine u2tgrid(work)DESCRIPTION:
Transfer from U-cell centers to T-cell centers. Writes work into another array that has ghost cells
REVISION HISTORY:
author: Elizabeth C. Hunke, LANLUSES:
INPUT/OUTPUT PARAMETERS:
real (kind=dbl_kind) :: work (ilo:ihi,jlo:jhi)
INTERFACE:
subroutine to_tgrid(work1,work2)DESCRIPTION:
Shifts quantities from the U-cell midpoint (work1) to the T-cell midpoint (work2)
REVISION HISTORY:
author: Elizabeth C. Hunke, LANLUSES:
INPUT/OUTPUT PARAMETERS:
real (kind=dbl_kind) :: work1(imt_local,jmt_local) &, work2(ilo:ihi,jlo:jhi)
INTERFACE:
subroutine bound(work1)DESCRIPTION:
Fills ghost cells with boundary information
REVISION HISTORY:
author: Tony Craig, NCARUSES:
INPUT/OUTPUT PARAMETERS:
real (kind=dbl_kind) :: work1(1)
INTERFACE:
subroutine bound_sw(work1)DESCRIPTION:
Fills south and west ghost cells with boundary information
REVISION HISTORY:
author: Tony Craig, NCARINPUT/OUTPUT PARAMETERS:
real (kind=dbl_kind) :: work1(1)
INTERFACE:
subroutine bound_narr_ne(narrays,work1)DESCRIPTION:
Fills north and east ghost cells with boundary information.
NOTE: work1 array has form (number-arrays,i-index,j-index)
for evp dynamics performance
REVISION HISTORY:
authors: Tony Craig, NCAR Elizabeth Hunke, LANLUSES:
INPUT/OUTPUT PARAMETERS:
integer (kind=int_kind) :: narrays real (kind=dbl_kind) :: work1(1)
INTERFACE:
subroutine bound_narr(narrays,work1)DESCRIPTION:
Fills north and east ghost cells with boundary information; narr arrays at once (for performance)
REVISION HISTORY:
authors: Tony Craig, NCAR Elizabeth Hunke, LANLUSES:
INPUT/OUTPUT PARAMETERS:
integer (kind=int_kind) :: narrays real (kind=dbl_kind) :: work1(1)
INTERFACE:
subroutine bound_ijn(nd,work1,north,south,east,west)DESCRIPTION:
Periodic/Neumann conditions for global domain boundaries.
Assumptions: a *single* row of ghost cells (num-ghost-cells=1);
work1 array has form (i-index,j-index,number-arrays)
REVISION HISTORY:
authors: Tony Craig, NCAR Elizabeth Hunke, LANLUSES:
use ice_timers use ice_mpi_internalINPUT/OUTPUT PARAMETERS:
integer (kind=int_kind) :: nd real (kind=dbl_kind) :: work1(imt_local,jmt_local,nd) logical north,south,east,west
INTERFACE:
subroutine bound_nij(nd,work1,north,south,east,west)DESCRIPTION:
Periodic/Neumann conditions for global domain boundaries.
Assumptions: a *single* row of ghost cells (num-ghost-cells=1);
work1 array has form (number-arrays,i-index,j-index)
REVISION HISTORY:
author: Tony Craig, NCARUSES:
use ice_timers use ice_mpi_internalINPUT/OUTPUT PARAMETERS:
integer (kind=int_kind) :: nd real (kind=dbl_kind) :: work1(nd,imt_local,jmt_local) logical north,south,east,west