Module ocean_operators_mod
OVERVIEW
Operators for MOM4
This module computes finite difference operators that are of
use throughout MOM4.
OTHER MODULES USED
constants_mod
mpp_domains_mod
mpp_mod
ocean_domains_mod
ocean_types_mod
PUBLIC INTERFACE
PUBLIC DATA
None.
PUBLIC ROUTINES
-
ocean_operators_init
-
DESCRIPTION
- Initialize the operator module
-
REMAP_NT_TO_NU
-
DESCRIPTION
- REMAP_NT_TO_NU conservatively remaps a normal flux at the north
face of T-cells to the north face of U-cells
-
INPUT
-
a | Field to be remapped [real, dimension(isd:ied,jsd:jed)] |
-
REMAP_ET_TO_EU
-
DESCRIPTION
- REMAP_ET_TO_EU conservatively remaps a normal flux at the east
face of T-cells to the east face of U-cells
-
INPUT
-
a | Field to be remapped [real, dimension(isd:ied,jsd:jed)] |
-
REMAP_BT_TO_BU
-
DESCRIPTION
- REMAP_BT_TO_BU conservatively remaps a T-cell thickness or
vertical velocity on the base of T-cells to U-cells
-
INPUT
-
a | Field to be remapped [real, dimension(isd:ied,jsd:jed)] |
-
DIV_UD
-
DESCRIPTION
- Compute divergence of vertically integrated velocity. Following is
a speedier version of
uhy(:,:) = BAY(ud(:,:,1)*dyu(:,:))
vhx(:,:) = BAX(ud(:,:,2)*dxu(:,:))
DIV_UD(ud) = BDX_ET(uhy(:,:)/dyte(:,:)) + BDY_NT(vhx(:,:)/dxtn(:,:))
-
INPUT
-
ud | Vertically integrated horizontal velocity field [real, dimension(isd:ied,jsd:jed)] |
-
GRAD_SURF_P
-
DESCRIPTION
- Compute horizontal gradient of the pressure field associated with
the free surface height. The algorithm is a speedier version of
grad_ps(:,:,1) = rho0r*FDX_NT(FAY(ps(:,:)))
grad_ps(:,:,2) = rho0r*FDY_ET(FAX(ps(:,:)))
-
INPUT
-
ps | Pressure field associated with the free surface height [real, dimension(isd:ied,jsd:jed)] |
-
S2D
-
DESCRIPTION
- Smooth a 2D field with a 2D version of a 1D filter with weights (1/4, 1/2, 1/4)
-
INPUT
-
a | Field to be smoothed [real, dimension(isd:ied,jsd:jed)] |
-
LAP_T
-
DESCRIPTION
- Compute horizontal 5-point Laplacian operator on eta_t.
Result lives at T-cell center.
Redundancy update for tripolar is needed to conserve
total volume and tracer. It is likely unimportant
when call LAP_T from within the barotropic loop. Yet it
is essential when call LAP_T from ocean_surface_smooth.
-
FAX
-
DESCRIPTION
- Forwards average in the i-direction on the X-axis.
If input is a(i,j) then output is defined at (i+1/2,j)
-
INPUT
-
a | Field to be averaged [real, dimension(isd:ied,jsd:jed)] |
-
BAX
-
DESCRIPTION
- Backwards average in the i-direction along the X-axis.
If input is a(i,j) then output is defined at (i-1/2,j)
-
INPUT
-
a | Field to be averaged [real, dimension(isd:ied,jsd:jed)] |
-
FAY
-
DESCRIPTION
- Forwards average in the j-direction on the Y-axis
If input is a(i,j) then output is defined at (i,j+1/2)
-
INPUT
-
a | Field to be averaged [real, dimension(isd:ied,jsd:jed)] |
-
BAY
-
DESCRIPTION
- Backwards average in the j-direction along the Y-axis
If input is a(i,j) then output is defined at (i,j-1/2)
-
INPUT
-
a | Field to be averaged [real, dimension(isd:ied,jsd:jed)] |
-
BDX_EU
-
DESCRIPTION
- Backwards Derivative in X of a quantity defined on the East face of a U-cell
If input is a(i,j) then output is defined at (i-1/2,j)
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
-
BDX_ET
-
DESCRIPTION
- Backwards derivative in X of a quantity defined on the East face of a T-cell.
If input is a(i,j) then output is defined at (i-1/2,j)
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
-
FDX_PU
-
DESCRIPTION
- Forward Derivative in X of a quantity defined on the grid point of a U-cell.
If input is a(i,j) then output is defined at (i+1/2,j).
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
-
FDY_ZTP
-
DESCRIPTION
- Forward Derivative in Y of the depth of the grid Point of a T-cell.
Input a(i,j) is at the depth of a grid point within T-cell.
Output is defined at (i,j+1/2) which is at the north face in a T-cell.
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
-
FDX_ZTP
-
DESCRIPTION
- Forward Derivative in X of the depth of the grid Point of a T-cell.
Input a(i,j) is at the depth of a grid point within T-cell.
Output is defined at (i+1/2,j) which is at the east face in a T-cell.
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
-
FDX_PT
-
DESCRIPTION
- Forward Derivative in X of a quantity defined on the grid Point of a T-cell.
To be used for tracer derivatives when grid points are not all at the same depth.
Input a(i,j,1) is at the grid point of a T-cell at level k-1.
Input a(i,j,2) is at the grid point of a T-cell at level k.
Output is defined at (i+1/2,j) which is at the east face in a T-cell at level k.
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
k | Depth level [integer] |
-
FDX_PT_flat
-
DESCRIPTION
- Forward Derivative in X of a quantity defined on a tracer grid point.
To be used for pure lateral derivatives--no "correction term".
Input a(i,j) is at the grid point of a T-cell
Output is defined at (i+1/2,j) which is at the east face in a T-cell.
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
-
FDY_PT
-
DESCRIPTION
- Forward Derivative in Y of a quantity defined on a tracer grid point.
To be used for tracer derivatives when grid points are not all at the same depth.
Input a(i,j,1) is at the grid point of a T-cell at level k-1.
Input a(i,j,2) is at the grid point of a T-cell at level k.
Output is defined at (i,j+1/2) which is at the north face in a T-cell at level k.
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
k | Depth level [integer] |
-
FDY_PT_flat
-
DESCRIPTION
- Forward Derivative in Y of a quantity defined on the grid Point of a T-cell.
To be used for pure lateral derivatives--no "correction term".
Input a(i,j) is at the grid point of a T-cell.
Output is defined at (i,j+1/2) which is at the north face in a T-cell.
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
-
FDX_NT
-
DESCRIPTION
- Forward Derivative in X of a quantity defined on the North face of a T-cell.
If input is a(i,j) then output is defined at (i+1/2,j).
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
-
BDY_NU
-
DESCRIPTION
- Backward Derivative in Y of a quantity defined on the North face of a U-cell.
If input is a(i,j) then output is defined at (i,j-1/2).
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
-
BDY_NT
-
DESCRIPTION
- Backward Derivative in Y of a quantity defined on the North face of a T-cell.
If input is a(i,j) then output is defined at (i,j-1/2).
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
-
FDY_PU
-
DESCRIPTION
- Forward Derivative in Y of a quantity defined on the grid Point of a U-cell.
If input is a(i,j) then output is defined at (i,j+1/2).
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
-
FDY_ET
-
DESCRIPTION
- Forward Derivative in Y of a quantity defined on the East face of a T-cell.
If input is a(i,j) then output is defined at (i,j+1/2).
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
-
FDZ_PT
-
DESCRIPTION
- Forward Derivative in Z of a quantity defined on the grid point of a T-cell at level k.
input a(i,j,1) is at the grid point of a T-cell at level k.
input a(i,j,2) is at the grid point of a T-cell at level k+1.
output is defined at (i,j,3/2) which is at bottom face of a T-cell at level k.
-
INPUT
-
a | Field to be finite differenced [real, dimension(isd:ied,jsd:jed)] |
k | Depth level index [integer] |
-
FMX
-
DESCRIPTION
- Forwards Minimum in the X direction.
If input is a(i,j) then output is defined at (i+1/2,j).
-
INPUT
-
a | Field to find minimum [real, dimension(isd:ied,jsd:jed)] |
-
FMY
-
DESCRIPTION
- Forwards Minimum in the Y direction.
If input is a(i,j) then output is defined at (i,j+1/2).
-
INPUT
-
a | Field to find minimum [real, dimension(isd:ied,jsd:jed)] |
-
REMAP_T_TO_V_NOCONSERVE
-
DESCRIPTION
- T-cell field to U-cells without any grid factors included.
Needed for getting rho_nbu from rho_nbt.
DATA SETS
None.
ERROR MESSAGES
None.
REFERENCES
None.
COMPILER SPECIFICS
None.
PRECOMPILER OPTIONS
None.
LOADER OPTIONS
None.
TEST PROGRAM
None.
KNOWN BUGS
None.
NOTES
All operators will be replaced by generic forms when Fortran
can properly support functions of allocatable arrays
The problems are are as follows:
Allocatable arrays cannot be inside of derived types.
Only pointers to allocatable arrays can be inside derived types.
Supposedly the former will be allowed in Fortran 95
Also, functions cannot be typed as a derived type without conflicts
which preclude using function as general operators operating on
derived types.
Mnemonics for simple operators
1st letter (direction of operation)
F => Forward direction with respect to the index.
B => Backward direction with respect to the index.
2nd letter (operation)
D => Derivative
A => Average
M => Minimum
3rd letter (axis)
X => along the X axis
Y => along the Y axis
Z => along the Z axis
4th letter (placement of quantity being operated on)
E => East face
N => North face
B => Bottom face
P => Point (grid point within cell)
5th letter (type of grid cell)
U => U-cell
T => T-cell
FUTURE PLANS
None.