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.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  • % gridlatt [real(:),pointer] :: The latitude of T points for the purpose of labeling the output axes. On many grids this is the same as geoLatT.

  • % gridlatb [real(:),pointer] :: The latitude of B points for the purpose of labeling the output axes. On many grids this is the same as geoLatBu.

  • % gridlont [real(:),pointer] :: The longitude of T points for the purpose of labeling the output axes. On many grids this is the same as geoLonT.

  • % gridlonb [real(:),pointer] :: The longitude of B points for the purpose of labeling the output axes. 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.

  • % bathyt [real(:,:),allocatable] :: Ocean bottom depth at tracer points, in depth units [Z ~> m].

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

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

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

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

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

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

  • % df_dy [real(:,:),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 [m2].

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

  • % south_lat [real] :: The latitude (or y-coordinate) of the first v-line.

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

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

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

  • % rad_earth [real] :: The radius of the planet [m].

  • % max_depth [real] :: The 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 :: [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

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 :: [in] The new internal representation of 1 m depth.

Call to

mom_error_handler::mom_error

Called from

mom_ice_shelf::initialize_ice_shelf

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

mom_transcribe_grid::copy_mom_grid_to_dyngrid mom_transcribe_grid::rotate_dyngrid mom_grid_initialize::set_grid_metrics

function mom_dyn_horgrid/adcroft_reciprocal(val) [real]

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

Parameters

val :: [in] The value being inverted.

Return

undefined :: The Adcroft reciprocal of val.

Called from

set_derived_dyn_horgrid

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