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 |
|
Copy the rotated contents of one horizontal grid type into another. |
|
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 |
Detailed Description
Contains a shareable dynamic type for describing horizontal grids and metric data and utilty routines that work on this type.
Type Documentation
- type mom_dyn_horgrid/dyn_horgrid_type
Describes the horizontal ocean grid with only dynamic memory arrays.
- Type fields:
% domain ::
type(mom_domain_type), pointerOcean model domain.% domain_aux ::
type(mom_domain_type), pointerA non-symmetric auxiliary domain type.% hi ::
type(hor_index_type)Horizontal index ranges.% isc ::
integerThe start i-index of cell centers within the computational domain.% iec ::
integerThe end i-index of cell centers within the computational domain.% jsc ::
integerThe start j-index of cell centers within the computational domain.% jec ::
integerThe end j-index of cell centers within the computational domain.% isd ::
integerThe start i-index of cell centers within the data domain.% ied ::
integerThe end i-index of cell centers within the data domain.% jsd ::
integerThe start j-index of cell centers within the data domain.% jed ::
integerThe end j-index of cell centers within the data domain.% isg ::
integerThe start i-index of cell centers within the global domain.% ieg ::
integerThe end i-index of cell centers within the global domain.% jsg ::
integerThe start j-index of cell centers within the global domain.% jeg ::
integerThe end j-index of cell centers within the global domain.% iscb ::
integerThe start i-index of cell vertices within the computational domain.% iecb ::
integerThe end i-index of cell vertices within the computational domain.% jscb ::
integerThe start j-index of cell vertices within the computational domain.% jecb ::
integerThe end j-index of cell vertices within the computational domain.% isdb ::
integerThe start i-index of cell vertices within the data domain.% iedb ::
integerThe end i-index of cell vertices within the data domain.% jsdb ::
integerThe start j-index of cell vertices within the data domain.% jedb ::
integerThe end j-index of cell vertices within the data domain.% isgb ::
integerThe start i-index of cell vertices within the global domain.% iegb ::
integerThe end i-index of cell vertices within the global domain.% jsgb ::
integerThe start j-index of cell vertices within the global domain.% jegb ::
integerThe end j-index of cell vertices within the global domain.% isd_global ::
integerThe value of isd in the global index space (decompoistion invariant).% jsd_global ::
integerThe value of isd in the global index space (decompoistion invariant).% idg_offset ::
integerThe offset between the corresponding global and local i-indices.% jdg_offset ::
integerThe offset between the corresponding global and local j-indices.% symmetric ::
logicalTrue if symmetric memory is used.% nonblocking_updates ::
logicalIf true, non-blocking halo updates are allowed. The default is .false. (for now).% first_direction ::
integerAn 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 ::
real, dimension(:,:), allocatable0 for land points and 1 for ocean points on the h-grid [nondim].% geolatt ::
real, dimension(:,:), allocatableThe geographic latitude at q points [degrees of latitude] or [m].% geolont ::
real, dimension(:,:), allocatableThe geographic longitude at q points [degrees of longitude] or [m].% dxt ::
real, dimension(:,:), allocatabledxT is delta x at h points [L ~> m].% idxt ::
real, dimension(:,:), allocatable1/dxT [L-1 ~> m-1].% dyt ::
real, dimension(:,:), allocatabledyT is delta y at h points [L ~> m].% idyt ::
real, dimension(:,:), allocatableIdyT is 1/dyT [L-1 ~> m-1].% areat ::
real, dimension(:,:), allocatableThe area of an h-cell [L2 ~> m2].% iareat ::
real, dimension(:,:), allocatable1/areaT [L-2 ~> m-2].% sin_rot ::
real, dimension(:,:), allocatableThe sine of the angular rotation between the local model grid’s northward and the true northward directions [nondim].% cos_rot ::
real, dimension(:,:), allocatableThe cosine of the angular rotation between the local model grid’s northward and the true northward directions [nondim].% mask2dcu ::
real, dimension(:,:), allocatable0 for boundary points and 1 for ocean points on the u grid [nondim].% obcmaskcu ::
real, dimension(:,:), allocatable0 for boundary or OBC points and 1 for ocean points on the u grid [nondim].% geolatcu ::
real, dimension(:,:), allocatableThe geographic latitude at u points [degrees of latitude] or [m].% geoloncu ::
real, dimension(:,:), allocatableThe geographic longitude at u points [degrees of longitude] or [m].% dxcu ::
real, dimension(:,:), allocatabledxCu is delta x at u points [L ~> m].% idxcu ::
real, dimension(:,:), allocatable1/dxCu [L-1 ~> m-1].% idxcu_obcmask ::
real, dimension(:,:), allocatable1/dxCu or 0 at boundary or OBC points [L-1 ~> m-1].% dycu ::
real, dimension(:,:), allocatabledyCu is delta y at u points [L ~> m].% idycu ::
real, dimension(:,:), allocatable1/dyCu [L-1 ~> m-1].% dy_cu ::
real, dimension(:,:), allocatableThe unblocked lengths of the u-faces of the h-cell [L ~> m].% iareacu ::
real, dimension(:,:), allocatableThe masked inverse areas of u-grid cells [L-2 ~> m-2].% areacu ::
real, dimension(:,:), allocatableThe areas of the u-grid cells [L2 ~> m2].% mask2dcv ::
real, dimension(:,:), allocatable0 for boundary points and 1 for ocean points on the v grid [nondim].% obcmaskcv ::
real, dimension(:,:), allocatable0 for boundary or OBC points and 1 for ocean points on the v grid [nondim].% geolatcv ::
real, dimension(:,:), allocatableThe geographic latitude at v points [degrees of latitude] or [m].% geoloncv ::
real, dimension(:,:), allocatableThe geographic longitude at v points [degrees of longitude] or [m].% dxcv ::
real, dimension(:,:), allocatabledxCv is delta x at v points [L ~> m].% idxcv ::
real, dimension(:,:), allocatable1/dxCv [L-1 ~> m-1].% dycv ::
real, dimension(:,:), allocatabledyCv is delta y at v points [L ~> m].% idycv ::
real, dimension(:,:), allocatable1/dyCv [L-1 ~> m-1].% idycv_obcmask ::
real, dimension(:,:), allocatable1/dxCv or 0 at boundary or OBC points [L-1 ~> m-1].% dx_cv ::
real, dimension(:,:), allocatableThe unblocked lengths of the v-faces of the h-cell [L ~> m].% iareacv ::
real, dimension(:,:), allocatableThe masked inverse areas of v-grid cells [L-2 ~> m-2].% areacv ::
real, dimension(:,:), allocatableThe areas of the v-grid cells [L2 ~> m2].% porous_dminu ::
real, dimension(:,:), allocatableminimum topographic height (deepest) of U-face [Z ~> m]% porous_dmaxu ::
real, dimension(:,:), allocatablemaximum topographic height (shallowest) of U-face [Z ~> m]% porous_davgu ::
real, dimension(:,:), allocatableaverage topographic height of U-face [Z ~> m]% porous_dminv ::
real, dimension(:,:), allocatableminimum topographic height (deepest) of V-face [Z ~> m]% porous_dmaxv ::
real, dimension(:,:), allocatablemaximum topographic height (shallowest) of V-face [Z ~> m]% porous_davgv ::
real, dimension(:,:), allocatableaverage topographic height of V-face [Z ~> m]% mask2dbu ::
real, dimension(:,:), allocatable0 for boundary points and 1 for ocean points on the q grid [nondim].% geolatbu ::
real, dimension(:,:), allocatableThe geographic latitude at q points [degrees of latitude] or [m].% geolonbu ::
real, dimension(:,:), allocatableThe geographic longitude at q points [degrees of longitude] or [m].% dxbu ::
real, dimension(:,:), allocatabledxBu is delta x at q points [L ~> m].% idxbu ::
real, dimension(:,:), allocatable1/dxBu [L-1 ~> m-1].% dybu ::
real, dimension(:,:), allocatabledyBu is delta y at q points [L ~> m].% idybu ::
real, dimension(:,:), allocatable1/dyBu [L-1 ~> m-1].% areabu ::
real, dimension(:,:), allocatableareaBu is the area of a q-cell [L ~> m]% iareabu ::
real, dimension(:,:), allocatableIareaBu = 1/areaBu [L-2 ~> m-2].% gridlatt ::
real, dimension(:), pointerThe 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 ::
real, dimension(:), pointerThe 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 ::
real, dimension(:), pointerThe 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 ::
real, dimension(:), pointerThe 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 ::
character(len=40)The units that are used in labeling the x coordinate axes.% y_axis_units ::
character(len=40)The units that are used in labeling the y coordinate axes.% x_ax_unit_short ::
character(len=40)A short description of the x-axis units for documenting parameter units.% y_ax_unit_short ::
character(len=40)A short description of the y-axis units for documenting parameter units.% bathyt ::
real, dimension(:,:), allocatableOcean bottom depth, referenced to a zero reference height at tracer points.% meansl ::
real, dimension(:,:), allocatableSpatially varying time mean sea level, referenced to a zero reference height.% bathymetry_at_vel ::
logicalIf 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 ::
real, dimension(:,:), allocatableTopographic depths at u-points at which the flow is blocked [Z ~> m].% dopen_u ::
real, dimension(:,:), allocatableTopographic depths at u-points at which the flow is open at width dy_Cu [Z ~> m].% dblock_v ::
real, dimension(:,:), allocatableTopographic depths at v-points at which the flow is blocked [Z ~> m].% dopen_v ::
real, dimension(:,:), allocatableTopographic depths at v-points at which the flow is open at width dx_Cv [Z ~> m].% coriolisbu ::
real, dimension(:,:), allocatableThe Coriolis parameter at corner points [T-1 ~> s-1].% coriolis2bu ::
real, dimension(:,:), allocatableThe square of the Coriolis parameter at corner points [T-2 ~> s-2].% df_dx ::
real, dimension(:,:), allocatableDerivative d/dx f (Coriolis parameter) at h-points [T-1 L-1 ~> s-1 m-1].% df_dy ::
real, dimension(:,:), allocatableDerivative d/dy f (Coriolis parameter) at h-points [T-1 L-1 ~> s-1 m-1].% areat_global ::
realGlobal sum of h-cell area [L2 ~> m2].% iareat_global ::
realGlobal sum of inverse h-cell area (1/areaT_global) [L-2 ~> m-2].% grid_unit_to_l ::
realA 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 ::
realThe latitude (or y-coordinate) of the first v-line [degrees_N] or [km] or [m].% west_lon ::
realThe longitude (or x-coordinate) of the first u-line [degrees_E] or [km] or [m].% len_lat ::
realThe latitudinal (or y-coord) extent of physical domain [degrees_N] or [km] or [m].% len_lon ::
realThe longitudinal (or x-coord) extent of physical domain [degrees_E] or [km] or [m].% rad_earth_l ::
realThe radius of the planet in rescaled units [L ~> m].% max_depth ::
realThe maximum depth of the ocean [Z ~> m].
Function/Subroutine Documentation
- subroutine mom_dyn_horgrid/create_dyn_horgrid(G, HI, bathymetry_at_vel)
Allocate memory used by the
dyn_horgrid_type()and related structures. 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 ::
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.
- Call to:
- Called from:
mom_oda_driver_mod::init_odamom_ice_shelf::initialize_ice_shelf
- subroutine mom_dyn_horgrid/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 ::
turns[in] Number of quarter turns
- Call to:
- Called from:
- subroutine mom_dyn_horgrid/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 ::
m_in_new_units[in] The new internal representation of 1 m depth [m Z-1 ~> 1]
- Call to:
- subroutine mom_dyn_horgrid/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
- Call to:
- Called from:
- function mom_dyn_horgrid/adcroft_reciprocal(val)
Adcroft_reciprocal(x) = 1/x for |x|>0 or 0 for x=0.
- Parameters:
val ::
val[in] The value being inverted in arbitrary units [A ~> a]- Return:
undefined :: The Adcroft reciprocal of val [A-1 ~> a-1].
- Called from:
- subroutine mom_dyn_horgrid/destroy_dyn_horgrid(G)
Release memory used by the
dyn_horgrid_type()and related structures. and related structures.- Parameters:
g :: The dynamic horizontal grid type
- Call to:
- Called from: