MOM6
|
Provides the ocean grid type.
Grid metrics and their inverses are labelled according to their staggered location on a Arakawa C (or B) grid.
location on an T-cell and around a q-point."
Areas centered at T-, u-, v- and q- points are areaT
, areaCu
, areaCv
and areaBu
respectively.
The reciprocal of metrics are pre-calculated and also stored in the ocean_grid_type with a I prepended to the name. For example, 1./areaT
is called IareaT
, and 1./dyCv
is IdyCv
.
Geographic latitude and longitude (or model coordinates if not on a sphere) are stored in geoLatT
, geoLonT
for T-points. u-, v- and q- point coordinates are follow same pattern of replacing T with Cu, Cv and Bu respectively.
Each location also has a 2D mask indicating whether the entire column is land or ocean. mask2dT
is 1 if the column is wet or 0 if the T-cell is land. mask2dCu
is 1 if both neighboring column are ocean, and 0 if either is land.
Data Types | |
type | ocean_grid_type |
Ocean grid type. See mom_grid for details. More... | |
Functions/Subroutines | |
subroutine, public | mom_grid_init (G, param_file, US, HI, global_indexing, bathymetry_at_vel) |
MOM_grid_init initializes the ocean grid array sizes and grid memory. More... | |
subroutine, public | rescale_grid_bathymetry (G, m_in_new_units) |
rescale_grid_bathymetry permits a change in the internal units for the bathymetry on the grid, both rescaling the depths and recording the new internal units. More... | |
subroutine, public | set_derived_metrics (G, US) |
set_derived_metrics calculates metric terms that are derived from other metrics. More... | |
real function | adcroft_reciprocal (val) |
Adcroft_reciprocal(x) = 1/x for |x|>0 or 0 for x=0. More... | |
logical function, public | ispointincell (G, i, j, x, y) |
Returns true if the coordinates (x,y) are within the h-cell (i,j) More... | |
subroutine, public | set_first_direction (G, y_first) |
Store an integer indicating which direction to work on first. More... | |
subroutine, public | get_global_grid_size (G, niglobal, njglobal) |
Return global shape of horizontal grid. More... | |
subroutine | allocate_metrics (G) |
Allocate memory used by the ocean_grid_type and related structures. More... | |
subroutine, public | mom_grid_end (G) |
Release memory used by the ocean_grid_type and related structures. More... | |
|
private |
Adcroft_reciprocal(x) = 1/x for |x|>0 or 0 for x=0.
[in] | val | The value being inverted. |
Definition at line 459 of file MOM_grid.F90.
Referenced by set_derived_metrics().
|
private |
Allocate memory used by the ocean_grid_type and related structures.
[in,out] | g | The horizontal grid type |
Definition at line 520 of file MOM_grid.F90.
Referenced by mom_grid_init().
subroutine, public mom_grid::get_global_grid_size | ( | type(ocean_grid_type), intent(inout) | G, |
integer, intent(out) | niglobal, | ||
integer, intent(out) | njglobal | ||
) |
Return global shape of horizontal grid.
[in,out] | g | The horizontal grid type |
[out] | niglobal | i-index global size of grid |
[out] | njglobal | j-index global size of grid |
Definition at line 510 of file MOM_grid.F90.
References mom_domains::get_global_shape().
Referenced by mom_cap_mod::initializerealize(), ocn_comp_mct::ocn_init_mct(), and ocn_comp_mct::ocn_setgsmap_mct().
logical function, public mom_grid::ispointincell | ( | type(ocean_grid_type), intent(in) | G, |
integer, intent(in) | i, | ||
integer, intent(in) | j, | ||
real, intent(in) | x, | ||
real, intent(in) | y | ||
) |
Returns true if the coordinates (x,y) are within the h-cell (i,j)
[in] | g | Grid type |
[in] | i | i index of cell to test |
[in] | j | j index of cell to test |
[in] | x | x coordinate of point |
[in] | y | y coordinate of point |
Definition at line 467 of file MOM_grid.F90.
subroutine, public mom_grid::mom_grid_end | ( | type(ocean_grid_type), intent(inout) | G | ) |
Release memory used by the ocean_grid_type and related structures.
[in,out] | g | The horizontal grid type |
Definition at line 591 of file MOM_grid.F90.
subroutine, public mom_grid::mom_grid_init | ( | type(ocean_grid_type), intent(inout) | G, |
type(param_file_type), intent(in) | param_file, | ||
type(unit_scale_type), optional, pointer | US, | ||
type(hor_index_type), intent(in), optional | HI, | ||
logical, intent(in), optional | global_indexing, | ||
logical, intent(in), optional | bathymetry_at_vel | ||
) |
MOM_grid_init initializes the ocean grid array sizes and grid memory.
[in,out] | g | The horizontal grid type |
[in] | param_file | Parameter file handle |
us | A dimensional unit scaling type | |
[in] | hi | A hor_index_type for array extents |
[in] | global_indexing | If true use global index values instead of having the data domain on each processor start at 1. |
[in] | bathymetry_at_vel | If true, there are separate values for the ocean bottom depths at velocity points. Otherwise the effects of topography are entirely determined from thickness points. |
Definition at line 184 of file MOM_grid.F90.
References allocate_metrics(), mom_domains::get_domain_extent_dsamp2(), mom_hor_index::hor_index_init(), mom_error_handler::mom_error(), and mom_error_handler::mom_mesg().
Referenced by mom_oda_driver_mod::init_oda(), and mom_ice_shelf::initialize_ice_shelf().
subroutine, public mom_grid::rescale_grid_bathymetry | ( | type(ocean_grid_type), intent(inout) | G, |
real, intent(in) | m_in_new_units | ||
) |
rescale_grid_bathymetry permits a change in the internal units for the bathymetry on the grid, both rescaling the depths and recording the new internal units.
[in,out] | g | The horizontal grid structure |
[in] | m_in_new_units | The new internal representation of 1 m depth. |
Definition at line 381 of file MOM_grid.F90.
References mom_error_handler::mom_error().
subroutine, public mom_grid::set_derived_metrics | ( | type(ocean_grid_type), intent(inout) | G, |
type(unit_scale_type), intent(in) | US | ||
) |
set_derived_metrics calculates metric terms that are derived from other metrics.
[in,out] | g | The horizontal grid structure |
[in] | us | A dimensional unit scaling type |
Definition at line 413 of file MOM_grid.F90.
References adcroft_reciprocal().
Referenced by mom_transcribe_grid::copy_dyngrid_to_mom_grid().
subroutine, public mom_grid::set_first_direction | ( | type(ocean_grid_type), intent(inout) | G, |
integer, intent(in) | y_first | ||
) |
Store an integer indicating which direction to work on first.
[in,out] | g | The ocean's grid structure |
[in] | y_first | The first direction to store |
Definition at line 502 of file MOM_grid.F90.
Referenced by mom::initialize_mom().