MOM_string_functions module reference

Handy functions for manipulating strings

Functions/Subroutines

lowercase

Return a string in which all uppercase letters have been replaced by their lowercase counterparts.

uppercase

Return a string in which all uppercase letters have been replaced by their lowercase counterparts.

left_int

Returns a character string of a left-formatted integer e.g. "123 " (assumes 19 digit maximum)

left_ints

Returns a character string of a comma-separated, compact formatted, integers e.g. "1, 2, 3, 4"

left_real

Returns a left-justified string with a real formatted like '(G)'

left_reals

Returns a character string of a comma-separated, compact formatted, reals e.g. "1., 2., 5*3., 5.E2"

isFormattedFloatEqualTo

Returns True if the string can be read/parsed to give the exact value of "val"

extractWord

Returns the string corresponding to the nth word in the argument or "" if the string is not long enough. Both spaces and commas are interpreted as separators.

extract_word

Returns the string corresponding to the nth word in the argument or "" if the string is not long enough. Words are delineated by the mandatory separators argument.

extract_integer

Returns the integer corresponding to the nth word in the argument.

extract_real

Returns the real corresponding to the nth word in the argument, in arbitrary units [A].

remove_spaces

Returns string with all spaces removed.

string_functions_unit_tests

Returns true if a unit test of string_functions fails.

localTestS

True if str1 does not match str2. False otherwise.

localTestI

True if i1 is not equal to i2. False otherwise.

localTestR

True if r1 is not equal to r2. False otherwise.

slasher

Returns a directory name that is terminated with a "/" or "./" if the argument is an empty string.

trim_trailing_commas

Returns a left-adjusted string with trailing blanks and commas removed.

ints_to_string

Convert the first n elements (3 by default) of an integer array into an underscore delimited string.

Detailed Description

By Alistair Adcroft and Robert Hallberg, last updated Sept. 2013.

The functions here perform a set of useful manipulations of character strings. Although they are a part of MOM6, the do not require any other MOM software to be useful.

Functions/Subroutine Documentation

function lowercase(input_string)

Return a string in which all uppercase letters have been replaced by their lowercase counterparts.

Parameters
  • input_string [in]

    The string to modify

  • lowercase

    The modified output string

Callers call graph
Callers of mom_string_functions::lowercase calls cluster_basin_builder basin_builder cluster_mom_diag_remap MOM_diag_remap cluster_mom_interp_infra MOM_interp_infra cluster_mom_io MOM_io cluster_mom_meke MOM_MEKE cluster_mom_oda_driver_mod MOM_oda_driver_mod cluster_mom_open_boundary MOM_open_boundary cluster_mom_restart MOM_restart cluster_mom_self_attr_load MOM_self_attr_load cluster_mom_state_initialization MOM_state_initialization cluster_mom_string_functions MOM_string_functions cluster_mom_tidal_mixing MOM_tidal_mixing cluster_mom_tracer_registry MOM_tracer_registry basin_builder::basin_builder_topography basin_builder_topography mom_string_functions::lowercase lowercase basin_builder::basin_builder_topography->mom_string_functions::lowercase mom_diag_remap::diag_remap_configure_axes diag_remap_configure_axes mom_diag_remap::diag_remap_configure_axes->mom_string_functions::lowercase mom_interp_infra::init_extern_field init_extern_field mom_interp_infra::init_extern_field->mom_string_functions::lowercase mom_io::cmor_long_std cmor_long_std mom_io::cmor_long_std->mom_string_functions::lowercase mom_io::create_mom_file create_MOM_file mom_io::create_mom_file->mom_string_functions::lowercase mom_io::get_varid get_varid [private/internal] mom_io::get_varid->mom_string_functions::lowercase mom_meke::meke_init MEKE_init mom_meke::meke_init->mom_string_functions::lowercase mom_oda_driver_mod::init_oda init_oda mom_oda_driver_mod::init_oda->mom_string_functions::lowercase mom_open_boundary::register_obgc_segments register_obgc_segments mom_open_boundary::register_obgc_segments->mom_string_functions::lowercase mom_restart::restore_state restore_state mom_restart::restore_state->mom_string_functions::lowercase mom_self_attr_load::sal_init SAL_init mom_self_attr_load::sal_init->mom_string_functions::lowercase mom_state_initialization::initialize_sponges_file::separate_idamp_for_uv initialize_sponges_file separate_idamp_for_uv [private/internal] mom_state_initialization::initialize_sponges_file::separate_idamp_for_uv->mom_string_functions::lowercase mom_state_initialization::mom_initialize_obcs MOM_initialize_OBCs mom_state_initialization::mom_initialize_obcs->mom_string_functions::lowercase mom_tidal_mixing::tidal_mixing_init tidal_mixing_init mom_tidal_mixing::tidal_mixing_init->mom_string_functions::lowercase mom_tracer_registry::register_tracer register_tracer mom_tracer_registry::register_tracer->mom_string_functions::lowercase mom_tracer_registry::register_tracer_diagnostics register_tracer_diagnostics mom_tracer_registry::register_tracer_diagnostics->mom_string_functions::lowercase mom_tracer_registry::tracer_name_lookup tracer_name_lookup mom_tracer_registry::tracer_name_lookup->mom_string_functions::lowercase
Text view
function uppercase(input_string)

Return a string in which all uppercase letters have been replaced by their lowercase counterparts.

Parameters
  • input_string [in]

    The string to modify

  • uppercase

    The modified output string

Callers call graph
Callers of mom_string_functions::uppercase calls cluster_External External cluster_mom_coriolisadv MOM_CoriolisAdv cluster_mom_energetic_pbl MOM_energetic_PBL cluster_mom_eos MOM_EOS cluster_mom_internal_tides MOM_internal_tides cluster_mom_is_diag_mediator MOM_IS_diag_mediator cluster_mom_opacity MOM_opacity cluster_mom_open_boundary MOM_open_boundary cluster_mom_remapping MOM_remapping cluster_mom_shared_initialization MOM_shared_initialization cluster_mom_string_functions MOM_string_functions cluster_mom_surface_forcing MOM_surface_forcing cluster_mom_tidal_mixing MOM_tidal_mixing cluster_regrid_consts regrid_consts cluster_regrid_interp regrid_interp External::mom6 MOM6 mom_string_functions::uppercase uppercase External::mom6->mom_string_functions::uppercase mom_coriolisadv::coriolisadv_init CoriolisAdv_init mom_coriolisadv::coriolisadv_init->mom_string_functions::uppercase mom_energetic_pbl::energetic_pbl_init energetic_PBL_init mom_energetic_pbl::energetic_pbl_init->mom_string_functions::uppercase mom_eos::eos_init EOS_init mom_eos::eos_init->mom_string_functions::uppercase mom_internal_tides::internal_tides_init internal_tides_init mom_internal_tides::internal_tides_init->mom_string_functions::uppercase mom_is_diag_mediator::mom_is_diag_mediator_init MOM_IS_diag_mediator_init mom_is_diag_mediator::mom_is_diag_mediator_init->mom_string_functions::uppercase mom_opacity::opacity_init opacity_init mom_opacity::opacity_init->mom_string_functions::uppercase mom_open_boundary::register_segment_tracer register_segment_tracer mom_open_boundary::register_segment_tracer->mom_string_functions::uppercase mom_open_boundary::scale_factor_from_name scale_factor_from_name [private/internal] mom_open_boundary::scale_factor_from_name->mom_string_functions::uppercase mom_open_boundary::segment_thickness_reservoir_init segment_thickness_reservoir_init mom_open_boundary::segment_thickness_reservoir_init->mom_string_functions::uppercase mom_remapping::setreconstructiontype setReconstructionType [private/internal] mom_remapping::setreconstructiontype->mom_string_functions::uppercase mom_shared_initialization::read_face_length_list read_face_length_list mom_shared_initialization::read_face_length_list->mom_string_functions::uppercase mom_shared_initialization::reset_face_lengths_list reset_face_lengths_list mom_shared_initialization::reset_face_lengths_list->mom_string_functions::uppercase mom_surface_forcing::wind_forcing_from_file wind_forcing_from_file [private/internal] mom_surface_forcing::wind_forcing_from_file->mom_string_functions::uppercase mom_tidal_mixing::read_tidal_energy read_tidal_energy [private/internal] mom_tidal_mixing::read_tidal_energy->mom_string_functions::uppercase mom_tidal_mixing::tidal_mixing_init tidal_mixing_init mom_tidal_mixing::tidal_mixing_init->mom_string_functions::uppercase regrid_consts::coordinatemode coordinateMode regrid_consts::coordinatemode->mom_string_functions::uppercase regrid_interp::interpolation_scheme interpolation_scheme [private/internal] regrid_interp::interpolation_scheme->mom_string_functions::uppercase
Text view
function left_int(i)

Returns a character string of a left-formatted integer e.g. "123 " (assumes 19 digit maximum)

Parameters
  • i [in]

    The integer to convert to a string

  • left_int

    The output string

Callers call graph
Callers of mom_string_functions::left_int calls cluster_mom_file_parser MOM_file_parser cluster_mom_string_functions MOM_string_functions mom_file_parser::log_param_int log_param_int [private/internal] mom_string_functions::left_int left_int mom_file_parser::log_param_int->mom_string_functions::left_int mom_string_functions::left_ints left_ints mom_string_functions::left_ints->mom_string_functions::left_int mom_string_functions::left_reals left_reals mom_string_functions::left_reals->mom_string_functions::left_int mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::left_int
Text view
function left_ints(i)

Returns a character string of a comma-separated, compact formatted, integers e.g. "1, 2, 3, 4"

Parameters
  • i [in]

    The array of integers to convert to a string

  • left_ints

    The output string

Callees call graph
Callees of mom_string_functions::left_ints calls cluster_mom_string_functions MOM_string_functions mom_string_functions::left_int left_int mom_string_functions::left_ints left_ints mom_string_functions::left_ints->mom_string_functions::left_int
Text view
Callers call graph
Callers of mom_string_functions::left_ints calls cluster_mom_file_parser MOM_file_parser cluster_mom_string_functions MOM_string_functions mom_file_parser::log_param_int_array log_param_int_array [private/internal] mom_string_functions::left_ints left_ints mom_file_parser::log_param_int_array->mom_string_functions::left_ints mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::left_ints
Text view
function left_real(val)

Returns a left-justified string with a real formatted like '(G)'

Parameters
  • val [in]

    The real variable to convert to a string, in arbitrary units [A]

  • left_real

    The output string

Callees call graph
Callees of mom_string_functions::left_real calls cluster_mom_string_functions MOM_string_functions mom_string_functions::isformattedfloatequalto isFormattedFloatEqualTo [private/internal] mom_string_functions::left_real left_real mom_string_functions::left_real->mom_string_functions::isformattedfloatequalto
Text view
Callers call graph
Callers of mom_string_functions::left_real calls cluster_mom_file_parser MOM_file_parser cluster_mom_string_functions MOM_string_functions mom_file_parser::log_param_real log_param_real [private/internal] mom_string_functions::left_real left_real mom_file_parser::log_param_real->mom_string_functions::left_real mom_string_functions::left_reals left_reals mom_string_functions::left_reals->mom_string_functions::left_real mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::left_real
Text view
function left_reals(r, sep)

Returns a character string of a comma-separated, compact formatted, reals e.g. "1., 2., 5*3., 5.E2"

Parameters
  • r [in]

    The array of real variables to convert to a string, in arbitrary units [A]

  • sep [in]

    The separator between successive values, by default it is ', '.

  • left_reals

    The output string

Callees call graph
Callees of mom_string_functions::left_reals calls cluster_mom_string_functions MOM_string_functions mom_string_functions::left_int left_int mom_string_functions::left_real left_real mom_string_functions::left_reals left_reals mom_string_functions::left_reals->mom_string_functions::left_int mom_string_functions::left_reals->mom_string_functions::left_real
Text view
Callers call graph
Callers of mom_string_functions::left_reals calls cluster_mom_file_parser MOM_file_parser cluster_mom_string_functions MOM_string_functions mom_file_parser::log_param_real_array log_param_real_array [private/internal] mom_string_functions::left_reals left_reals mom_file_parser::log_param_real_array->mom_string_functions::left_reals mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::left_reals
Text view
function isFormattedFloatEqualTo(str, val)

Returns True if the string can be read/parsed to give the exact value of "val"

Parameters
  • str [in]

    The string to parse

  • val [in]

    The real value to compare with, in arbitrary units [A]

Callers call graph
Callers of mom_string_functions::isformattedfloatequalto calls cluster_mom_string_functions MOM_string_functions mom_string_functions::isformattedfloatequalto isFormattedFloatEqualTo [private/internal] mom_string_functions::left_real left_real mom_string_functions::left_real->mom_string_functions::isformattedfloatequalto
Text view
character(len=120) function extractWord(string, n)

Returns the string corresponding to the nth word in the argument or "" if the string is not long enough. Both spaces and commas are interpreted as separators.

Parameters
  • string [in]

    The string to scan

  • n [in]

    Number of word to extract

Callees call graph
Callees of mom_string_functions::extractword calls cluster_mom_string_functions MOM_string_functions mom_string_functions::extract_word extract_word mom_string_functions::extractword extractWord mom_string_functions::extractword->mom_string_functions::extract_word
Text view
Callers call graph
Callers of mom_string_functions::extractword calls cluster_mom_diag_remap MOM_diag_remap cluster_mom_int_tide_input MOM_int_tide_input cluster_mom_regridding MOM_regridding cluster_mom_string_functions MOM_string_functions mom_diag_remap::diag_remap_init diag_remap_init mom_string_functions::extractword extractWord mom_diag_remap::diag_remap_init->mom_string_functions::extractword mom_int_tide_input::int_tide_input_init int_tide_input_init mom_int_tide_input::int_tide_input_init->mom_string_functions::extractword mom_regridding::initialize_regridding initialize_regridding mom_regridding::initialize_regridding->mom_string_functions::extractword mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::extractword
Text view
character(len=120) function extract_word(string, separators, n)

Returns the string corresponding to the nth word in the argument or "" if the string is not long enough. Words are delineated by the mandatory separators argument.

Parameters
  • string [in]

    String to scan

  • separators [in]

    Characters to use for delineation

  • n [in]

    Number of word to extract

Callers call graph
Callers of mom_string_functions::extract_word calls cluster_mom_open_boundary MOM_open_boundary cluster_mom_string_functions MOM_string_functions mom_open_boundary::parse_segment_data_str parse_segment_data_str [private/internal] mom_string_functions::extract_word extract_word mom_open_boundary::parse_segment_data_str->mom_string_functions::extract_word mom_open_boundary::parse_segment_manifest_str parse_segment_manifest_str [private/internal] mom_open_boundary::parse_segment_manifest_str->mom_string_functions::extract_word mom_open_boundary::parse_segment_str parse_segment_str mom_open_boundary::parse_segment_str->mom_string_functions::extract_word mom_string_functions::extract_integer extract_integer mom_string_functions::extract_integer->mom_string_functions::extract_word mom_string_functions::extract_real extract_real mom_string_functions::extract_real->mom_string_functions::extract_word mom_string_functions::extractword extractWord mom_string_functions::extractword->mom_string_functions::extract_word mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::extract_word
Text view
integer function extract_integer(string, separators, n, missing_value)

Returns the integer corresponding to the nth word in the argument.

Parameters
  • string [in]

    String to scan

  • separators [in]

    Characters to use for delineation

  • n [in]

    Number of word to extract

  • missing_value [in]

    Value to assign if word is missing

Callees call graph
Callees of mom_string_functions::extract_integer calls cluster_mom_string_functions MOM_string_functions mom_string_functions::extract_integer extract_integer mom_string_functions::extract_word extract_word mom_string_functions::extract_integer->mom_string_functions::extract_word
Text view
Callers call graph
Callers of mom_string_functions::extract_integer calls cluster_mom_regridding MOM_regridding cluster_mom_string_functions MOM_string_functions mom_regridding::initialize_regridding initialize_regridding mom_string_functions::extract_integer extract_integer mom_regridding::initialize_regridding->mom_string_functions::extract_integer mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::extract_integer
Text view
real function extract_real(string, separators, n, missing_value)

Returns the real corresponding to the nth word in the argument, in arbitrary units [A].

Parameters
  • string [in]

    String to scan

  • separators [in]

    Characters to use for delineation

  • n [in]

    Number of word to extract

  • missing_value [in]

    Value to assign if word is missing, in arbitrary units [A]

Callees call graph
Callees of mom_string_functions::extract_real calls cluster_mom_string_functions MOM_string_functions mom_string_functions::extract_real extract_real mom_string_functions::extract_word extract_word mom_string_functions::extract_real->mom_string_functions::extract_word
Text view
Callers call graph
Callers of mom_string_functions::extract_real calls cluster_mom_internal_tides MOM_internal_tides cluster_mom_regridding MOM_regridding cluster_mom_string_functions MOM_string_functions mom_internal_tides::internal_tides_init internal_tides_init mom_string_functions::extract_real extract_real mom_internal_tides::internal_tides_init->mom_string_functions::extract_real mom_regridding::initialize_regridding initialize_regridding mom_regridding::initialize_regridding->mom_string_functions::extract_real mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::extract_real
Text view
character(len=120) function remove_spaces(string)

Returns string with all spaces removed.

Parameters
  • string [in]

    String to scan

Callers call graph
Callers of mom_string_functions::remove_spaces calls cluster_mom_open_boundary MOM_open_boundary cluster_mom_string_functions MOM_string_functions mom_open_boundary::open_boundary_config open_boundary_config mom_string_functions::remove_spaces remove_spaces mom_open_boundary::open_boundary_config->mom_string_functions::remove_spaces mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::remove_spaces
Text view
logical function string_functions_unit_tests(verbose)

Returns true if a unit test of string_functions fails.

Parameters
  • verbose [in]

    If true, write results to stdout

Callees call graph
Callees of mom_string_functions::string_functions_unit_tests calls cluster_mom_string_functions MOM_string_functions mom_string_functions::extract_integer extract_integer mom_string_functions::extract_real extract_real mom_string_functions::extract_word extract_word mom_string_functions::extractword extractWord mom_string_functions::ints_to_string ints_to_string mom_string_functions::left_int left_int mom_string_functions::left_ints left_ints mom_string_functions::left_real left_real mom_string_functions::left_reals left_reals mom_string_functions::localtesti localTestI [private/internal] mom_string_functions::localtestr localTestR [private/internal] mom_string_functions::localtests localTestS [private/internal] mom_string_functions::remove_spaces remove_spaces mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::extract_integer mom_string_functions::string_functions_unit_tests->mom_string_functions::extract_real mom_string_functions::string_functions_unit_tests->mom_string_functions::extract_word mom_string_functions::string_functions_unit_tests->mom_string_functions::extractword mom_string_functions::string_functions_unit_tests->mom_string_functions::ints_to_string mom_string_functions::string_functions_unit_tests->mom_string_functions::left_int mom_string_functions::string_functions_unit_tests->mom_string_functions::left_ints mom_string_functions::string_functions_unit_tests->mom_string_functions::left_real mom_string_functions::string_functions_unit_tests->mom_string_functions::left_reals mom_string_functions::string_functions_unit_tests->mom_string_functions::localtesti mom_string_functions::string_functions_unit_tests->mom_string_functions::localtestr mom_string_functions::string_functions_unit_tests->mom_string_functions::localtests mom_string_functions::string_functions_unit_tests->mom_string_functions::remove_spaces mom_string_functions::trim_trailing_commas trim_trailing_commas mom_string_functions::string_functions_unit_tests->mom_string_functions::trim_trailing_commas
Text view
Callers call graph
Callers of mom_string_functions::string_functions_unit_tests calls cluster_mom_string_functions MOM_string_functions cluster_mom_unit_tests MOM_unit_tests mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_unit_tests::unit_tests unit_tests mom_unit_tests::unit_tests->mom_string_functions::string_functions_unit_tests
Text view
logical function localTestS(verbose, str1, str2)

True if str1 does not match str2. False otherwise.

Parameters
  • verbose [in]

    If true, write results to stdout

  • str1 [in]

    String

  • str2 [in]

    String

Callers call graph
Callers of mom_string_functions::localtests calls cluster_mom_string_functions MOM_string_functions mom_string_functions::localtests localTestS [private/internal] mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::localtests
Text view
logical function localTestI(verbose, i1, i2)

True if i1 is not equal to i2. False otherwise.

Parameters
  • verbose [in]

    If true, write results to stdout

  • i1 [in]

    Integer

  • i2 [in]

    Integer

Callers call graph
Callers of mom_string_functions::localtesti calls cluster_mom_string_functions MOM_string_functions mom_string_functions::localtesti localTestI [private/internal] mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::localtesti
Text view
logical function localTestR(verbose, r1, r2)

True if r1 is not equal to r2. False otherwise.

Parameters
  • verbose [in]

    If true, write results to stdout

  • r1 [in]

    The first value to compare, in arbitrary units [A]

  • r2 [in]

    The first value to compare, in arbitrary units [A]

Callers call graph
Callers of mom_string_functions::localtestr calls cluster_mom_string_functions MOM_string_functions mom_string_functions::localtestr localTestR [private/internal] mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::localtestr
Text view
function slasher(dir)

Returns a directory name that is terminated with a "/" or "./" if the argument is an empty string.

Parameters
  • dir [in]

    A directory to be terminated with a "/" or changed to "./" if it is blank.

Callers call graph
Callers of mom_string_functions::slasher calls cluster_advection_test_tracer advection_test_tracer cluster_dome_tracer DOME_tracer cluster_dyed_obc_tracer dyed_obc_tracer cluster_ideal_age_example ideal_age_example cluster_isomip_initialization ISOMIP_initialization cluster_isomip_tracer ISOMIP_tracer cluster_marbl_tracers MARBL_tracers cluster_meso_surface_forcing MESO_surface_forcing cluster_mom_barotropic MOM_barotropic cluster_mom_cfc_cap MOM_CFC_cap cluster_mom_coord_initialization MOM_coord_initialization cluster_mom_diabatic_aux MOM_diabatic_aux cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_domains MOM_domains cluster_mom_file_parser MOM_file_parser cluster_mom_geothermal MOM_geothermal cluster_mom_get_input MOM_get_input cluster_mom_grid_initialize MOM_grid_initialize cluster_mom_hor_visc MOM_hor_visc cluster_mom_hybgen_regrid MOM_hybgen_regrid cluster_mom_ice_shelf MOM_ice_shelf cluster_mom_ice_shelf_dynamics MOM_ice_shelf_dynamics cluster_mom_ice_shelf_initialize MOM_ice_shelf_initialize cluster_mom_int_tide_input MOM_int_tide_input cluster_mom_internal_tides MOM_internal_tides cluster_mom_is_diag_mediator MOM_IS_diag_mediator cluster_mom_meke MOM_MEKE cluster_mom_mixed_layer_restrat MOM_mixed_layer_restrat cluster_mom_ocmip2_cfc MOM_OCMIP2_CFC cluster_mom_oda_driver_mod MOM_oda_driver_mod cluster_mom_open_boundary MOM_open_boundary cluster_mom_regridding MOM_regridding cluster_mom_self_attr_load MOM_self_attr_load cluster_mom_set_diffusivity MOM_set_diffusivity cluster_mom_set_visc MOM_set_visc cluster_mom_shared_initialization MOM_shared_initialization cluster_mom_state_initialization MOM_state_initialization cluster_mom_string_functions MOM_string_functions cluster_mom_sum_output MOM_sum_output cluster_mom_surface_forcing MOM_surface_forcing cluster_mom_thickness_diffuse MOM_thickness_diffuse cluster_mom_tidal_mixing MOM_tidal_mixing cluster_mom_vert_friction MOM_vert_friction cluster_oil_tracer oil_tracer cluster_rgc_initialization RGC_initialization cluster_rgc_tracer RGC_tracer cluster_user_tracer_example USER_tracer_example advection_test_tracer::register_advection_test_tracer register_advection_test_tracer mom_string_functions::slasher slasher advection_test_tracer::register_advection_test_tracer->mom_string_functions::slasher dome_tracer::register_dome_tracer register_DOME_tracer dome_tracer::register_dome_tracer->mom_string_functions::slasher dyed_obc_tracer::register_dyed_obc_tracer register_dyed_obc_tracer dyed_obc_tracer::register_dyed_obc_tracer->mom_string_functions::slasher ideal_age_example::register_ideal_age_tracer register_ideal_age_tracer ideal_age_example::register_ideal_age_tracer->mom_string_functions::slasher isomip_initialization::isomip_initialize_sponges ISOMIP_initialize_sponges isomip_initialization::isomip_initialize_sponges->mom_string_functions::slasher isomip_tracer::register_isomip_tracer register_ISOMIP_tracer isomip_tracer::register_isomip_tracer->mom_string_functions::slasher marbl_tracers::register_marbl_tracers register_MARBL_tracers marbl_tracers::register_marbl_tracers->mom_string_functions::slasher meso_surface_forcing::meso_surface_forcing_init MESO_surface_forcing_init meso_surface_forcing::meso_surface_forcing_init->mom_string_functions::slasher mom_barotropic::barotropic_init barotropic_init mom_barotropic::barotropic_init->mom_string_functions::slasher mom_cfc_cap::register_cfc_cap register_CFC_cap mom_cfc_cap::register_cfc_cap->mom_string_functions::slasher mom_coord_initialization::set_coord_from_file set_coord_from_file [private/internal] mom_coord_initialization::set_coord_from_file->mom_string_functions::slasher mom_coord_initialization::set_coord_from_ts_profile set_coord_from_TS_profile [private/internal] mom_coord_initialization::set_coord_from_ts_profile->mom_string_functions::slasher mom_diabatic_aux::diabatic_aux_init diabatic_aux_init mom_diabatic_aux::diabatic_aux_init->mom_string_functions::slasher mom_diag_mediator::diag_mediator_init diag_mediator_init mom_diag_mediator::diag_mediator_init->mom_string_functions::slasher mom_domains::mom_domains_init MOM_domains_init mom_domains::mom_domains_init->mom_string_functions::slasher mom_file_parser::open_param_file open_param_file mom_file_parser::open_param_file->mom_string_functions::slasher mom_geothermal::geothermal_init geothermal_init mom_geothermal::geothermal_init->mom_string_functions::slasher mom_get_input::get_mom_input get_MOM_input mom_get_input::get_mom_input->mom_string_functions::slasher mom_grid_initialize::set_grid_metrics_from_mosaic set_grid_metrics_from_mosaic [private/internal] mom_grid_initialize::set_grid_metrics_from_mosaic->mom_string_functions::slasher mom_hor_visc::hor_visc_init hor_visc_init mom_hor_visc::hor_visc_init->mom_string_functions::slasher mom_hybgen_regrid::init_hybgen_regrid init_hybgen_regrid mom_hybgen_regrid::init_hybgen_regrid->mom_string_functions::slasher mom_ice_shelf::initialize_ice_shelf initialize_ice_shelf mom_ice_shelf::initialize_ice_shelf->mom_string_functions::slasher mom_ice_shelf::initialize_ice_smb initialize_ice_SMB mom_ice_shelf::initialize_ice_smb->mom_string_functions::slasher mom_ice_shelf::initialize_shelf_mass initialize_shelf_mass [private/internal] mom_ice_shelf::initialize_shelf_mass->mom_string_functions::slasher mom_ice_shelf_dynamics::initialize_ice_shelf_dyn initialize_ice_shelf_dyn mom_ice_shelf_dynamics::initialize_ice_shelf_dyn->mom_string_functions::slasher mom_ice_shelf_initialize::initialize_ice_aglen initialize_ice_AGlen mom_ice_shelf_initialize::initialize_ice_aglen->mom_string_functions::slasher mom_ice_shelf_initialize::initialize_ice_c_basal_friction initialize_ice_C_basal_friction mom_ice_shelf_initialize::initialize_ice_c_basal_friction->mom_string_functions::slasher mom_ice_shelf_initialize::initialize_ice_flow_from_file initialize_ice_flow_from_file mom_ice_shelf_initialize::initialize_ice_flow_from_file->mom_string_functions::slasher mom_ice_shelf_initialize::initialize_ice_shelf_boundary_from_file initialize_ice_shelf_boundary_from_file mom_ice_shelf_initialize::initialize_ice_shelf_boundary_from_file->mom_string_functions::slasher mom_ice_shelf_initialize::initialize_ice_thickness_from_file initialize_ice_thickness_from_file [private/internal] mom_ice_shelf_initialize::initialize_ice_thickness_from_file->mom_string_functions::slasher mom_int_tide_input::int_tide_input_init int_tide_input_init mom_int_tide_input::int_tide_input_init->mom_string_functions::slasher mom_internal_tides::internal_tides_init internal_tides_init mom_internal_tides::internal_tides_init->mom_string_functions::slasher mom_is_diag_mediator::mom_is_diag_mediator_init MOM_IS_diag_mediator_init mom_is_diag_mediator::mom_is_diag_mediator_init->mom_string_functions::slasher mom_meke::meke_init MEKE_init mom_meke::meke_init->mom_string_functions::slasher mom_meke::ml_meke_init ML_MEKE_init [private/internal] mom_meke::ml_meke_init->mom_string_functions::slasher mom_mixed_layer_restrat::mixedlayer_restrat_init mixedlayer_restrat_init mom_mixed_layer_restrat::mixedlayer_restrat_init->mom_string_functions::slasher mom_ocmip2_cfc::register_ocmip2_cfc register_OCMIP2_CFC mom_ocmip2_cfc::register_ocmip2_cfc->mom_string_functions::slasher mom_oda_driver_mod::init_oda init_oda mom_oda_driver_mod::init_oda->mom_string_functions::slasher mom_open_boundary::initialize_segment_data initialize_segment_data mom_open_boundary::initialize_segment_data->mom_string_functions::slasher mom_regridding::initialize_regridding initialize_regridding mom_regridding::initialize_regridding->mom_string_functions::slasher mom_self_attr_load::sal_init SAL_init mom_self_attr_load::sal_init->mom_string_functions::slasher mom_set_diffusivity::set_diffusivity_init set_diffusivity_init mom_set_diffusivity::set_diffusivity_init->mom_string_functions::slasher mom_set_visc::set_visc_init set_visc_init mom_set_visc::set_visc_init->mom_string_functions::slasher mom_shared_initialization::apply_topography_edits_from_file apply_topography_edits_from_file mom_shared_initialization::apply_topography_edits_from_file->mom_string_functions::slasher mom_shared_initialization::initialize_topography_from_file initialize_topography_from_file mom_shared_initialization::initialize_topography_from_file->mom_string_functions::slasher mom_shared_initialization::reset_face_lengths_file reset_face_lengths_file mom_shared_initialization::reset_face_lengths_file->mom_string_functions::slasher mom_shared_initialization::reset_face_lengths_list reset_face_lengths_list mom_shared_initialization::reset_face_lengths_list->mom_string_functions::slasher mom_shared_initialization::set_meansl_from_file set_meanSL_from_file mom_shared_initialization::set_meansl_from_file->mom_string_functions::slasher mom_shared_initialization::set_subgrid_topo_at_vel_from_file set_subgrid_topo_at_vel_from_file mom_shared_initialization::set_subgrid_topo_at_vel_from_file->mom_string_functions::slasher mom_state_initialization::depress_surface depress_surface [private/internal] mom_state_initialization::depress_surface->mom_string_functions::slasher mom_state_initialization::initialize_oda_incupd_file initialize_oda_incupd_file [private/internal] mom_state_initialization::initialize_oda_incupd_file->mom_string_functions::slasher mom_state_initialization::initialize_sponges_file initialize_sponges_file [private/internal] mom_state_initialization::initialize_sponges_file->mom_string_functions::slasher mom_state_initialization::initialize_temp_salt_from_file initialize_temp_salt_from_file [private/internal] mom_state_initialization::initialize_temp_salt_from_file->mom_string_functions::slasher mom_state_initialization::initialize_temp_salt_from_profile initialize_temp_salt_from_profile [private/internal] mom_state_initialization::initialize_temp_salt_from_profile->mom_string_functions::slasher mom_state_initialization::initialize_thickness_from_file initialize_thickness_from_file [private/internal] mom_state_initialization::initialize_thickness_from_file->mom_string_functions::slasher mom_state_initialization::initialize_thickness_list initialize_thickness_list [private/internal] mom_state_initialization::initialize_thickness_list->mom_string_functions::slasher mom_state_initialization::initialize_velocity_from_file initialize_velocity_from_file [private/internal] mom_state_initialization::initialize_velocity_from_file->mom_string_functions::slasher mom_state_initialization::mom_initialize_state MOM_initialize_state mom_state_initialization::mom_initialize_state->mom_string_functions::slasher mom_state_initialization::mom_temp_salt_initialize_from_z MOM_temp_salt_initialize_from_Z [private/internal] mom_state_initialization::mom_temp_salt_initialize_from_z->mom_string_functions::slasher mom_state_initialization::trim_for_ice trim_for_ice [private/internal] mom_state_initialization::trim_for_ice->mom_string_functions::slasher mom_sum_output::mom_sum_output_init MOM_sum_output_init mom_sum_output::mom_sum_output_init->mom_string_functions::slasher mom_surface_forcing::surface_forcing_init surface_forcing_init mom_surface_forcing::surface_forcing_init->mom_string_functions::slasher mom_thickness_diffuse::thickness_diffuse_init thickness_diffuse_init mom_thickness_diffuse::thickness_diffuse_init->mom_string_functions::slasher mom_tidal_mixing::tidal_mixing_init tidal_mixing_init mom_tidal_mixing::tidal_mixing_init->mom_string_functions::slasher mom_vert_friction::vertvisc_init vertvisc_init mom_vert_friction::vertvisc_init->mom_string_functions::slasher oil_tracer::register_oil_tracer register_oil_tracer oil_tracer::register_oil_tracer->mom_string_functions::slasher rgc_initialization::rgc_initialize_sponges RGC_initialize_sponges rgc_initialization::rgc_initialize_sponges->mom_string_functions::slasher rgc_tracer::register_rgc_tracer register_RGC_tracer rgc_tracer::register_rgc_tracer->mom_string_functions::slasher user_tracer_example::user_register_tracer_example USER_register_tracer_example user_tracer_example::user_register_tracer_example->mom_string_functions::slasher
Text view
function trim_trailing_commas(in_str) result(out_str)

Returns a left-adjusted string with trailing blanks and commas removed.

Parameters
  • in_str [in]

    A string that is to be left adjusted and have its trailing commas and white space removed.

  • out_str

    A left-adjusted version of in_str with trailing commas and white space removed

Callers call graph
Callers of mom_string_functions::trim_trailing_commas calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_is_diag_mediator MOM_IS_diag_mediator cluster_mom_string_functions MOM_string_functions mom_diag_mediator::register_diag_field register_diag_field mom_string_functions::trim_trailing_commas trim_trailing_commas mom_diag_mediator::register_diag_field->mom_string_functions::trim_trailing_commas mom_diag_mediator::register_static_field register_static_field mom_diag_mediator::register_static_field->mom_string_functions::trim_trailing_commas mom_is_diag_mediator::register_mom_is_diag_field register_MOM_IS_diag_field mom_is_diag_mediator::register_mom_is_diag_field->mom_string_functions::trim_trailing_commas mom_is_diag_mediator::register_mom_is_static_field register_MOM_IS_static_field mom_is_diag_mediator::register_mom_is_static_field->mom_string_functions::trim_trailing_commas mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::trim_trailing_commas
Text view
function ints_to_string(a, n) result(i2s)

Convert the first n elements (3 by default) of an integer array into an underscore delimited string.

Parameters
  • a [in]

    The array of integers to translate

  • n [in]

    The number of elements to translate, by default the lesser of 3 or all of the integers

  • i2s

    The returned underscore delimited string of integers

Callers call graph
Callers of mom_string_functions::ints_to_string calls cluster_mom_diag_mediator MOM_diag_mediator cluster_mom_is_diag_mediator MOM_IS_diag_mediator cluster_mom_string_functions MOM_string_functions mom_diag_mediator::define_axes_group define_axes_group mom_string_functions::ints_to_string ints_to_string mom_diag_mediator::define_axes_group->mom_string_functions::ints_to_string mom_diag_mediator::define_axes_group_dsamp define_axes_group_dsamp [private/internal] mom_diag_mediator::define_axes_group_dsamp->mom_string_functions::ints_to_string mom_is_diag_mediator::define_axes_group define_axes_group mom_is_diag_mediator::define_axes_group->mom_string_functions::ints_to_string mom_string_functions::string_functions_unit_tests string_functions_unit_tests mom_string_functions::string_functions_unit_tests->mom_string_functions::ints_to_string
Text view
API generated with Flint · Rendered from reStructuredText