PUBLIC INTERFACE ~ PUBLIC DATA ~ PUBLIC ROUTINES ~ NAMELIST ~ DIAGNOSTIC FIELDS ~ ERROR MESSAGES ~ REFERENCES ~ NOTES

Module ocean_operators_mod

Contact:  R.C. Pacanowski
Reviewers:  A. Rosati S.M. Griffies Zhi Liang
Change History: WebCVS Log


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

ocean_operators_init:
REMAP_NT_TO_NU:
REMAP_ET_TO_EU:
REMAP_BT_TO_BU:
DIV_UD:
GRAD_SURF_P:
S2D:
LAP_T:
FAX:
BAX:
FAY:
BAY:
BDX_EU:
BDX_ET:
FDX_PU:
FDY_ZTP:
FDX_ZTP:
FDX_PT:
FDX_PT_flat:
FDY_PT:
FDY_PT_flat:
FDX_NT:
BDY_NU:
BDY_NT:
FDY_PU:
FDY_ET:
FDZ_PT:
FMX:
FMY:
REMAP_T_TO_V_NOCONSERVE:


PUBLIC DATA

None.


PUBLIC ROUTINES

  1. ocean_operators_init

    DESCRIPTION
    Initialize the operator module


  2. 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)]

  3. 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)]

  4. 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)]

  5. 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)]

  6. 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)]

  7. 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)]

  8. 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.


  9. 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)]

  10. 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)]

  11. 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)]

  12. 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)]

  13. 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)]

  14. 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)]

  15. 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)]

  16. 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)]

  17. 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)]

  18. 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]

  19. 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)]

  20. 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]

  21. 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)]

  22. 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)]

  23. 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)]

  24. 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)]

  25. 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)]

  26. 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)]

  27. 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]

  28. 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)]

  29. 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)]

  30. 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.


top