mom_horizontal_regridding module reference¶
Horizontal interpolation.
Functions/Subroutines¶
Write to the terminal some basic statistics about the k-th level of an array. |
|
Use ICE-9 algorithm to populate points (fill=1) with valid data (good=1). |
|
Extrapolate and interpolate from a file record. |
|
Extrapolate and interpolate using a FMS time interpolation handle. |
|
Replace all values of a 2-d field with the weighted average over the valid points. |
|
Create a 2d-mesh of grid coordinates from 1-d arrays. |
Detailed Description¶
Horizontal interpolation.
Function/Subroutine Documentation¶
-
subroutine
mom_horizontal_regridding/mystats(array, missing, G, k, mesg, unscale, full_halo)¶ Write to the terminal some basic statistics about the k-th level of an array.
- Parameters:
g :: [in] Ocean grid type
array :: [in] input array in arbitrary units [A ~> a]
missing :: [in] missing value in arbitrary units [A ~> a]
k :: [in] Level to calculate statistics for
mesg :: [in] Label to use in message
unscale :: [in] A scaling factor for output that countacts any internal dimesional scaling [a A-1 ~> 1]
full_halo :: [in] If present and true, test values on the whole array rather than just the computational domain.
- Called from:
mom_horizontal_regridding::horiz_interp_and_extrap_tracer::horiz_interp_and_extrap_tracer_fms_idmom_horizontal_regridding::horiz_interp_and_extrap_tracer::horiz_interp_and_extrap_tracer_recordmom_tracer_initialization_from_z::mom_initialize_tracer_from_z
-
subroutine
mom_horizontal_regridding/fill_miss_2d(aout, good, fill, prev, G, acrit, num_pass, relc, debug, answer_date)¶ Use ICE-9 algorithm to populate points (fill=1) with valid data (good=1). If no information is available, use a previous guess (prev). Optionally (smooth) blend the filled points to achieve a more desirable result.
- Parameters:
g :: [inout] The ocean’s grid structure.
aout :: [inout] The array with missing values to fill [arbitrary]
good :: [in] Valid data mask for incoming array
fill :: [in] Same shape array of points which need
prev :: [in] First guess where isolated holes exist [arbitrary]
acrit :: [in] A minimal value for deltas between iterations that determines when the smoothing has converged [arbitrary].
num_pass :: [in] The maximum number of iterations
relc :: [in] A relaxation coefficient for Laplacian [nondim]
debug :: [in] If true, write verbose debugging messages.
answer_date :: [in] The vintage of the expressions in the code. Dates before 20190101 give the same answers as the code did in late 2018, while later versions add parentheses for rotational symmetry.
- Called from:
mom_horizontal_regridding::horiz_interp_and_extrap_tracer::horiz_interp_and_extrap_tracer_fms_idmom_horizontal_regridding::horiz_interp_and_extrap_tracer::horiz_interp_and_extrap_tracer_record
-
subroutine
mom_horizontal_regridding/horiz_interp_and_extrap_tracer_record(filename, varnam, recnum, G, tr_z, mask_z, z_in, z_edges_in, missing_value, scale, homogenize, m_to_Z, answers_2018, ongrid, tr_iter_tol, answer_date)¶ Extrapolate and interpolate from a file record.
- Parameters:
filename :: [in] Path to file containing tracer to be interpolated.
varnam :: [in] Name of tracer in file.
recnum :: [in] Record number of tracer to be read.
g :: [inout] Grid object
tr_z :: [out] Allocatable tracer array on the horizontal model grid and input-file vertical levels in arbitrary units [A ~> a]
mask_z :: [out] Allocatable tracer mask array on the horizontal model grid and input-file vertical levels [nondim]
z_in :: [out] Cell grid values for input data [Z ~> m]
z_edges_in :: [out] Cell grid edge values for input data [Z ~> m]
missing_value :: [out] The missing value in the returned array, scaled to avoid accidentally having valid values match missing values in the same units as tr_z [A ~> a]
scale :: [in] Scaling factor for tracer into the internal units of the model for the units in the file [A a-1 ~> 1]
homogenize :: [in] If present and true, horizontally homogenize data to produce perfectly “flat” initial conditions
m_to_z :: [in] A conversion factor from meters to the units of depth [Z m-1 ~> 1]. If missing, GbathyT must be in m.
answers_2018 :: [in] If true, use expressions that give the same answers as the code did in late 2018. Otherwise add parentheses for rotational symmetry.
ongrid :: [in] If true, then data are assumed to have been interpolated to the model horizontal grid. In this case, only extrapolation is performed by this routine
tr_iter_tol :: [in] The tolerance for changes in tracer concentrations between smoothing iterations that determines when to stop iterating in the same units as tr_z [A ~> a]
answer_date :: [in] The vintage of the expressions in the code. Dates before 20190101 give the same answers as the code did in late 2018, while later versions add parentheses for rotational symmetry.
-
subroutine
mom_horizontal_regridding/horiz_interp_and_extrap_tracer_fms_id(field, Time, G, tr_z, mask_z, z_in, z_edges_in, missing_value, scale, homogenize, spongeOngrid, m_to_Z, answers_2018, tr_iter_tol, answer_date, axes)¶ Extrapolate and interpolate using a FMS time interpolation handle.
- Parameters:
field :: [in] Handle for the time interpolated field
time :: [in] A FMS time type
g :: [inout] Grid object
tr_z :: [out] Allocatable tracer array on the horizontal model grid and input-file vertical levels in arbitrary units [A ~> a]
mask_z :: [out] Allocatable tracer mask array on the horizontal model grid and input-file vertical levels [nondim]
z_in :: [out] Cell grid values for input data [Z ~> m]
z_edges_in :: [out] Cell grid edge values for input data [Z ~> m]
missing_value :: [out] The missing value in the returned array, scaled to avoid accidentally having valid values match missing values, in the same arbitrary units as tr_z [A ~> a]
scale :: [in] Scaling factor for tracer into the internal units of the model [A a-1 ~> 1]
homogenize :: [in] If present and true, horizontally homogenize data to produce perfectly “flat” initial conditions
spongeongrid :: [in] If present and true, the sponge data are on the model grid
m_to_z :: [in] A conversion factor from meters to the units of depth [Z m-1 ~> 1]. If missing, GbathyT must be in m.
answers_2018 :: [in] If true, use expressions that give the same answers as the code did in late 2018. Otherwise add parentheses for rotational symmetry.
tr_iter_tol :: [in] The tolerance for changes in tracer concentrations between smoothing iterations that determines when to stop iterating, in the same arbitrary units as tr_z [A ~> a]
answer_date :: [in] The vintage of the expressions in the code. Dates before 20190101 give the same answers as the code did in late 2018, while later versions add parentheses for rotational symmetry.
axes :: [inout] Axis types for the input data
-
subroutine
mom_horizontal_regridding/homogenize_field(field, G, tmp_scale, weights, answer_date, wt_unscale)¶ Replace all values of a 2-d field with the weighted average over the valid points.
- Parameters:
g :: [inout] Ocean grid type
field :: [inout] The tracer on the model grid in arbitrary units [A ~> a]
tmp_scale :: [in] A temporary rescaling factor for the variable that is reversed in the return value [a A-1 ~> 1]
weights :: [in] The weights for the tracer in arbitrary units that
answer_date :: [in] The vintage of the expressions in the code. Dates before 20230101 use non-reproducing sums in their averages, while later versions use reproducing sums for rotational symmetry and consistency across PE layouts.
wt_unscale :: [in] A factor that undoes any dimensional scaling of the weights so that they can be used with reproducing sums [b B-1 ~> 1]
- Called from:
mom_horizontal_regridding::horiz_interp_and_extrap_tracer::horiz_interp_and_extrap_tracer_fms_idmom_horizontal_regridding::horiz_interp_and_extrap_tracer::horiz_interp_and_extrap_tracer_record
-
subroutine
mom_horizontal_regridding/meshgrid(x, y, x_T, y_T)¶ Create a 2d-mesh of grid coordinates from 1-d arrays.
- Parameters:
x :: [in] input 1-dimensional vector [arbitrary]
y :: [in] input 1-dimensional vector [arbitrary]
x_t :: [inout] output 2-dimensional array [arbitrary]
y_t :: [inout] output 2-dimensional array [arbitrary]
- Called from:
mom_horizontal_regridding::horiz_interp_and_extrap_tracer::horiz_interp_and_extrap_tracer_fms_idmom_horizontal_regridding::horiz_interp_and_extrap_tracer::horiz_interp_and_extrap_tracer_record