| POSEIDON_GRID_MODULE | Types |
DOMAIN DECOMPOSITION
For each Processing Element (PE), the Poseidon grid keeps track of only a part of the world, depending on the domain decomposiiton provided through the NEWS grid. The size of the world array is imw by jmw, but the local grid covers only img columns by jmg rows. Of the img columns the outermost are "shadow" columns that store data from neighboring PE elements. The number of shadows kept by the model are tunable, but default to 1.
B-GRID and C-GRID
The default grid for Poseidon was originally conceived as a B-grid, in which the velocity points sit at the northeast corner of the primary grid boxes. The introduction of a run-time selectable grid means that a C-grid is provided as an option in which the u-velocity points sit at the center of the East face and the v-velocity points sit as the center of the North face. Since all grid data is stored in allocatable (pointer) space, the C-grid data is not generated unless needed.
Whether the grid is on the B or C grid layout can be determined at run time through
if ( g%Layout == pg_C_GRID ) ...
| LOGICAL :: created | Is the grid created already |
| LOGICAL :: initialized | Is the grid initialized? |
| LOGICAL :: cyclic | Is the grid cyclic? |
| REAL :: TwoPI | Cyclic interval in degrees, Units: degrees For globe, set to 360, but it can be small for channel models |
| INTEGER :: type_code | Code for type of grid (see parameters) |
| INTEGER :: layout | Code for layout of grid (B or C) |
| REAL :: shelf_depth | Depth which will be treated as land, Units: meters |
| TYPE T_NEWS_GRID :: news | GEMS NEWS grid object |
| INTEGER :: img | Inner dimension size of grid on PE |
| INTEGER :: jmg | Outer dimension size of grid on PE |
| INTEGER :: kmg | Number of layers on PE |
| INTEGER :: imw | Inner dimension size of world grid |
| INTEGER :: jmw | Outer dimension size of world grid |
| INTEGER :: kmw | Number of layers of world grid |
| INTEGER :: i1 | Core for this PE is from i1 to i2 |
| INTEGER :: i2 | |
| INTEGER :: j1 | Core for this PE is from i1 to i2 |
| INTEGER :: j2 | |
| INTEGER :: k1 | Core for this PE is from j1 to j2 |
| INTEGER :: k2 | |
| INTEGER,POINTER :: Bh(:,:) | Mask for water(1) and land(0) primary points |
| INTEGER,POINTER :: Bu(:,:) | Mask for water(1) and land(0) B-grid u,v points |
| REAL,POINTER :: lon(:,:) | longitude of B-grid primary points, Units: degrees |
| REAL,POINTER :: lat(:,:) | latitude of B-grid primary points, Units: degrees |
| REAL,POINTER :: lon_ne(:,:) | longitude of B-grid u,v points, Units: degrees |
| REAL,POINTER :: lat_ne(:,:) | latitude of B-grid u,v points, Units: degrees |
| REAL,POINTER :: Area_h(:,:) | Area of B-grid primary points, Units: m^2 |
| REAL,POINTER :: Area_u(:,:) | Area of B-grid u,v points, Units: m^2 |
| REAL,POINTER :: Area_h_r(:,:) | 1.0 / Area_h |
| REAL,POINTER :: Area_u_r(:,:) | 1.0 / Area_u |
| REAL,POINTER :: U_metric(:,:) | not used (vector invariant form) |
| REAL,POINTER :: V_metric(:,:) | not used (vector invariant form) |
| REAL,POINTER :: Dx_h(:,:) | size of east face, B-grid primary box, Units: m |
| REAL,POINTER :: Dy_h(:,:) | size of north face, B-grid primary box, Units: m |
| REAL,POINTER :: Coriolis(:,:) | Coriolis parameter, Units: s^{-1} |
| REAL,POINTER :: cos_chi(:,:) | Cos of grid rotation angle |
| REAL,POINTER :: sin_chi(:,:) | Sin of grid rotation angle |
| REAL,POINTER :: z_bottom(:,:) | Altitude of ocean bottom (negative in water), Units: m |
| REAL,POINTER :: D_min(:,:,:) | Minimum depth allowed for each layer at each point |
| REAL,POINTER :: D_max(:,:,:) | Maximum depth allowed for each layer at each point |
| REAL,POINTER :: hmin(:) | Minimum layer thickness allowed for each layer (dyn m) |
| REAL,POINTER :: hmax(:) | Maximum layer thickness allowed for each layer (dyn m) |
| REAL,POINTER :: D_min1d(:) | Minimum depth allowed for each layer (ignoring topography) |
| REAL,POINTER :: D_max1d(:) | Maximum depth allowed for each layer (ignoring topography) |
| REAL,POINTER :: hmin_b(:) | Minimum layer thickness allowed when layers hit the bottom |
| REAL :: totalah | Global integral of area (m^2) |
| INTEGER :: myPE | my PE number |
| INTEGER :: xshadows | |
| INTEGER :: yshadows | # of shadows in x/y dimen. |
| INTEGER,POINTER :: B_Cu(:,:) | Mask for u-velocity points on C-grid |
| INTEGER,POINTER :: B_Cv(:,:) | Mask for v-velocity points on C-grid |
| INTEGER,POINTER :: B_Cz(:,:) | Mask for vorticity points on C-grid |
| REAL,POINTER :: Depth(:,:) | Depth of the ocean at primary points (m) |
| REAL,POINTER :: Depth_Cz(:,:) | Depth at vorticity points on C-grid |
| REAL,POINTER :: Depth_Cu(:,:) | Depth at u-velocity points on C-grid |
| REAL,POINTER :: Depth_Cv(:,:) | Depth at v_velocity points on C-grid |
| REAL,POINTER :: Depth_r(:,:) | Inverse of Depth |
| REAL,POINTER :: Depth_Cz_r(:,:) | |
| REAL,POINTER :: Depth_Cu_r(:,:) | |
| REAL,POINTER :: Depth_Cv_r(:,:) | |
| REAL,POINTER :: Dx_Cp(:,:) | Zonal average of Dx_Cu (m) |
| REAL,POINTER :: Dx_Cz(:,:) | Zonal average of Dx_Cv (m) |
| REAL,POINTER :: Dx_Cu(:,:) | x-Distance between primary grid point centers (m) |
| REAL,POINTER :: Dx_Cv(:,:) | Meridional average of Dx_Cp (m) |
| REAL,POINTER :: Dx_Cu_r(:,:) | 1. / Dx_cu |
| REAL,POINTER :: Dx_Cv_r(:,:) | |
| REAL,POINTER :: Dx_Cp_r(:,:) | |
| REAL,POINTER :: Dx_Cz_r(:,:) | |
| REAL,POINTER :: Dy_Cp(:,:) | Meridional average of Dy_Cv |
| REAL,POINTER :: Dy_Cz(:,:) | Meridional average of Dy_Cu |
| REAL,POINTER :: Dy_Cu(:,:) | Zonal average of Dy_Cp |
| REAL,POINTER :: Dy_Cv(:,:) | y-distance between primary grid point centers (m) |
| REAL,POINTER :: Dy_Cu_r(:,:) | 1. / Dy_Cu |
| REAL,POINTER :: Dy_Cv_r(:,:) | |
| REAL,POINTER :: Dy_Cp_r(:,:) | |
| REAL,POINTER :: Dy_Cz_r(:,:) | |
| REAL,POINTER :: Area_Cp(:,:) | Area of primary cell (m^2) |
| REAL,POINTER :: Area_Cz(:,:) | Area of vorticity cell (m^2) |
| REAL,POINTER :: Area_Cu(:,:) | Area of u-point cell (m^2) |
| REAL,POINTER :: Area_Cv(:,:) | Area of v-point cell (m^2) |
| REAL,POINTER :: Area_Cu_r(:,:) | 1. / Area_Cu |
| REAL,POINTER :: Area_Cv_r(:,:) | |
| REAL,POINTER :: Area_Cp_r(:,:) | |
| REAL,POINTER :: Area_Cz_r(:,:) | |
| INTEGER,POINTER :: Bh3(:,:,:) | 3-d version of Bh |
| INTEGER,POINTER :: Bu3(:,:,:) | |
| INTEGER,POINTER :: B_Cu3(:,:,:) | |
| INTEGER,POINTER :: B_Cv3(:,:,:) | |
| REAL,POINTER :: Area_h3(:,:,:) | |
| REAL,POINTER :: Area_u3(:,:,:) | |
| REAL,POINTER :: Area_h_r3(:,:,:) | |
| REAL,POINTER :: Area_u_r3(:,:,:) | |
| INTEGER,POINTER :: bh_world(:,:) | Bh for world array (imw,jmw) |
| REAL,POINTER :: xc_world(:,:) | Longitude of primary cell in world array (degrees) |
| REAL,POINTER :: yc_world(:,:) | Latitude of primary cell in world array (degrees) |
| REAL,POINTER :: xne_world(:,:) | Longitude of North-East corner in world array dimensioned (0:imw,0:jmw) when allocated |
| REAL,POINTER :: yne_world(:,:) | Latitude of North-East corner in world array dimensioned (0:imw,0:jmw) when allocated |
| REAL,POINTER :: chi_world(:,:) | Rotation angle between curvilinear grid y-direction vector and Earth meridian |
| REAL,POINTER :: a_world(:,:) | Area of primary grid point for world array |
| REAL,POINTER :: au_world(:,:) | Area of B-grid u,v point for world array |
| End Type T_Poseidon_grid |