MOM6
|
Horizontal interpolation.
Data Types | |
interface | fill_boundaries |
Fill grid edges. More... | |
interface | horiz_interp_and_extrap_tracer |
Extrapolate and interpolate data. More... | |
Functions/Subroutines | |
subroutine | fill_miss_2d (aout, good, fill, prev, G, smooth, num_pass, relc, crit, keep_bug, debug) |
Use ICE-9 algorithm to populate points (fill=1) with valid data (good=1). If no information is available, Then use a previous guess (prev). Optionally (smooth) blend the filled points to achieve a more desirable result. More... | |
subroutine | horiz_interp_and_extrap_tracer_record (filename, varnam, conversion, recnum, G, tr_z, mask_z, z_in, z_edges_in, missing_value, reentrant_x, tripolar_n, homogenize, m_to_Z) |
Extrapolate and interpolate from a file record. More... | |
subroutine, public | mystats (array, missing, is, ie, js, je, k, mesg) |
Write to the terminal some basic statistics about the k-th level of an array. More... | |
subroutine | horiz_interp_and_extrap_tracer_fms_id (fms_id, Time, conversion, G, tr_z, mask_z, z_in, z_edges_in, missing_value, reentrant_x, tripolar_n, homogenize, spongeOngrid, m_to_Z) |
Extrapolate and interpolate using a FMS time interpolation handle. More... | |
subroutine | meshgrid (x, y, x_T, y_T) |
Create a 2d-mesh of grid coordinates from 1-d arrays. More... | |
integer function, dimension(0:size(m, 1)+1, 0:size(m, 2)+1) | fill_boundaries_int (m, cyclic_x, tripolar_n) |
Fill grid edges for integer data. More... | |
real function, dimension(0:size(m, 1)+1, 0:size(m, 2)+1) | fill_boundaries_real (m, cyclic_x, tripolar_n) |
Fill grid edges for real data. More... | |
subroutine | smooth_heights (zi, fill, bad, sor, niter, cyclic_x, tripolar_n) |
Solve del2 (zi) = 0 using successive iterations with a 5 point stencil. Only points fill==1 are modified. Except where bad==1, information propagates isotropically in index space. The resulting solution in each region is an approximation to del2(zi)=0 subject to boundary conditions along the valid points curve bounding this region. More... | |
|
private |
Fill grid edges for integer data.
[in] | m | input array (ND) |
[in] | cyclic_x | True if domain is zonally re-entrant |
[in] | tripolar_n | True if domain has an Arctic fold |
Definition at line 900 of file MOM_horizontal_regridding.F90.
References fill_boundaries_real().
|
private |
Fill grid edges for real data.
[in] | m | input array (ND) |
[in] | cyclic_x | True if domain is zonally re-entrant |
[in] | tripolar_n | True if domain has an Arctic fold |
Definition at line 918 of file MOM_horizontal_regridding.F90.
Referenced by fill_boundaries_int().
|
private |
Use ICE-9 algorithm to populate points (fill=1) with valid data (good=1). If no information is available, Then use a previous guess (prev). Optionally (smooth) blend the filled points to achieve a more desirable result.
[in,out] | g | The ocean's grid structure. |
[in,out] | aout | The array with missing values to fill |
[in] | good | Valid data mask for incoming array |
[in] | fill | Same shape array of points which need |
[in] | prev | First guess where isolated holes exist. |
[in] | smooth | If present and true, apply a number of Laplacian iterations to the interpolated data |
[in] | num_pass | The maximum number of iterations |
[in] | relc | A relaxation coefficient for Laplacian (ND) |
[in] | crit | A minimal value for deltas between iterations. |
[in] | keep_bug | Use an algorithm with a bug that dates to the "sienna" code release. |
[in] | debug | If true, write verbose debugging messages. |
Definition at line 104 of file MOM_horizontal_regridding.F90.
Referenced by horiz_interp_and_extrap_tracer_fms_id(), and horiz_interp_and_extrap_tracer_record().
|
private |
Extrapolate and interpolate using a FMS time interpolation handle.
[in] | fms_id | A unique id used by the FMS time interpolator |
[in] | time | A FMS time type |
[in] | conversion | Conversion factor for tracer. |
[in,out] | g | Grid object |
tr_z | pointer to allocatable tracer array on local model grid and native vertical levels. | |
mask_z | pointer to allocatable tracer mask array on local model grid and native vertical levels. | |
z_in | Cell grid values for input data. | |
z_edges_in | Cell grid edge values for input data. (Intent out) | |
[out] | missing_value | The missing value in the returned array. |
[in] | reentrant_x | If true, this grid is reentrant in the x-direction |
[in] | tripolar_n | If true, this is a northern tripolar grid |
[in] | homogenize | If present and true, horizontally homogenize data to produce perfectly "flat" initial conditions |
[in] | spongeongrid | If present and true, the sponge data are on the model grid |
[in] | m_to_z | A conversion factor from meters to the units of depth. If missing, GbathyT must be in m. |
Definition at line 591 of file MOM_horizontal_regridding.F90.
References fill_miss_2d(), meshgrid(), and mystats().
subroutine mom_horizontal_regridding::horiz_interp_and_extrap_tracer_record | ( | character(len=*), intent(in) | filename, |
character(len=*), intent(in) | varnam, | ||
real, intent(in) | conversion, | ||
integer, intent(in) | recnum, | ||
type(ocean_grid_type), intent(inout) | G, | ||
real, dimension(:,:,:), allocatable | tr_z, | ||
real, dimension(:,:,:), allocatable | mask_z, | ||
real, dimension(:), allocatable | z_in, | ||
real, dimension(:), allocatable | z_edges_in, | ||
real, intent(out) | missing_value, | ||
logical, intent(in) | reentrant_x, | ||
logical, intent(in) | tripolar_n, | ||
logical, intent(in), optional | homogenize, | ||
real, intent(in), optional | m_to_Z | ||
) |
Extrapolate and interpolate from a file record.
[in] | filename | Path to file containing tracer to be interpolated. |
[in] | varnam | Name of tracer in filee. |
[in] | conversion | Conversion factor for tracer. |
[in] | recnum | Record number of tracer to be read. |
[in,out] | g | Grid object |
tr_z | pointer to allocatable tracer array on local model grid and input-file vertical levels. | |
mask_z | pointer to allocatable tracer mask array on local model grid and input-file vertical levels. | |
z_in | Cell grid values for input data. | |
z_edges_in | Cell grid edge values for input data. | |
[out] | missing_value | The missing value in the returned array. |
[in] | reentrant_x | If true, this grid is reentrant in the x-direction |
[in] | tripolar_n | If true, this is a northern tripolar grid |
[in] | homogenize | If present and true, horizontally homogenize data to produce perfectly "flat" initial conditions |
[in] | m_to_z | A conversion factor from meters to the units of depth. If missing, GbathyT must be in m. |
Definition at line 268 of file MOM_horizontal_regridding.F90.
References fill_miss_2d(), meshgrid(), and mystats().
|
private |
Create a 2d-mesh of grid coordinates from 1-d arrays.
[in] | x | input 1-dimensional vector |
[in] | y | input 1-dimensional vector |
[in,out] | x_t | output 2-dimensional array |
[in,out] | y_t | output 2-dimensional array |
Definition at line 877 of file MOM_horizontal_regridding.F90.
Referenced by horiz_interp_and_extrap_tracer_fms_id(), and horiz_interp_and_extrap_tracer_record().
subroutine, public mom_horizontal_regridding::mystats | ( | real, dimension(:,:), intent(in) | array, |
real, intent(in) | missing, | ||
integer | is, | ||
integer | ie, | ||
integer | js, | ||
integer | je, | ||
integer | k, | ||
character(len=*) | mesg | ||
) |
Write to the terminal some basic statistics about the k-th level of an array.
[in] | array | input array (ND) |
[in] | missing | missing value (ND) |
is | Horizontal loop bounds to calculate statistics for | |
ie | Horizontal loop bounds to calculate statistics for | |
js | Horizontal loop bounds to calculate statistics for | |
je | Horizontal loop bounds to calculate statistics for | |
k | Level to calculate statistics for | |
mesg | Label to use in message |
Definition at line 61 of file MOM_horizontal_regridding.F90.
Referenced by horiz_interp_and_extrap_tracer_fms_id(), horiz_interp_and_extrap_tracer_record(), and mom_tracer_initialization_from_z::mom_initialize_tracer_from_z().
|
private |
Solve del2 (zi) = 0 using successive iterations with a 5 point stencil. Only points fill==1 are modified. Except where bad==1, information propagates isotropically in index space. The resulting solution in each region is an approximation to del2(zi)=0 subject to boundary conditions along the valid points curve bounding this region.
[in,out] | zi | input and output array (ND) |
[in] | fill | same shape as zi, 1=fill |
[in] | bad | same shape as zi, 1=bad data |
[in] | sor | relaxation coefficient (ND) |
[in] | niter | maximum number of iterations |
[in] | cyclic_x | true if domain is zonally reentrant |
[in] | tripolar_n | true if domain has an Arctic fold |
Definition at line 955 of file MOM_horizontal_regridding.F90.