namespace midas_vertmap¶
Overview¶
Routines for initialization callable from MOM6 or Python (MIDAS) More…
namespace midas_vertmap { // interfaces interface fill_boundaries; // global functions real function, dimension(size(tr_in, 1), size(tr_in, 2), nlay), public tracer_z_init( tr_in tr_in, z_edges z_edges, e e, nkml nkml, nkbl nkbl, land_fill land_fill, wet wet, nlay nlay, nlevs nlevs, debug debug, i_debug i_debug, j_debug j_debug, eps_z eps_z ); subroutine, public determine_temperature( temp temp, salt salt, R R, p_ref p_ref, niter niter, land_fill land_fill, h h, k_start k_start, eos eos ); real function, dimension(size(rho, 1), size(rho, 2), size(rb, 1)), public find_interfaces( rho rho, zin zin, Rb Rb, depth depth, nlevs nlevs, nkml nkml, nkbl nkbl, hml hml, debug debug, eps_z eps_z ); subroutine, public meshgrid(x x, y y, x_T x_T, y_T y_T); } // namespace midas_vertmap
Detailed Documentation¶
Routines for initialization callable from MOM6 or Python (MIDAS)
Global Functions¶
real function, dimension(size(tr_in, 1), size(tr_in, 2), nlay), public tracer_z_init( tr_in tr_in, z_edges z_edges, e e, nkml nkml, nkbl nkbl, land_fill land_fill, wet wet, nlay nlay, nlevs nlevs, debug debug, i_debug i_debug, j_debug j_debug, eps_z eps_z )
Layer model routine for remapping tracers.
Parameters:
tr_in |
The z-space array of tracer concentrations that is read in. |
z_edges |
The depths of the cell edges in the input z* data [Z ~> m or m] |
nlay |
The number of vertical layers in the target grid |
e |
The depths of the target layer interfaces [Z ~> m or m] |
nkml |
The number of mixed layers |
nkbl |
The number of buffer layers |
land_fill |
fill in data over land (1) |
wet |
The wet mask for the source data (valid points) |
nlevs |
The number of input levels with valid data |
debug |
optional debug flag |
i_debug |
i-index of point for debugging |
j_debug |
j-index of point for debugging |
eps_z |
A negligibly small layer thickness [Z ~> m or m]. |
Returns:
tracers in layer space
subroutine, public determine_temperature( temp temp, salt salt, R R, p_ref p_ref, niter niter, land_fill land_fill, h h, k_start k_start, eos eos )
This subroutine determines the potential temperature and salinity that is consistent with the target density using provided initial guess.
Parameters:
temp |
potential temperature [degC] |
salt |
salinity [PSU] |
r |
desired potential density [kg m-3]. |
p_ref |
reference pressure [Pa]. |
niter |
maximum number of iterations |
k_start |
starting index (i.e. below the buffer layer) |
land_fill |
land fill value |
h |
layer thickness, used only to avoid working on massless layers |
eos |
seawater equation of state control structure |
real function, dimension(size(rho, 1), size(rho, 2), size(rb, 1)), public find_interfaces( rho rho, zin zin, Rb Rb, depth depth, nlevs nlevs, nkml nkml, nkbl nkbl, hml hml, debug debug, eps_z eps_z )
Find interface positions corresponding to density profile.
Parameters:
rho |
potential density in z-space [kg m-3] |
zin |
Input data levels [Z ~> m or m]. |
rb |
target interface densities [kg m-3] |
depth |
ocean depth [Z ~> m]. |
nlevs |
number of valid points in each column |
debug |
optional debug flag |
nkml |
number of mixed layer pieces |
nkbl |
number of buffer layer pieces |
hml |
mixed layer depth [Z ~> m]. |
eps_z |
A negligibly small layer thickness [Z ~> m or m]. |
Returns:
The returned interface, in the same units az zin.
subroutine, public meshgrid(x x, y y, x_T x_T, y_T y_T)
Create a 2d-mesh of grid coordinates from 1-d arrays.
Parameters:
x |
input x coordinates |
y |
input y coordinates |
x_t |
output 2-d version |
y_t |
output 2-d version |