MOM_dyn_horgrid module reference
Contains a shareable dynamic type for describing horizontal grids and metric data and utilty routines that work on this type.
Data Types
Describes the horizontal ocean grid with only dynamic memory arrays |
Functions/Subroutines
Allocate memory used by the dyn_horgrid_type and related structures. |
|
Copy the rotated contents of one horizontal grid type into another. The input and output grid type arguments can not use the same object. |
|
rescale_dyn_horgrid_bathymetry permits a change in the internal units for the bathymetry on the grid, both rescaling the depths and recording the new internal depth units. |
|
set_derived_dyn_horgrid calculates metric terms that are derived from other metrics. |
|
Adcroft_reciprocal(x) = 1/x for |x|>0 or 0 for x=0. |
|
Release memory used by the dyn_horgrid_type and related structures. |
Type Documentation
- type, public :: dyn_horgrid_type
Describes the horizontal ocean grid with only dynamic memory arrays
- Parameters
Domain
Ocean model domain
Domain_aux
A non-symmetric auxiliary domain type.
HI
Horizontal index ranges
isc
The start i-index of cell centers within the computational domain
iec
The end i-index of cell centers within the computational domain
jsc
The start j-index of cell centers within the computational domain
jec
The end j-index of cell centers within the computational domain
isd
The start i-index of cell centers within the data domain
ied
The end i-index of cell centers within the data domain
jsd
The start j-index of cell centers within the data domain
jed
The end j-index of cell centers within the data domain
isg
The start i-index of cell centers within the global domain
ieg
The end i-index of cell centers within the global domain
jsg
The start j-index of cell centers within the global domain
jeg
The end j-index of cell centers within the global domain
IscB
The start i-index of cell vertices within the computational domain
IecB
The end i-index of cell vertices within the computational domain
JscB
The start j-index of cell vertices within the computational domain
JecB
The end j-index of cell vertices within the computational domain
IsdB
The start i-index of cell vertices within the data domain
IedB
The end i-index of cell vertices within the data domain
JsdB
The start j-index of cell vertices within the data domain
JedB
The end j-index of cell vertices within the data domain
IsgB
The start i-index of cell vertices within the global domain
IegB
The end i-index of cell vertices within the global domain
JsgB
The start j-index of cell vertices within the global domain
JegB
The end j-index of cell vertices within the global domain
isd_global
The value of isd in the global index space (decompoistion invariant).
jsd_global
The value of isd in the global index space (decompoistion invariant).
idg_offset
The offset between the corresponding global and local i-indices.
jdg_offset
The offset between the corresponding global and local j-indices.
symmetric
True if symmetric memory is used.
nonblocking_updates
If true, non-blocking halo updates are allowed. The default is .false. (for now).
first_direction
An integer that indicates which direction is to be updated first in directionally split parts of the calculation. This can be altered during the course of the run via calls to set_first_direction.
mask2dT
0 for land points and 1 for ocean points on the h-grid [nondim].
geoLatT
The geographic latitude at q points [degrees of latitude] or [m].
geoLonT
The geographic longitude at q points [degrees of longitude] or [m].
dxT
dxT is delta x at h points [L ~> m].
IdxT
1/dxT [L-1 ~> m-1].
dyT
dyT is delta y at h points [L ~> m].
IdyT
IdyT is 1/dyT [L-1 ~> m-1].
areaT
The area of an h-cell [L2 ~> m2].
IareaT
1/areaT [L-2 ~> m-2].
sin_rot
The sine of the angular rotation between the local model grid's northward and the true northward directions [nondim].
cos_rot
The cosine of the angular rotation between the local model grid's northward and the true northward directions [nondim].
mask2dCu
0 for boundary points and 1 for ocean points on the u grid [nondim].
OBCmaskCu
0 for boundary or OBC points and 1 for ocean points on the u grid [nondim].
geoLatCu
The geographic latitude at u points [degrees of latitude] or [m].
geoLonCu
The geographic longitude at u points [degrees of longitude] or [m].
dxCu
dxCu is delta x at u points [L ~> m].
IdxCu
1/dxCu [L-1 ~> m-1].
IdxCu_OBCmask
1/dxCu or 0 at boundary or OBC points [L-1 ~> m-1].
dyCu
dyCu is delta y at u points [L ~> m].
IdyCu
1/dyCu [L-1 ~> m-1].
dy_Cu
The unblocked lengths of the u-faces of the h-cell [L ~> m].
IareaCu
The masked inverse areas of u-grid cells [L-2 ~> m-2].
areaCu
The areas of the u-grid cells [L2 ~> m2].
mask2dCv
0 for boundary points and 1 for ocean points on the v grid [nondim].
OBCmaskCv
0 for boundary or OBC points and 1 for ocean points on the v grid [nondim].
geoLatCv
The geographic latitude at v points [degrees of latitude] or [m].
geoLonCv
The geographic longitude at v points [degrees of longitude] or [m].
dxCv
dxCv is delta x at v points [L ~> m].
IdxCv
1/dxCv [L-1 ~> m-1].
dyCv
dyCv is delta y at v points [L ~> m].
IdyCv
1/dyCv [L-1 ~> m-1].
IdyCv_OBCmask
1/dxCv or 0 at boundary or OBC points [L-1 ~> m-1].
dx_Cv
The unblocked lengths of the v-faces of the h-cell [L ~> m].
IareaCv
The masked inverse areas of v-grid cells [L-2 ~> m-2].
areaCv
The areas of the v-grid cells [L2 ~> m2].
porous_DminU
minimum topographic height (deepest) of U-face [Z ~> m]
porous_DmaxU
maximum topographic height (shallowest) of U-face [Z ~> m]
porous_DavgU
average topographic height of U-face [Z ~> m]
porous_DminV
minimum topographic height (deepest) of V-face [Z ~> m]
porous_DmaxV
maximum topographic height (shallowest) of V-face [Z ~> m]
porous_DavgV
average topographic height of V-face [Z ~> m]
mask2dBu
0 for boundary points and 1 for ocean points on the q grid [nondim].
geoLatBu
The geographic latitude at q points [degrees of latitude] or [m].
geoLonBu
The geographic longitude at q points [degrees of longitude] or [m].
dxBu
dxBu is delta x at q points [L ~> m].
IdxBu
1/dxBu [L-1 ~> m-1].
dyBu
dyBu is delta y at q points [L ~> m].
IdyBu
1/dyBu [L-1 ~> m-1].
areaBu
areaBu is the area of a q-cell [L ~> m]
IareaBu
IareaBu = 1/areaBu [L-2 ~> m-2].
gridLatT
The latitude of T points for the purpose of labeling the output axes, often in units of [degrees_N] or [km] or [m] or [gridpoints]. On many grids this is the same as geoLatT.
gridLatB
The latitude of B points for the purpose of labeling the output axes, often in units of [degrees_N] or [km] or [m] or [gridpoints]. On many grids this is the same as geoLatBu.
gridLonT
The longitude of T points for the purpose of labeling the output axes, often in units of [degrees_E] or [km] or [m] or [gridpoints]. On many grids this is the same as geoLonT.
gridLonB
The longitude of B points for the purpose of labeling the output axes, often in units of [degrees_E] or [km] or [m] or [gridpoints]. On many grids this is the same as geoLonBu.
x_axis_units
The units that are used in labeling the x coordinate axes.
y_axis_units
The units that are used in labeling the y coordinate axes.
x_ax_unit_short
A short description of the x-axis units for documenting parameter units
y_ax_unit_short
A short description of the y-axis units for documenting parameter units
bathyT
Ocean bottom depth, referenced to a zero reference height at tracer points. bathyT is in depth units and positive below the reference height [Z ~> m].
meanSL
Spatially varying time mean sea level, referenced to a zero reference height at tracer points. meanSL is in height units and positive above zero. It is used a) as the height where p = p_atm or zero; b) to calculate time mean thickness of the water column, where mean thickness = max(meanSL + bathyT, 0.0). meanSL is 2D for the consideration of a domain with spatically varying mean height, e.g. the Great Lakes system [Z ~> m].
bathymetry_at_vel
If true, there are separate values for the basin depths at velocity points. Otherwise the effects of of topography are entirely determined from thickness points.
Dblock_u
Topographic depths at u-points at which the flow is blocked [Z ~> m].
Dopen_u
Topographic depths at u-points at which the flow is open at width dy_Cu [Z ~> m].
Dblock_v
Topographic depths at v-points at which the flow is blocked [Z ~> m].
Dopen_v
Topographic depths at v-points at which the flow is open at width dx_Cv [Z ~> m].
CoriolisBu
The Coriolis parameter at corner points [T-1 ~> s-1].
Coriolis2Bu
The square of the Coriolis parameter at corner points [T-2 ~> s-2].
df_dx
Derivative d/dx f (Coriolis parameter) at h-points [T-1 L-1 ~> s-1 m-1].
df_dy
Derivative d/dy f (Coriolis parameter) at h-points [T-1 L-1 ~> s-1 m-1].
areaT_global
Global sum of h-cell area [L2 ~> m2]
IareaT_global
Global sum of inverse h-cell area (1/areaT_global) [L-2 ~> m-2]
grid_unit_to_L
A factor that converts a the geoLat and geoLon variables and related variables like len_lat and len_lon into rescaled horizontal distance units on a Cartesian grid, in [L km ~> 1000] or [L m-1 ~> 1] or is 0 for a non-Cartesian grid.
south_lat
The latitude (or y-coordinate) of the first v-line [degrees_N] or [km] or [m]
west_lon
The longitude (or x-coordinate) of the first u-line [degrees_E] or [km] or [m]
len_lat
The latitudinal (or y-coord) extent of physical domain [degrees_N] or [km] or [m]
len_lon
The longitudinal (or x-coord) extent of physical domain [degrees_E] or [km] or [m]
Rad_Earth_L
The radius of the planet in rescaled units [L ~> m]
max_depth
The maximum depth of the ocean [Z ~> m]
Functions/Subroutine Documentation
- subroutine create_dyn_horgrid(G, HI, bathymetry_at_vel)
Allocate memory used by the dyn_horgrid_type and related structures.
- Parameters
G [inout]
A pointer to the dynamic horizontal grid type
HI [in]
A hor_index_type for array extents
bathymetry_at_vel [in]
If true, there are separate values for the basin depths at velocity points. Otherwise the effects of topography are entirely determined from thickness points.
- subroutine rotate_dyn_horgrid(G_in, G, US, turns)
Copy the rotated contents of one horizontal grid type into another. The input and output grid type arguments can not use the same object.
- Parameters
G_in [in]
The input horizontal grid type
G [inout]
An output rotated horizontal grid type that has already been allocated, but whose contents are largely replaced here.
US [in]
A dimensional unit scaling type
turns [in]
Number of quarter turns
Callees call graph
Callers call graph
- subroutine rescale_dyn_horgrid_bathymetry(G, m_in_new_units)
rescale_dyn_horgrid_bathymetry permits a change in the internal units for the bathymetry on the grid, both rescaling the depths and recording the new internal depth units.
- Parameters
G [inout]
The dynamic horizontal grid type
m_in_new_units [in]
The new internal representation of 1 m depth [m Z-1 ~> 1]
Callees call graph
- subroutine set_derived_dyn_horgrid(G, US)
set_derived_dyn_horgrid calculates metric terms that are derived from other metrics.
- Parameters
G [inout]
The dynamic horizontal grid type
US [in]
A dimensional unit scaling type
Callees call graph
- function Adcroft_reciprocal(val) result(I_val)
Adcroft_reciprocal(x) = 1/x for |x|>0 or 0 for x=0.
- Parameters
val [in]
The value being inverted in arbitrary units [A ~> a]
I_val
The Adcroft reciprocal of val [A-1 ~> a-1].
Callers call graph
- subroutine destroy_dyn_horgrid(G)
Release memory used by the dyn_horgrid_type and related structures.
- Parameters
G
The dynamic horizontal grid type