MOM_grid_initialize module reference

Initializes horizontal grid

Data Types

GPS

Global positioning system (aka container for information to describe the grid)

Functions/Subroutines

set_grid_metrics

set_grid_metrics is used to set the primary values in the model's horizontal grid. The bathymetry, land-sea mask and any restricted channel widths are not known yet, so these are set later.

grid_metrics_chksum

grid_metrics_chksum performs a set of checksums on metrics on the grid for debugging.

set_grid_metrics_from_mosaic

Sets the grid metrics from a mosaic file.

set_grid_metrics_cartesian

Calculate the values of the metric terms for a Cartesian grid that might be used and save them in arrays.

set_grid_metrics_spherical

Calculate the values of the metric terms that might be used and save them in arrays.

set_grid_metrics_mercator

Calculate the values of the metric terms that might be used and save them in arrays.

ds_di

This function returns the grid spacing in the logical x direction in [L ~> m].

ds_dj

This function returns the grid spacing in the logical y direction in [L ~> m].

dL

This function returns the contribution from the line integral along one of the four sides of a cell face to the area of a cell, in [radians2], assuming that the sides follow a linear path in latitude and longitude (i.e., on a Mercator grid).

find_root

This subroutine finds and returns the value of y at which the monotonically increasing function fn takes the value fnval, also returning in ittmax the number of iterations of Newton's method that were used to polish the root.

dx_di

This function calculates and returns the value of dx/di in [radian gridpoint-1], where x is the longitude in Radians, and i is the integral east-west grid index.

Int_di_dx

This function calculates and returns the integral of the inverse of dx/di to the point x, in radians [gridpoints]

dy_dj

This subroutine calculates and returns the value of dy/dj in [radian gridpoint-1], where y is the latitude in Radians, and j is the integral north-south grid index.

Int_dj_dy

This subroutine calculates and returns the integral of the inverse of dy/dj to the point y in radians [gridpoints]

extrapolate_metric

Extrapolates missing metric data into all the halo regions.

Adcroft_reciprocal

This function implements Adcroft's rule for reciprocals, namely that Adcroft_Inv(x) = 1/x for |x|>0 or 0 for x=0.

initialize_masks

Initializes the grid masks and any metrics that come with masks already applied.

Detailed Description

The metric terms have the form Dzp, IDzp, or DXDYp, where z can be X or Y, and p can be q, u, v, or h. z describes the direction of the metric, while p describes the location. IDzp is the inverse of Dzp, while DXDYp is the product of DXp and DYp except that areaT is calculated analytically from the latitudes and longitudes of the surrounding q points.

On a sphere, a variety of grids can be implemented by defining analytic expressions for dx_di, dy_dj (where x and y are latitude and longitude, and i and j are grid indices) and the expressions for the integrals of their inverses in the four subroutines dy_dj, Int_dj_dy, dx_di, and Int_di_dx.

initialize_masks sets up land masks based on the depth field. The one argument is the minimum ocean depth. Depths that are less than this are interpreted as land points.

Type Documentation

type, private :: GPS

Global positioning system (aka container for information to describe the grid)

Parameters
  • len_lon

    The longitudinal or x-direction length of the domain [degrees_E] or [km] or [m].

  • len_lat

    The latitudinal or y-direction length of the domain [degrees_N] or [km] or [m].

  • west_lon

    The western longitude of the domain or the equivalent starting value for the x-axis [degrees_E] or [km] or [m].

  • south_lat

    The southern latitude of the domain or the equivalent starting value for the y-axis [degrees_N] or [km] or [m].

  • Rad_Earth_L

    The radius of the Earth in rescaled units [L ~> m]

  • Lat_enhance_factor

    The amount by which the meridional resolution is enhanced within LAT_EQ_ENHANCE of the equator [nondim]

  • Lat_eq_enhance

    The latitude range to the north and south of the equator over which the resolution is enhanced [degrees_N]

  • isotropic

    If true, an isotropic grid on a sphere (also known as a Mercator grid) is used. With an isotropic grid, the meridional extent of the domain (LENLAT), the zonal extent (LENLON), and the number of grid points in each direction are _not_ independent. In MOM the meridional extent is determined to fit the zonal extent and the number of grid points, while grid is perfectly isotropic.

  • equator_reference

    If true, the grid is defined to have the equator at the nearest q- or h- grid point to (-LOWLAT*NJGLOBAL/LENLAT).

  • niglobal

    The number of i-points in the global grid computational domain

  • njglobal

    The number of j-points in the global grid computational domain

Functions/Subroutine Documentation

subroutine set_grid_metrics(G, param_file, US)

set_grid_metrics is used to set the primary values in the model's horizontal grid. The bathymetry, land-sea mask and any restricted channel widths are not known yet, so these are set later.

Parameters
  • G [inout]

    The dynamic horizontal grid type

  • param_file [in]

    Parameter file structure

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_grid_initialize::set_grid_metrics calls cluster_mom_dyn_horgrid MOM_dyn_horgrid cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_grid_initialize MOM_grid_initialize mom_dyn_horgrid::set_derived_dyn_horgrid set_derived_dyn_horgrid mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_error_handler::mom_error MOM_error mom_file_parser::interface::get_param get_param (interface) mom_file_parser::interface::log_version log_version (interface) mom_grid_initialize::grid_metrics_chksum grid_metrics_chksum [private/internal] mom_grid_initialize::set_grid_metrics set_grid_metrics mom_grid_initialize::set_grid_metrics->mom_dyn_horgrid::set_derived_dyn_horgrid mom_grid_initialize::set_grid_metrics->mom_error_handler::calltree_enter mom_grid_initialize::set_grid_metrics->mom_error_handler::calltree_leave mom_grid_initialize::set_grid_metrics->mom_error_handler::mom_error mom_grid_initialize::set_grid_metrics->mom_file_parser::interface::get_param mom_grid_initialize::set_grid_metrics->mom_file_parser::interface::log_version mom_grid_initialize::set_grid_metrics->mom_grid_initialize::grid_metrics_chksum mom_grid_initialize::set_grid_metrics_cartesian set_grid_metrics_cartesian [private/internal] mom_grid_initialize::set_grid_metrics->mom_grid_initialize::set_grid_metrics_cartesian mom_grid_initialize::set_grid_metrics_from_mosaic set_grid_metrics_from_mosaic [private/internal] mom_grid_initialize::set_grid_metrics->mom_grid_initialize::set_grid_metrics_from_mosaic mom_grid_initialize::set_grid_metrics_mercator set_grid_metrics_mercator [private/internal] mom_grid_initialize::set_grid_metrics->mom_grid_initialize::set_grid_metrics_mercator mom_grid_initialize::set_grid_metrics_spherical set_grid_metrics_spherical [private/internal] mom_grid_initialize::set_grid_metrics->mom_grid_initialize::set_grid_metrics_spherical
Text view
Callers call graph
Callers of mom_grid_initialize::set_grid_metrics calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_grid_initialize MOM_grid_initialize cluster_mom_ice_shelf MOM_ice_shelf cluster_mom_oda_driver_mod MOM_oda_driver_mod mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_grid_initialize::set_grid_metrics set_grid_metrics mom_fixed_initialization::mom_initialize_fixed->mom_grid_initialize::set_grid_metrics mom_ice_shelf::initialize_ice_shelf initialize_ice_shelf mom_ice_shelf::initialize_ice_shelf->mom_grid_initialize::set_grid_metrics mom_oda_driver_mod::init_oda init_oda mom_oda_driver_mod::init_oda->mom_grid_initialize::set_grid_metrics
Text view
subroutine grid_metrics_chksum(parent, G, US)

grid_metrics_chksum performs a set of checksums on metrics on the grid for debugging.

Parameters
  • parent [in]

    A string identifying the caller

  • G [in]

    The dynamic horizontal grid type

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_grid_initialize::grid_metrics_chksum calls cluster_mom_checksums MOM_checksums cluster_mom_grid_initialize MOM_grid_initialize mom_checksums::interface::bchksum Bchksum (interface) mom_checksums::interface::bchksum_pair Bchksum_pair (interface) mom_checksums::interface::hchksum hchksum (interface) mom_checksums::interface::hchksum_pair hchksum_pair (interface) mom_checksums::interface::uvchksum uvchksum (interface) mom_grid_initialize::grid_metrics_chksum grid_metrics_chksum [private/internal] mom_grid_initialize::grid_metrics_chksum->mom_checksums::interface::bchksum mom_grid_initialize::grid_metrics_chksum->mom_checksums::interface::bchksum_pair mom_grid_initialize::grid_metrics_chksum->mom_checksums::interface::hchksum mom_grid_initialize::grid_metrics_chksum->mom_checksums::interface::hchksum_pair mom_grid_initialize::grid_metrics_chksum->mom_checksums::interface::uvchksum
Text view
Callers call graph
Callers of mom_grid_initialize::grid_metrics_chksum calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::grid_metrics_chksum grid_metrics_chksum [private/internal] mom_grid_initialize::set_grid_metrics set_grid_metrics mom_grid_initialize::set_grid_metrics->mom_grid_initialize::grid_metrics_chksum
Text view
subroutine set_grid_metrics_from_mosaic(G, param_file, US)

Sets the grid metrics from a mosaic file.

Parameters
  • G [inout]

    The dynamic horizontal grid type

  • param_file [in]

    Parameter file structure

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_grid_initialize::set_grid_metrics_from_mosaic calls cluster_mom_coms_infra MOM_coms_infra cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_error_infra MOM_error_infra cluster_mom_file_parser MOM_file_parser cluster_mom_grid_initialize MOM_grid_initialize cluster_mom_io MOM_io cluster_mom_io_infra MOM_io_infra cluster_mom_string_functions MOM_string_functions mom_coms_infra::interface::broadcast broadcast (interface) mom_coms_infra::root_pe root_PE mom_domain_infra::deallocate_mom_domain deallocate_MOM_domain mom_domain_infra::interface::clone_mom_domain clone_MOM_domain (interface) mom_domain_infra::interface::pass_var pass_var (interface) mom_domain_infra::interface::pass_vector pass_vector (interface) mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_error_handler::mom_error MOM_error mom_error_infra::is_root_pe is_root_pe mom_file_parser::interface::get_param get_param (interface) mom_file_parser::interface::log_param log_param (interface) mom_grid_initialize::extrapolate_metric extrapolate_metric [private/internal] mom_grid_initialize::set_grid_metrics_from_mosaic set_grid_metrics_from_mosaic [private/internal] mom_grid_initialize::set_grid_metrics_from_mosaic->mom_coms_infra::interface::broadcast mom_grid_initialize::set_grid_metrics_from_mosaic->mom_coms_infra::root_pe mom_grid_initialize::set_grid_metrics_from_mosaic->mom_domain_infra::deallocate_mom_domain mom_grid_initialize::set_grid_metrics_from_mosaic->mom_domain_infra::interface::clone_mom_domain mom_grid_initialize::set_grid_metrics_from_mosaic->mom_domain_infra::interface::pass_var mom_grid_initialize::set_grid_metrics_from_mosaic->mom_domain_infra::interface::pass_vector mom_grid_initialize::set_grid_metrics_from_mosaic->mom_error_handler::calltree_enter mom_grid_initialize::set_grid_metrics_from_mosaic->mom_error_handler::calltree_leave mom_grid_initialize::set_grid_metrics_from_mosaic->mom_error_handler::mom_error mom_grid_initialize::set_grid_metrics_from_mosaic->mom_error_infra::is_root_pe mom_grid_initialize::set_grid_metrics_from_mosaic->mom_file_parser::interface::get_param mom_grid_initialize::set_grid_metrics_from_mosaic->mom_file_parser::interface::log_param mom_grid_initialize::set_grid_metrics_from_mosaic->mom_grid_initialize::extrapolate_metric mom_io::interface::mom_read_data MOM_read_data (interface) mom_grid_initialize::set_grid_metrics_from_mosaic->mom_io::interface::mom_read_data mom_io_infra::interface::file_exists file_exists (interface) mom_grid_initialize::set_grid_metrics_from_mosaic->mom_io_infra::interface::file_exists mom_string_functions::slasher slasher mom_grid_initialize::set_grid_metrics_from_mosaic->mom_string_functions::slasher
Text view
Callers call graph
Callers of mom_grid_initialize::set_grid_metrics_from_mosaic calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::set_grid_metrics set_grid_metrics mom_grid_initialize::set_grid_metrics_from_mosaic set_grid_metrics_from_mosaic [private/internal] mom_grid_initialize::set_grid_metrics->mom_grid_initialize::set_grid_metrics_from_mosaic
Text view
subroutine set_grid_metrics_cartesian(G, param_file, US)

Calculate the values of the metric terms for a Cartesian grid that might be used and save them in arrays.

Within this subroutine, the x- and y- grid spacings and their inverses and the cell areas centered on h, q, u, and v points are calculated, as are the geographic locations of each of these 4 sets of points.

Parameters
  • G [inout]

    The dynamic horizontal grid type

  • param_file [in]

    Parameter file structure

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_grid_initialize::set_grid_metrics_cartesian calls cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_grid_initialize MOM_grid_initialize mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_file_parser::interface::get_param get_param (interface) mom_file_parser::interface::log_param log_param (interface) mom_grid_initialize::set_grid_metrics_cartesian set_grid_metrics_cartesian [private/internal] mom_grid_initialize::set_grid_metrics_cartesian->mom_error_handler::calltree_enter mom_grid_initialize::set_grid_metrics_cartesian->mom_error_handler::calltree_leave mom_grid_initialize::set_grid_metrics_cartesian->mom_file_parser::interface::get_param mom_grid_initialize::set_grid_metrics_cartesian->mom_file_parser::interface::log_param
Text view
Callers call graph
Callers of mom_grid_initialize::set_grid_metrics_cartesian calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::set_grid_metrics set_grid_metrics mom_grid_initialize::set_grid_metrics_cartesian set_grid_metrics_cartesian [private/internal] mom_grid_initialize::set_grid_metrics->mom_grid_initialize::set_grid_metrics_cartesian
Text view
subroutine set_grid_metrics_spherical(G, param_file, US)

Calculate the values of the metric terms that might be used and save them in arrays.

Within this subroutine, the x- and y- grid spacings and their inverses and the cell areas centered on h, q, u, and v points are calculated, as are the geographic locations of each of these 4 sets of points.

Parameters
  • G [inout]

    The dynamic horizontal grid type

  • param_file [in]

    Parameter file structure

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_grid_initialize::set_grid_metrics_spherical calls cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_grid_initialize MOM_grid_initialize mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_file_parser::interface::get_param get_param (interface) mom_grid_initialize::set_grid_metrics_spherical set_grid_metrics_spherical [private/internal] mom_grid_initialize::set_grid_metrics_spherical->mom_error_handler::calltree_enter mom_grid_initialize::set_grid_metrics_spherical->mom_error_handler::calltree_leave mom_grid_initialize::set_grid_metrics_spherical->mom_file_parser::interface::get_param
Text view
Callers call graph
Callers of mom_grid_initialize::set_grid_metrics_spherical calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::set_grid_metrics set_grid_metrics mom_grid_initialize::set_grid_metrics_spherical set_grid_metrics_spherical [private/internal] mom_grid_initialize::set_grid_metrics->mom_grid_initialize::set_grid_metrics_spherical
Text view
subroutine set_grid_metrics_mercator(G, param_file, US)

Calculate the values of the metric terms that might be used and save them in arrays.

Within this subroutine, the x- and y- grid spacings and their inverses and the cell areas centered on h, q, u, and v points are calculated, as are the geographic locations of each of these 4 sets of points.

Parameters
  • G [inout]

    The dynamic horizontal grid type

  • param_file [in]

    Parameter file structure

  • US [in]

    A dimensional unit scaling type

Callees call graph
Callees of mom_grid_initialize::set_grid_metrics_mercator calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_grid_initialize MOM_grid_initialize mom_domain_infra::interface::pass_var pass_var (interface) mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_file_parser::interface::get_param get_param (interface) mom_grid_initialize::dl dL [private/internal] mom_grid_initialize::ds_di ds_di [private/internal] mom_grid_initialize::ds_dj ds_dj [private/internal] mom_grid_initialize::find_root find_root [private/internal] mom_grid_initialize::int_di_dx Int_di_dx [private/internal] mom_grid_initialize::int_dj_dy Int_dj_dy [private/internal] mom_grid_initialize::set_grid_metrics_mercator set_grid_metrics_mercator [private/internal] mom_grid_initialize::set_grid_metrics_mercator->mom_domain_infra::interface::pass_var mom_grid_initialize::set_grid_metrics_mercator->mom_error_handler::calltree_enter mom_grid_initialize::set_grid_metrics_mercator->mom_error_handler::calltree_leave mom_grid_initialize::set_grid_metrics_mercator->mom_file_parser::interface::get_param mom_grid_initialize::set_grid_metrics_mercator->mom_grid_initialize::dl mom_grid_initialize::set_grid_metrics_mercator->mom_grid_initialize::ds_di mom_grid_initialize::set_grid_metrics_mercator->mom_grid_initialize::ds_dj mom_grid_initialize::set_grid_metrics_mercator->mom_grid_initialize::find_root mom_grid_initialize::set_grid_metrics_mercator->mom_grid_initialize::int_di_dx mom_grid_initialize::set_grid_metrics_mercator->mom_grid_initialize::int_dj_dy
Text view
Callers call graph
Callers of mom_grid_initialize::set_grid_metrics_mercator calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::set_grid_metrics set_grid_metrics mom_grid_initialize::set_grid_metrics_mercator set_grid_metrics_mercator [private/internal] mom_grid_initialize::set_grid_metrics->mom_grid_initialize::set_grid_metrics_mercator
Text view
function ds_di(x, y, GP)

This function returns the grid spacing in the logical x direction in [L ~> m].

Parameters
  • x [in]

    The longitude in question [radians]

  • y [in]

    The latitude in question [radians]

  • GP [in]

    A structure of grid parameters

Callees call graph
Callees of mom_grid_initialize::ds_di calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::ds_di ds_di [private/internal] mom_grid_initialize::dx_di dx_di [private/internal] mom_grid_initialize::ds_di->mom_grid_initialize::dx_di
Text view
Callers call graph
Callers of mom_grid_initialize::ds_di calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::ds_di ds_di [private/internal] mom_grid_initialize::set_grid_metrics_mercator set_grid_metrics_mercator [private/internal] mom_grid_initialize::set_grid_metrics_mercator->mom_grid_initialize::ds_di
Text view
function ds_dj(x, y, GP)

This function returns the grid spacing in the logical y direction in [L ~> m].

Parameters
  • x [in]

    The longitude in question [radians]

  • y [in]

    The latitude in question [radians]

  • GP [in]

    A structure of grid parameters

Callees call graph
Callees of mom_grid_initialize::ds_dj calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::ds_dj ds_dj [private/internal] mom_grid_initialize::dy_dj dy_dj [private/internal] mom_grid_initialize::ds_dj->mom_grid_initialize::dy_dj
Text view
Callers call graph
Callers of mom_grid_initialize::ds_dj calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::ds_dj ds_dj [private/internal] mom_grid_initialize::set_grid_metrics_mercator set_grid_metrics_mercator [private/internal] mom_grid_initialize::set_grid_metrics_mercator->mom_grid_initialize::ds_dj
Text view
function dL(x1, x2, y1, y2)

This function returns the contribution from the line integral along one of the four sides of a cell face to the area of a cell, in [radians2], assuming that the sides follow a linear path in latitude and longitude (i.e., on a Mercator grid).

Parameters
  • x1 [in]

    Segment starting longitude [radians]

  • x2 [in]

    Segment ending longitude [radians]

  • y1 [in]

    Segment starting latitude [radians]

  • y2 [in]

    Segment ending latitude [radians]

Callers call graph
Callers of mom_grid_initialize::dl calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::dl dL [private/internal] mom_grid_initialize::set_grid_metrics_mercator set_grid_metrics_mercator [private/internal] mom_grid_initialize::set_grid_metrics_mercator->mom_grid_initialize::dl
Text view
function find_root(fn, dy_df, GP, fnval, y1, ymin, ymax, ittmax)

This subroutine finds and returns the value of y at which the monotonically increasing function fn takes the value fnval, also returning in ittmax the number of iterations of Newton's method that were used to polish the root.

Parameters
  • find_root

    The value of y where fn(y) = fnval that will be returned [radians]

  • fn

    The external function whose root is being sought [gridpoints]

  • dy_df

    The inverse of the derivative of that function [radian gridpoint-1]

  • GP [in]

    A structure of grid parameters

  • fnval [in]

    The value of fn being sought [gridpoints]

  • y1 [in]

    A first guess for y [radians]

  • ymin [in]

    The minimum permitted value of y [radians]

  • ymax [in]

    The maximum permitted value of y [radians]

  • ittmax [out]

    The number of iterations used to polish the root

Callees call graph
Callees of mom_grid_initialize::find_root calls cluster_mom_coms_infra MOM_coms_infra cluster_mom_error_handler MOM_error_handler cluster_mom_grid_initialize MOM_grid_initialize mom_coms_infra::pe_here PE_here mom_error_handler::mom_error MOM_error mom_grid_initialize::find_root find_root [private/internal] mom_grid_initialize::find_root->mom_coms_infra::pe_here mom_grid_initialize::find_root->mom_error_handler::mom_error
Text view
Callers call graph
Callers of mom_grid_initialize::find_root calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::find_root find_root [private/internal] mom_grid_initialize::set_grid_metrics_mercator set_grid_metrics_mercator [private/internal] mom_grid_initialize::set_grid_metrics_mercator->mom_grid_initialize::find_root
Text view
function dx_di(x, GP)

This function calculates and returns the value of dx/di in [radian gridpoint-1], where x is the longitude in Radians, and i is the integral east-west grid index.

Parameters
  • x [in]

    The longitude in question [radians]

  • GP [in]

    A structure of grid parameters

Callers call graph
Callers of mom_grid_initialize::dx_di calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::ds_di ds_di [private/internal] mom_grid_initialize::dx_di dx_di [private/internal] mom_grid_initialize::ds_di->mom_grid_initialize::dx_di
Text view
function Int_di_dx(x, GP)

This function calculates and returns the integral of the inverse of dx/di to the point x, in radians [gridpoints]

Parameters
  • x [in]

    The longitude in question [radians]

  • GP [in]

    A structure of grid parameters

Callers call graph
Callers of mom_grid_initialize::int_di_dx calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::int_di_dx Int_di_dx [private/internal] mom_grid_initialize::set_grid_metrics_mercator set_grid_metrics_mercator [private/internal] mom_grid_initialize::set_grid_metrics_mercator->mom_grid_initialize::int_di_dx
Text view
function dy_dj(y, GP)

This subroutine calculates and returns the value of dy/dj in [radian gridpoint-1], where y is the latitude in Radians, and j is the integral north-south grid index.

Parameters
  • y [in]

    The latitude in question [radians]

  • GP [in]

    A structure of grid parameters

Callers call graph
Callers of mom_grid_initialize::dy_dj calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::ds_dj ds_dj [private/internal] mom_grid_initialize::dy_dj dy_dj [private/internal] mom_grid_initialize::ds_dj->mom_grid_initialize::dy_dj
Text view
function Int_dj_dy(y, GP)

This subroutine calculates and returns the integral of the inverse of dy/dj to the point y in radians [gridpoints]

Parameters
  • y [in]

    The latitude in question [radians]

  • GP [in]

    A structure of grid parameters

Callers call graph
Callers of mom_grid_initialize::int_dj_dy calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::int_dj_dy Int_dj_dy [private/internal] mom_grid_initialize::set_grid_metrics_mercator set_grid_metrics_mercator [private/internal] mom_grid_initialize::set_grid_metrics_mercator->mom_grid_initialize::int_dj_dy
Text view
subroutine extrapolate_metric(var, jh, missing)

Extrapolates missing metric data into all the halo regions.

Parameters
  • var [inout]

    The array in which to fill in halos in arbitrary units [A]

  • jh [in]

    The size of the halos to be filled

  • missing [in]

    The missing data fill value, 0 by default [A]

Callers call graph
Callers of mom_grid_initialize::extrapolate_metric calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::extrapolate_metric extrapolate_metric [private/internal] mom_grid_initialize::set_grid_metrics_from_mosaic set_grid_metrics_from_mosaic [private/internal] mom_grid_initialize::set_grid_metrics_from_mosaic->mom_grid_initialize::extrapolate_metric
Text view
function Adcroft_reciprocal(val) result(I_val)

This function implements Adcroft's rule for reciprocals, namely that Adcroft_Inv(x) = 1/x for |x|>0 or 0 for x=0.

Parameters
  • val [in]

    The value being inverted in arbitrary units [A]

  • I_val

    The Adcroft reciprocal of val [A-1]

Callers call graph
Callers of mom_grid_initialize::adcroft_reciprocal calls cluster_mom_grid_initialize MOM_grid_initialize mom_grid_initialize::adcroft_reciprocal Adcroft_reciprocal mom_grid_initialize::initialize_masks initialize_masks mom_grid_initialize::initialize_masks->mom_grid_initialize::adcroft_reciprocal
Text view
subroutine initialize_masks(G, PF, US, OBC_dir_u, OBC_dir_v, open_corner_OBCs, maskT)

Initializes the grid masks and any metrics that come with masks already applied.

Initialize_masks sets mask2dT, mask2dCu, mask2dCv, and mask2dBu to mask out flow over any points which are shallower than Dmask and permit an appropriate treatment of the boundary conditions. mask2dCu and mask2dCv are 0.0 at any points adjacent to a land point. mask2dBu is 0.0 at any land or boundary point. For points in the ocean interior or at open boundary condition points, mask2dCu, mask2dCv, and mask2dBu are all 1.0.

Parameters
  • G [inout]

    The dynamic horizontal grid type

  • PF [in]

    Parameter file structure

  • US [in]

    A dimensional unit scaling type

  • OBC_dir_u [in]

    Trinary values that indicate whether there is an open boundary condition at zonal velocity faces and their orientation, with 0 for no OBC, a positive value for an Eastern OBC and a negative value for a Western OBC.

  • OBC_dir_v [in]

    Trinary values that indicate whether there is an open boundary condition at zonal velocity faces and their orientation, with 0 for no OBC, a positive value for a Northern OBC and a negative value for a Southern OBC.

  • open_corner_OBCs [in]

    If present and true, the bay-like corner between two orthogonal open boundary segments is open, otherwise it is closed.

  • maskT [in]

    If present, this array is used to set the the mask at tracer points instead of using the bathymetry to determine the masks [nondim]

Callees call graph
Callees of mom_grid_initialize::initialize_masks calls cluster_mom_domain_infra MOM_domain_infra cluster_mom_error_handler MOM_error_handler cluster_mom_file_parser MOM_file_parser cluster_mom_grid_initialize MOM_grid_initialize mom_domain_infra::interface::pass_var pass_var (interface) mom_domain_infra::interface::pass_vector pass_vector (interface) mom_error_handler::calltree_enter callTree_enter mom_error_handler::calltree_leave callTree_leave mom_file_parser::interface::get_param get_param (interface) mom_grid_initialize::adcroft_reciprocal Adcroft_reciprocal mom_grid_initialize::initialize_masks initialize_masks mom_grid_initialize::initialize_masks->mom_domain_infra::interface::pass_var mom_grid_initialize::initialize_masks->mom_domain_infra::interface::pass_vector mom_grid_initialize::initialize_masks->mom_error_handler::calltree_enter mom_grid_initialize::initialize_masks->mom_error_handler::calltree_leave mom_grid_initialize::initialize_masks->mom_file_parser::interface::get_param mom_grid_initialize::initialize_masks->mom_grid_initialize::adcroft_reciprocal
Text view
Callers call graph
Callers of mom_grid_initialize::initialize_masks calls cluster_mom_fixed_initialization MOM_fixed_initialization cluster_mom_grid_initialize MOM_grid_initialize cluster_mom_ice_shelf MOM_ice_shelf mom_fixed_initialization::mom_initialize_fixed MOM_initialize_fixed mom_grid_initialize::initialize_masks initialize_masks mom_fixed_initialization::mom_initialize_fixed->mom_grid_initialize::initialize_masks mom_ice_shelf::initialize_ice_shelf initialize_ice_shelf mom_ice_shelf::initialize_ice_shelf->mom_grid_initialize::initialize_masks
Text view
API generated with Flint · Rendered from reStructuredText