|
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.
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, HI, global_indexing, bathymetry_at_vel) |
| MOM_grid_init initializes the ocean grid array sizes and grid memory. More... | |
| subroutine, public | set_derived_metrics (G) |
| 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) |
| 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 398 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 448 of file MOM_grid.F90.
Referenced by mom_grid_init().
| 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 406 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 521 of file MOM_grid.F90.
Referenced by mom::initialize_mom().
| subroutine, public mom_grid::mom_grid_init | ( | type(ocean_grid_type), intent(inout) | G, |
| type(param_file_type), intent(in) | param_file, | ||
| 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 |
| [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 176 of file MOM_grid.F90.
References allocate_metrics(), mom_domains::get_domain_extent(), mom_hor_index::hor_index_init(), mom_error_handler::mom_error(), and mom_error_handler::mom_mesg().
Referenced by mom::initialize_mom().
| subroutine, public mom_grid::set_derived_metrics | ( | type(ocean_grid_type), intent(inout) | G | ) |
set_derived_metrics calculates metric terms that are derived from other metrics.
| [in,out] | g | The horizontal grid structure |
Definition at line 353 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 | ||
| ) |