MOM_tracer_Z_init module reference

Used to initialize tracers from a depth- (or z*-) space file.

Functions/Subroutines

tracer_Z_init

This function initializes a tracer by reading a Z-space file, returning .true. if this appears to have been successful, and false otherwise.

tracer_z_init_array

Layer model routine for remapping tracers from pseudo-z coordinates into layers defined by target interface positions.

read_Z_edges

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.

find_overlap

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.

find_limited_slope

This subroutine determines a limited slope for val to be advected with a piecewise limited scheme.

determine_temperature

This subroutine determines the potential temperature and salinity that is consistent with the target density using provided initial guess

Functions/Subroutine Documentation

function tracer_Z_init(tr, h, filename, tr_name, G, GV, US, missing_val, land_val, scale)

This function initializes a tracer by reading a Z-space file, returning .true. if this appears to have been successful, and false otherwise.

Parameters
  • tracer_Z_init

    A return code indicating if the initialization has been successful

  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure.

  • US [in]

    A dimensional unit scaling type

  • tr [out]

    The tracer to initialize [CU ~> conc]

  • h [in]

    Layer thicknesses [H ~> m or kg m-2] or other arbitrary units such as [Z ~> m]

  • filename [in]

    The name of the file to read from

  • tr_name [in]

    The name of the tracer in the file

  • missing_val [in]

    The missing value for the tracer [CU ~> conc]

  • land_val [in]

    A value to use to fill in land points [CU ~> conc]

  • scale [in]

    A factor by which to scale the output tracers from the their units in the file [CU conc-1 ~> 1]

Callees call graph
Callees of mom_tracer_z_init::tracer_z_init calls cluster_mom_error_handler MOM_error_handler cluster_mom_io MOM_io cluster_mom_tracer_z_init MOM_tracer_Z_init mom_error_handler::mom_error MOM_error mom_io::interface::mom_read_data MOM_read_data (interface) mom_tracer_z_init::find_limited_slope find_limited_slope [private/internal] mom_tracer_z_init::find_overlap find_overlap [private/internal] mom_tracer_z_init::read_z_edges read_Z_edges mom_tracer_z_init::tracer_z_init tracer_Z_init mom_tracer_z_init::tracer_z_init->mom_error_handler::mom_error mom_tracer_z_init::tracer_z_init->mom_io::interface::mom_read_data mom_tracer_z_init::tracer_z_init->mom_tracer_z_init::find_limited_slope mom_tracer_z_init::tracer_z_init->mom_tracer_z_init::find_overlap mom_tracer_z_init::tracer_z_init->mom_tracer_z_init::read_z_edges
Text view
Callers call graph
Callers of mom_tracer_z_init::tracer_z_init calls cluster_ideal_age_example ideal_age_example cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_ocmip2_cfc MOM_OCMIP2_CFC cluster_mom_tracer_z_init MOM_tracer_Z_init cluster_oil_tracer oil_tracer ideal_age_example::initialize_ideal_age_tracer initialize_ideal_age_tracer mom_tracer_z_init::tracer_z_init tracer_Z_init ideal_age_example::initialize_ideal_age_tracer->mom_tracer_z_init::tracer_z_init mom_cfc_cap::init_tracer_cfc init_tracer_CFC [private/internal] mom_cfc_cap::init_tracer_cfc->mom_tracer_z_init::tracer_z_init mom_ocmip2_cfc::init_tracer_cfc init_tracer_CFC [private/internal] mom_ocmip2_cfc::init_tracer_cfc->mom_tracer_z_init::tracer_z_init oil_tracer::initialize_oil_tracer initialize_oil_tracer oil_tracer::initialize_oil_tracer->mom_tracer_z_init::tracer_z_init
Text view
subroutine tracer_z_init_array(tr_in, z_edges, nk_data, e, land_fill, G, nlay, nlevs, eps_z, tr, scale)

Layer model routine for remapping tracers from pseudo-z coordinates into layers defined by target interface positions.

Parameters
  • G [in]

    The ocean's grid structure

  • nk_data [in]

    The number of levels in the input data

  • tr_in [in]

    The z-space array of tracer concentrations that is read in [A]

  • z_edges [in]

    The depths of the cell edges in the input z* data [Z ~> m] or [m]

  • nlay [in]

    The number of vertical layers in the target grid

  • e [in]

    The depths of the target layer interfaces [Z ~> m] or [m]

  • land_fill [in]

    fill in data over land [B]

  • nlevs [in]

    The number of input levels with valid data

  • eps_z [in]

    A negligibly thin layer thickness [Z ~> m].

  • tr [out]

    tracers in model space [B]

  • scale [in]

    A factor by which to scale the output tracers from the input tracers [B A-1 ~> 1]

Callees call graph
Callees of mom_tracer_z_init::tracer_z_init_array calls cluster_mom_tracer_z_init MOM_tracer_Z_init mom_tracer_z_init::find_limited_slope find_limited_slope [private/internal] mom_tracer_z_init::find_overlap find_overlap [private/internal] mom_tracer_z_init::tracer_z_init_array tracer_z_init_array mom_tracer_z_init::tracer_z_init_array->mom_tracer_z_init::find_limited_slope mom_tracer_z_init::tracer_z_init_array->mom_tracer_z_init::find_overlap
Text view
Callers call graph
Callers of mom_tracer_z_init::tracer_z_init_array calls cluster_mom_state_initialization MOM_state_initialization cluster_mom_tracer_z_init MOM_tracer_Z_init mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_tracer_z_init::tracer_z_init_array tracer_z_init_array mom_state_initialization::mom_temp_salt_initialize_from_z->mom_tracer_z_init::tracer_z_init_array
Text view
subroutine read_Z_edges(filename, tr_name, z_edges, nz_out, has_edges, use_missing, missing, scale, 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.

Parameters
  • filename [in]

    The name of the file to read from.

  • tr_name [in]

    The name of the tracer in the file.

  • z_edges [out]

    The depths of the vertical edges of the tracer array [Z ~> m]

  • nz_out [out]

    The number of vertical layers in the tracer array

  • has_edges [out]

    If true the values in z_edges are the edges of the tracer cells, otherwise they are the cell centers

  • use_missing [inout]

    If false on input, see whether the tracer has a missing value, and if so return true

  • missing [inout]

    The missing value, if one has been found [CU ~> conc]

  • scale [in]

    A scaling factor for z_edges into new units [Z m-1 ~> 1]

  • missing_scale [in]

    A scaling factor to use to convert the tracers and their missing value from the units in the file into their internal units [CU conc-1 ~> 1]

Callees call graph
Callees of mom_tracer_z_init::read_z_edges calls cluster_mom_error_handler MOM_error_handler cluster_mom_error_infra MOM_error_infra cluster_mom_io MOM_io cluster_mom_tracer_z_init MOM_tracer_Z_init mom_error_handler::mom_error MOM_error mom_error_infra::is_root_pe is_root_pe mom_io::close_file_to_read close_file_to_read mom_io::get_var_sizes get_var_sizes mom_io::interface::read_attribute read_attribute (interface) mom_io::interface::read_variable read_variable (interface) mom_io::open_file_to_read open_file_to_read mom_tracer_z_init::read_z_edges read_Z_edges mom_tracer_z_init::read_z_edges->mom_error_handler::mom_error mom_tracer_z_init::read_z_edges->mom_error_infra::is_root_pe mom_tracer_z_init::read_z_edges->mom_io::close_file_to_read mom_tracer_z_init::read_z_edges->mom_io::get_var_sizes mom_tracer_z_init::read_z_edges->mom_io::interface::read_attribute mom_tracer_z_init::read_z_edges->mom_io::interface::read_variable mom_tracer_z_init::read_z_edges->mom_io::open_file_to_read
Text view
Callers call graph
Callers of mom_tracer_z_init::read_z_edges calls cluster_marbl_tracers MARBL_tracers cluster_mom_tracer_z_init MOM_tracer_Z_init marbl_tracers::initialize_marbl_tracers initialize_MARBL_tracers mom_tracer_z_init::read_z_edges read_Z_edges marbl_tracers::initialize_marbl_tracers->mom_tracer_z_init::read_z_edges marbl_tracers::register_marbl_tracers register_MARBL_tracers marbl_tracers::register_marbl_tracers->mom_tracer_z_init::read_z_edges mom_tracer_z_init::tracer_z_init tracer_Z_init mom_tracer_z_init::tracer_z_init->mom_tracer_z_init::read_z_edges
Text view
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.

Parameters
  • e [in]

    Column interface heights, [Z ~> m] or other units.

  • Z_top [in]

    Top of range being mapped to, in the units of e [Z ~> m].

  • Z_bot [in]

    Bottom of range being mapped to, in the units of e [Z ~> m].

  • k_max [in]

    Number of valid layers.

  • k_start [in]

    Layer at which to start searching.

  • k_top [out]

    Indices of top layers that overlap with the depth range.

  • k_bot [out]

    Indices of bottom layers that overlap with the depth range.

  • wt [out]

    Relative weights of each layer from k_top to k_bot [nondim].

  • z1 [out]

    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.

  • z2 [out]

    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.

Callers call graph
Callers of mom_tracer_z_init::find_overlap calls cluster_mom_tracer_z_init MOM_tracer_Z_init mom_tracer_z_init::find_overlap find_overlap [private/internal] mom_tracer_z_init::tracer_z_init tracer_Z_init mom_tracer_z_init::tracer_z_init->mom_tracer_z_init::find_overlap mom_tracer_z_init::tracer_z_init_array tracer_z_init_array mom_tracer_z_init::tracer_z_init_array->mom_tracer_z_init::find_overlap
Text view
function find_limited_slope(val, e, k) result(slope)

This subroutine determines a limited slope for val to be advected with a piecewise limited scheme.

Parameters
  • val [in]

    A column of the values that are being interpolated, in arbitrary units [A]

  • e [in]

    A column's interface heights [Z ~> m] or other units.

  • k [in]

    The layer whose slope is being determined.

  • slope

    The normalized slope in the intracell distribution of val [A]

Callers call graph
Callers of mom_tracer_z_init::find_limited_slope calls cluster_mom_tracer_z_init MOM_tracer_Z_init mom_tracer_z_init::find_limited_slope find_limited_slope [private/internal] mom_tracer_z_init::tracer_z_init tracer_Z_init mom_tracer_z_init::tracer_z_init->mom_tracer_z_init::find_limited_slope mom_tracer_z_init::tracer_z_init_array tracer_z_init_array mom_tracer_z_init::tracer_z_init_array->mom_tracer_z_init::find_limited_slope
Text view
subroutine determine_temperature(temp, salt, R_tgt, EOS, p_ref, niter, k_start, G, GV, US, PF, just_read)

This subroutine determines the potential temperature and salinity that is consistent with the target density using provided initial guess

Parameters
  • G [in]

    The ocean's grid structure

  • GV [in]

    The ocean's vertical grid structure.

  • temp [inout]

    potential temperature [C ~> degC]

  • salt [inout]

    salinity [S ~> ppt]

  • R_tgt [in]

    desired potential density [R ~> kg m-3].

  • EOS [in]

    seawater equation of state control structure

  • p_ref [in]

    reference pressure [R L2 T-2 ~> Pa].

  • niter [in]

    maximum number of iterations

  • k_start [in]

    starting index (i.e. below the buffer layer)

  • US [in]

    A dimensional unit scaling type

  • PF [in]

    A structure indicating the open file to parse for model parameter values.

  • just_read [in]

    If true, this call will only read parameters without changing T or S.

Callees call graph
Callees of mom_tracer_z_init::determine_temperature calls cluster_mom_eos MOM_EOS cluster_mom_file_parser MOM_file_parser cluster_mom_tracer_z_init MOM_tracer_Z_init mom_eos::eos_domain EOS_domain mom_eos::interface::calculate_density calculate_density (interface) mom_eos::interface::calculate_density_derivs calculate_density_derivs (interface) mom_file_parser::interface::get_param get_param (interface) mom_file_parser::interface::log_version log_version (interface) mom_tracer_z_init::determine_temperature determine_temperature mom_tracer_z_init::determine_temperature->mom_eos::eos_domain mom_tracer_z_init::determine_temperature->mom_eos::interface::calculate_density mom_tracer_z_init::determine_temperature->mom_eos::interface::calculate_density_derivs mom_tracer_z_init::determine_temperature->mom_file_parser::interface::get_param mom_tracer_z_init::determine_temperature->mom_file_parser::interface::log_version
Text view
Callers call graph
Callers of mom_tracer_z_init::determine_temperature calls cluster_mom_state_initialization MOM_state_initialization cluster_mom_tracer_z_init MOM_tracer_Z_init mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_tracer_z_init::determine_temperature determine_temperature mom_state_initialization::mom_temp_salt_initialize_from_z->mom_tracer_z_init::determine_temperature
Text view
API generated with Flint · Rendered from reStructuredText