MOM6
|
Used to initialize tracers from a depth- (or z*-) space file.
Functions/Subroutines | |
logical function, public | tracer_z_init (tr, h, filename, tr_name, G, US, missing_val, land_val) |
This function initializes a tracer by reading a Z-space file, returning .true. if this appears to have been successful, and false otherwise. More... | |
subroutine | read_z_edges (filename, tr_name, z_edges, nz_out, has_edges, use_missing, missing, scale) |
This subroutine reads the vertical coordinate data for a field from a NetCDF file. It also might read the missing value attribute for that same field. More... | |
subroutine | find_overlap (e, Z_top, Z_bot, k_max, k_start, k_top, k_bot, wt, z1, z2) |
Determines the layers bounded by interfaces e that overlap with the depth range between Z_top and Z_bot, and the fractional weights of each layer. It also calculates the normalized relative depths of the range of each layer that overlaps that depth range. More... | |
subroutine | find_limited_slope (val, e, slope, k) |
This subroutine determines a limited slope for val to be advected with a piecewise limited scheme. More... | |
|
private |
This subroutine determines a limited slope for val to be advected with a piecewise limited scheme.
[in] | val | A column of values that are being interpolated. |
[in] | e | Column interface heights in arbitrary units |
[out] | slope | Normalized slope in the intracell distribution of val. |
[in] | k | Layer whose slope is being determined. |
Definition at line 479 of file MOM_tracer_Z_init.F90.
Referenced by tracer_z_init().
|
private |
Determines the layers bounded by interfaces e that overlap with the depth range between Z_top and Z_bot, and the fractional weights of each layer. It also calculates the normalized relative depths of the range of each layer that overlaps that depth range.
[in] | e | Column interface heights, in arbitrary units. |
[in] | z_top | Top of range being mapped to, in the units of e. |
[in] | z_bot | Bottom of range being mapped to, in the units of e. |
[in] | k_max | Number of valid layers. |
[in] | k_start | Layer at which to start searching. |
[in,out] | k_top | Indices of top layers that overlap with the depth range. |
[in,out] | k_bot | Indices of bottom layers that overlap with the depth range. |
[out] | wt | Relative weights of each layer from k_top to k_bot. |
[out] | z1 | Depth of the top limits of the part of a layer that contributes to a depth level, relative to the cell center and normalized by the cell thickness [nondim]. Note that -1/2 <= z1 < z2 <= 1/2. |
[out] | z2 | Depths of the bottom limit of the part of a layer that contributes to a depth level, relative to the cell center and normalized by the cell thickness [nondim]. Note that -1/2 <= z1 < z2 <= 1/2. |
Definition at line 416 of file MOM_tracer_Z_init.F90.
Referenced by tracer_z_init().
|
private |
This subroutine reads the vertical coordinate data for a field from a NetCDF file. It also might read the missing value attribute for that same field.
[in] | filename | The name of the file to read from. |
[in] | tr_name | The name of the tracer in the file. |
[out] | z_edges | The depths of the vertical edges of the tracer array |
[out] | nz_out | The number of vertical layers in the tracer array |
[out] | has_edges | If true the values in z_edges are the edges of the tracer cells, otherwise they are the cell centers |
[in,out] | use_missing | If false on input, see whether the tracer has a missing value, and if so return true |
[in,out] | missing | The missing value, if one has been found |
[in] | scale | A scaling factor for z_edges into new units. |
Definition at line 281 of file MOM_tracer_Z_init.F90.
References mom_error_handler::mom_error(), and mom_error_handler::mom_mesg().
Referenced by tracer_z_init().
logical function, public mom_tracer_z_init::tracer_z_init | ( | real, dimension(szi_(g),szj_(g),szk_(g)), intent(out) | tr, |
real, dimension(szi_(g),szj_(g),szk_(g)), intent(in) | h, | ||
character(len=*), intent(in) | filename, | ||
character(len=*), intent(in) | tr_name, | ||
type(ocean_grid_type), intent(in) | G, | ||
type(unit_scale_type), intent(in) | US, | ||
real, intent(in), optional | missing_val, | ||
real, intent(in), optional | land_val | ||
) |
This function initializes a tracer by reading a Z-space file, returning .true. if this appears to have been successful, and false otherwise.
[in] | g | The ocean's grid structure |
[in] | us | A dimensional unit scaling type |
[out] | tr | The tracer to initialize |
[in] | h | Layer thicknesses [H ~> m or kg m-2] |
[in] | filename | The name of the file to read from |
[in] | tr_name | The name of the tracer in the file |
[in] | missing_val | The missing value for the tracer |
[in] | land_val | A value to use to fill in land points |
Definition at line 31 of file MOM_tracer_Z_init.F90.
References find_limited_slope(), find_overlap(), mom_error_handler::mom_error(), and read_z_edges().
Referenced by mom_ocmip2_cfc::init_tracer_cfc(), ideal_age_example::initialize_ideal_age_tracer(), and oil_tracer::initialize_oil_tracer().