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.

More…

Data Types

dyn_horgrid_type

Describes the horizontal ocean grid with only dynamic memory arrays.

Functions/Subroutines

create_dyn_horgrid()

Allocate memory used by the dyn_horgrid_type() and related structures.

rotate_dyn_horgrid()

Copy the rotated contents of one horizontal grid type into another.

rescale_dyn_horgrid_bathymetry()

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()

set_derived_dyn_horgrid calculates metric terms that are derived from other metrics.

adcroft_reciprocal()

Adcroft_reciprocal(x) = 1/x for |x|>0 or 0 for x=0.

destroy_dyn_horgrid()

Release memory used by the dyn_horgrid_type() and related structures.

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), pointer Ocean model domain.

  • % domain_aux :: type(mom_domain_type), pointer A non-symmetric auxiliary domain type.

  • % hi :: type(hor_index_type) Horizontal index ranges.

  • % isc :: integer The start i-index of cell centers within the computational domain.

  • % iec :: integer The end i-index of cell centers within the computational domain.

  • % jsc :: integer The start j-index of cell centers within the computational domain.

  • % jec :: integer The end j-index of cell centers within the computational domain.

  • % isd :: integer The start i-index of cell centers within the data domain.

  • % ied :: integer The end i-index of cell centers within the data domain.

  • % jsd :: integer The start j-index of cell centers within the data domain.

  • % jed :: integer The end j-index of cell centers within the data domain.

  • % isg :: integer The start i-index of cell centers within the global domain.

  • % ieg :: integer The end i-index of cell centers within the global domain.

  • % jsg :: integer The start j-index of cell centers within the global domain.

  • % jeg :: integer The end j-index of cell centers within the global domain.

  • % iscb :: integer The start i-index of cell vertices within the computational domain.

  • % iecb :: integer The end i-index of cell vertices within the computational domain.

  • % jscb :: integer The start j-index of cell vertices within the computational domain.

  • % jecb :: integer The end j-index of cell vertices within the computational domain.

  • % isdb :: integer The start i-index of cell vertices within the data domain.

  • % iedb :: integer The end i-index of cell vertices within the data domain.

  • % jsdb :: integer The start j-index of cell vertices within the data domain.

  • % jedb :: integer The end j-index of cell vertices within the data domain.

  • % isgb :: integer The start i-index of cell vertices within the global domain.

  • % iegb :: integer The end i-index of cell vertices within the global domain.

  • % jsgb :: integer The start j-index of cell vertices within the global domain.

  • % jegb :: integer The end j-index of cell vertices within the global domain.

  • % isd_global :: integer The value of isd in the global index space (decompoistion invariant).

  • % jsd_global :: integer The value of isd in the global index space (decompoistion invariant).

  • % idg_offset :: integer The offset between the corresponding global and local i-indices.

  • % jdg_offset :: integer The offset between the corresponding global and local j-indices.

  • % symmetric :: logical True if symmetric memory is used.

  • % nonblocking_updates :: logical If true, non-blocking halo updates are allowed. The default is .false. (for now).

  • % first_direction :: integer 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 :: real, dimension(:,:), allocatable 0 for land points and 1 for ocean points on the h-grid [nondim].

  • % geolatt :: real, dimension(:,:), allocatable The geographic latitude at q points [degrees of latitude] or [m].

  • % geolont :: real, dimension(:,:), allocatable The geographic longitude at q points [degrees of longitude] or [m].

  • % dxt :: real, dimension(:,:), allocatable dxT is delta x at h points [L ~> m].

  • % idxt :: real, dimension(:,:), allocatable 1/dxT [L-1 ~> m-1].

  • % dyt :: real, dimension(:,:), allocatable dyT is delta y at h points [L ~> m].

  • % idyt :: real, dimension(:,:), allocatable IdyT is 1/dyT [L-1 ~> m-1].

  • % areat :: real, dimension(:,:), allocatable The area of an h-cell [L2 ~> m2].

  • % iareat :: real, dimension(:,:), allocatable 1/areaT [L-2 ~> m-2].

  • % sin_rot :: real, dimension(:,:), allocatable The sine of the angular rotation between the local model grid’s northward and the true northward directions [nondim].

  • % cos_rot :: real, dimension(:,:), allocatable The cosine of the angular rotation between the local model grid’s northward and the true northward directions [nondim].

  • % mask2dcu :: real, dimension(:,:), allocatable 0 for boundary points and 1 for ocean points on the u grid [nondim].

  • % obcmaskcu :: real, dimension(:,:), allocatable 0 for boundary or OBC points and 1 for ocean points on the u grid [nondim].

  • % geolatcu :: real, dimension(:,:), allocatable The geographic latitude at u points [degrees of latitude] or [m].

  • % geoloncu :: real, dimension(:,:), allocatable The geographic longitude at u points [degrees of longitude] or [m].

  • % dxcu :: real, dimension(:,:), allocatable dxCu is delta x at u points [L ~> m].

  • % idxcu :: real, dimension(:,:), allocatable 1/dxCu [L-1 ~> m-1].

  • % idxcu_obcmask :: real, dimension(:,:), allocatable 1/dxCu or 0 at boundary or OBC points [L-1 ~> m-1].

  • % dycu :: real, dimension(:,:), allocatable dyCu is delta y at u points [L ~> m].

  • % idycu :: real, dimension(:,:), allocatable 1/dyCu [L-1 ~> m-1].

  • % dy_cu :: real, dimension(:,:), allocatable The unblocked lengths of the u-faces of the h-cell [L ~> m].

  • % iareacu :: real, dimension(:,:), allocatable The masked inverse areas of u-grid cells [L-2 ~> m-2].

  • % areacu :: real, dimension(:,:), allocatable The areas of the u-grid cells [L2 ~> m2].

  • % mask2dcv :: real, dimension(:,:), allocatable 0 for boundary points and 1 for ocean points on the v grid [nondim].

  • % obcmaskcv :: real, dimension(:,:), allocatable 0 for boundary or OBC points and 1 for ocean points on the v grid [nondim].

  • % geolatcv :: real, dimension(:,:), allocatable The geographic latitude at v points [degrees of latitude] or [m].

  • % geoloncv :: real, dimension(:,:), allocatable The geographic longitude at v points [degrees of longitude] or [m].

  • % dxcv :: real, dimension(:,:), allocatable dxCv is delta x at v points [L ~> m].

  • % idxcv :: real, dimension(:,:), allocatable 1/dxCv [L-1 ~> m-1].

  • % dycv :: real, dimension(:,:), allocatable dyCv is delta y at v points [L ~> m].

  • % idycv :: real, dimension(:,:), allocatable 1/dyCv [L-1 ~> m-1].

  • % idycv_obcmask :: real, dimension(:,:), allocatable 1/dxCv or 0 at boundary or OBC points [L-1 ~> m-1].

  • % dx_cv :: real, dimension(:,:), allocatable The unblocked lengths of the v-faces of the h-cell [L ~> m].

  • % iareacv :: real, dimension(:,:), allocatable The masked inverse areas of v-grid cells [L-2 ~> m-2].

  • % areacv :: real, dimension(:,:), allocatable The areas of the v-grid cells [L2 ~> m2].

  • % porous_dminu :: real, dimension(:,:), allocatable minimum topographic height (deepest) of U-face [Z ~> m]

  • % porous_dmaxu :: real, dimension(:,:), allocatable maximum topographic height (shallowest) of U-face [Z ~> m]

  • % porous_davgu :: real, dimension(:,:), allocatable average topographic height of U-face [Z ~> m]

  • % porous_dminv :: real, dimension(:,:), allocatable minimum topographic height (deepest) of V-face [Z ~> m]

  • % porous_dmaxv :: real, dimension(:,:), allocatable maximum topographic height (shallowest) of V-face [Z ~> m]

  • % porous_davgv :: real, dimension(:,:), allocatable average topographic height of V-face [Z ~> m]

  • % mask2dbu :: real, dimension(:,:), allocatable 0 for boundary points and 1 for ocean points on the q grid [nondim].

  • % geolatbu :: real, dimension(:,:), allocatable The geographic latitude at q points [degrees of latitude] or [m].

  • % geolonbu :: real, dimension(:,:), allocatable The geographic longitude at q points [degrees of longitude] or [m].

  • % dxbu :: real, dimension(:,:), allocatable dxBu is delta x at q points [L ~> m].

  • % idxbu :: real, dimension(:,:), allocatable 1/dxBu [L-1 ~> m-1].

  • % dybu :: real, dimension(:,:), allocatable dyBu is delta y at q points [L ~> m].

  • % idybu :: real, dimension(:,:), allocatable 1/dyBu [L-1 ~> m-1].

  • % areabu :: real, dimension(:,:), allocatable areaBu is the area of a q-cell [L ~> m]

  • % iareabu :: real, dimension(:,:), allocatable IareaBu = 1/areaBu [L-2 ~> m-2].

  • % gridlatt :: real, dimension(:), pointer 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 :: real, dimension(:), pointer 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 :: real, dimension(:), pointer 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 :: real, dimension(:), pointer 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 :: 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(:,:), allocatable Ocean bottom depth, referenced to a zero reference height at tracer points.

  • % meansl :: real, dimension(:,:), allocatable Spatially varying time mean sea level, referenced to a zero reference height.

  • % bathymetry_at_vel :: logical 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 :: real, dimension(:,:), allocatable Topographic depths at u-points at which the flow is blocked [Z ~> m].

  • % dopen_u :: real, dimension(:,:), allocatable Topographic depths at u-points at which the flow is open at width dy_Cu [Z ~> m].

  • % dblock_v :: real, dimension(:,:), allocatable Topographic depths at v-points at which the flow is blocked [Z ~> m].

  • % dopen_v :: real, dimension(:,:), allocatable Topographic depths at v-points at which the flow is open at width dx_Cv [Z ~> m].

  • % coriolisbu :: real, dimension(:,:), allocatable The Coriolis parameter at corner points [T-1 ~> s-1].

  • % coriolis2bu :: real, dimension(:,:), allocatable The square of the Coriolis parameter at corner points [T-2 ~> s-2].

  • % df_dx :: real, dimension(:,:), allocatable Derivative d/dx f (Coriolis parameter) at h-points [T-1 L-1 ~> s-1 m-1].

  • % df_dy :: real, dimension(:,:), allocatable Derivative d/dy f (Coriolis parameter) at h-points [T-1 L-1 ~> s-1 m-1].

  • % areat_global :: real Global sum of h-cell area [L2 ~> m2].

  • % iareat_global :: real Global sum of inverse h-cell area (1/areaT_global) [L-2 ~> m-2].

  • % grid_unit_to_l :: real 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 :: real The latitude (or y-coordinate) of the first v-line [degrees_N] or [km] or [m].

  • % west_lon :: real The longitude (or x-coordinate) of the first u-line [degrees_E] or [km] or [m].

  • % len_lat :: real The latitudinal (or y-coord) extent of physical domain [degrees_N] or [km] or [m].

  • % len_lon :: real The longitudinal (or x-coord) extent of physical domain [degrees_E] or [km] or [m].

  • % rad_earth_l :: real The radius of the planet in rescaled units [L ~> m].

  • % max_depth :: real The maximum depth of the ocean [Z ~> m].

[source]

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:

mom_error_handler::mom_error

Called from:

mom_oda_driver_mod::init_oda mom_ice_shelf::initialize_ice_shelf

[source]

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:

set_derived_dyn_horgrid

Called from:

mom::initialize_mom

[source]

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:

mom_error_handler::mom_error

[source]

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:

adcroft_reciprocal

Called from:

rotate_dyn_horgrid mom_grid_initialize::set_grid_metrics

[source]

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:

set_derived_dyn_horgrid

[source]

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:

mom_error_handler::mom_error

Called from:

mom_ice_shelf::initialize_ice_shelf

[source]

[source]