mom_file_parser module reference¶
The MOM6 facility to parse input files for runtime parameters.
Data Types¶
The valid lines extracted from an input parameter file without comments. |
|
A link in the list of variables that have already had override warnings issued. |
|
A structure that can be parsed to read and document run-time parameters. |
|
Specify the active parameter block. |
Functions/Subroutines¶
Make the contents of a parameter input file availalble in a |
|
Close any open input files and deallocate memory associated with this |
|
Read the contents of a parameter input file, and store the contents in a |
|
Return True if a /* appears on this line without a closing */. |
|
Return True if a */ appears on this line. |
|
Find position of last character before any comments, As marked by “!”, “//”, or “/*” following F90, C++, or C syntax. |
|
Find position of last non-blank character before any comments. |
|
Returns a string with tabs replaced by a blank. |
|
Trims comments and leading blanks from string. |
|
Constructs a string with all repeated whitespace replaced with single blanks and insert white space where it helps delineate tokens (e.g. |
|
This subroutine reads the value of an integer model parameter from a parameter file. |
|
This subroutine reads the values of an array of integer model parameters from a parameter file. |
|
This subroutine reads the value of a real model parameter from a parameter file. |
|
This subroutine reads the values of an array of real model parameters from a parameter file. |
|
This subroutine reads the value of a character string model parameter from a parameter file. |
|
This subroutine reads the values of an array of character string model parameters from a parameter file. |
|
This subroutine reads the value of a logical model parameter from a parameter file. |
|
This subroutine reads the value of a time_type model parameter from a parameter file. |
|
This function removes single and double quotes from a character string. |
|
This subtoutine extracts the contents of lines in the |
|
Record that a line has been used to set a parameter. |
|
Returns true if an override warning has been issued for the variable varName. |
|
Log the version of a module to a log file and/or stdout, and/or to the parameter documentation file. |
|
Log the version of a module to a log file and/or stdout. |
|
Log the name and value of an integer model parameter in documentation files. |
|
Log the name and values of an array of integer model parameter in documentation files. |
|
Log the name and value of a real model parameter in documentation files. |
|
Log the name and values of an array of real model parameter in documentation files. |
|
Log the name and value of a logical model parameter in documentation files. |
|
Log the name and value of a character string model parameter in documentation files. |
|
This subroutine writes the value of a time-type parameter to a log file, along with its name and the module it came from. |
|
This function converts a date into a string, valid with ticks and for dates up to year 99,999,999. |
|
This subroutine reads the value of an integer model parameter from a parameter file and logs it in documentation files. |
|
This subroutine reads the values of an array of integer model parameters from a parameter file and logs them in documentation files. |
|
This subroutine reads the value of a real model parameter from a parameter file and logs it in documentation files. |
|
This subroutine reads the values of an array of real model parameters from a parameter file and logs them in documentation files. |
|
This subroutine reads the value of a character string model parameter from a parameter file and logs it in documentation files. |
|
This subroutine reads the values of an array of character string model parameters from a parameter file and logs them in documentation files. |
|
This subroutine reads the value of a logical model parameter from a parameter file and logs it in documentation files. |
|
This subroutine reads the value of a time-type model parameter from a parameter file and logs it in documentation files. |
|
Resets the parameter block name to blank. |
|
Tags blockName onto the end of the active parameter block name. |
|
Remove the lowest level of recursion from the active block name. |
|
Extends block name (deeper level of parameter block) |
|
Truncates block name (shallower level of parameter block) |
Detailed Description¶
By Robert Hallberg and Alistair Adcroft, updated 9/2013.
The subroutines here parse a set of input files for the value a named parameter and sets that parameter at run time. Currently these files use use one of several formats: #define VAR ! To set the logical VAR to true. VAR = True ! To set the logical VAR to true. #undef VAR ! To set the logical VAR to false. VAR = False ! To set the logical VAR to false. #define VAR 999 ! To set the real or integer VAR to 999. VAR = 999 ! To set the real or integer VAR to 999. #override VAR = 888 ! To override a previously set value. VAR = 1.1, 2.2, 3.3 ! To set an array of real values.
Type Documentation¶
-
type
mom_file_parser/file_data_type¶ The valid lines extracted from an input parameter file without comments.
- Type fields
%num_lines[integer,private] :: The number of lines in this type.%line[character (len= input_str_length )(:),pointer, private] :: The line content.%line_used[logical(:),pointer, private] :: If true, the line has been read.
-
type
mom_file_parser/link_parameter¶ A link in the list of variables that have already had override warnings issued.
- Type fields
%next[type( link_parameter ),pointer, private] :: Facilitates linked list.%name[character (len=80),private] :: Parameter name.%hasissuedoverridewarning[logical,private] :: Has a default value.
-
type
mom_file_parser/param_file_type¶ A structure that can be parsed to read and document run-time parameters.
- Type fields
%nfiles[integer] :: The number of open files.%iounit[integer( max_param_files )] :: The unit numbers of open files.%filename[character (len= filename_length )( max_param_files )] :: The names of the open files.%netcdf_file[logical( max_param_files )] :: If true, the input file is in NetCDF.%param_data[type( file_data_type )( max_param_files )] :: Structures that contain the valid data lines from the parameter files, enabling all subsequent reads of parameter data to occur internally.%report_unused[logical] :: If true, report any parameter lines that are not used in the run.%unused_params_fatal[logical] :: If true, kill the run if there are any unused parameters.%log_to_stdout[logical] :: If true, all log messages are also sent to stdout.%log_open[logical] :: True if the log file has been opened.%stdout[integer] :: The unit number from%stdlog[integer] :: The unit number from%doc_file[character (len=240)] :: A file where all run-time parameters, their settings and defaults are documented.%complete_doc[logical] :: If true, document all run-time parameters.%minimal_doc[logical] :: If true, document only those run-time parameters that differ from defaults.%doc[type(doc_type),pointer] :: A structure that contains information related to parameter documentation.%chain[type( link_parameter ),pointer] :: Facilitates linked list.%blockname[type( parameter_block ),pointer] :: Name of active parameter block.
-
type
mom_file_parser/parameter_block¶ Specify the active parameter block.
- Type fields
%name[character (len=240),private] :: The active parameter block name.
Function/Subroutine Documentation¶
-
subroutine
mom_file_parser/open_param_file(filename, CS, checkable, component, doc_file_dir)¶ Make the contents of a parameter input file availalble in a
param_file_type(). .- Parameters
filename :: [in] An input file name, optionally with the full path
cs :: [inout] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
checkable :: [in] If this is false, it disables checks of this file for unused parameters. The default is True.
component :: [in] If present, this component name is used to generate parameter documentation file names; the default is”MOM”
doc_file_dir :: [in] An optional directory in which to write out the documentation files. The default is effectively ‘./’.
- Call to
all_pes_readcomplete_doc_defaultmom_error_handler::is_root_peminimal_doc_defaultpopulate_param_data- Called from
-
subroutine
mom_file_parser/close_param_file(CS, quiet_close, component)¶ Close any open input files and deallocate memory associated with this
param_file_type(). To use this type again, open_param_file would have to be called again. . To use this type again, open_param_file would have to be called again.- Parameters
cs :: [inout] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
quiet_close :: [in] if present and true, do not do any logging with this call.
component :: [in] If present, this component name is used to generate parameter documentation file names
- Call to
all_pes_readcomplete_doc_defaultmom_error_handler::is_root_pelog_to_stdout_defaultminimal_doc_defaultreport_unused_defaultunused_params_fatal_default- Called from
mom_tracer_flow_control::call_tracer_flux_initmom_mainocean_model_mod::ocean_model_init
-
subroutine
mom_file_parser/populate_param_data(iounit, filename, param_data)¶ Read the contents of a parameter input file, and store the contents in a
file_data_type()after removing comments and simplifying white space. after removing comments and simplifying white space.- Parameters
iounit :: [in] The IO unit number that is open for filename
filename :: [in] An input file name, optionally with the full path
param_data :: [inout] A list of the input lines that set parameters after comments have been stripped out.
- Call to
all_pes_readclosemultilinecommentinput_str_lengthmom_error_handler::is_root_pelastnoncommentnonblankopenmultilinecommentremovecommentsreplacetabssimplifywhitespace- Called from
-
function
mom_file_parser/openmultilinecomment(string) [logical]¶ Return True if a /* appears on this line without a closing */.
- Parameters
string :: [in] The input string to process
- Call to
- Called from
-
function
mom_file_parser/closemultilinecomment(string) [logical]¶ Return True if a */ appears on this line.
- Parameters
string :: [in] The input string to process
- Called from
-
function
mom_file_parser/lastnoncommentindex(string) [integer]¶ Find position of last character before any comments, As marked by “!”, “//”, or “/*” following F90, C++, or C syntax.
- Parameters
string :: [in] The input string to process
- Called from
-
function
mom_file_parser/lastnoncommentnonblank(string) [integer]¶ Find position of last non-blank character before any comments.
- Parameters
string :: [in] The input string to process
- Call to
- Called from
-
function
mom_file_parser/replacetabs(string) [character(len=len(string))]¶ Returns a string with tabs replaced by a blank.
- Parameters
string :: [in] The input string to process
- Called from
-
function
mom_file_parser/removecomments(string) [character(len=len(string))]¶ Trims comments and leading blanks from string.
- Parameters
string :: [in] The input string to process
- Call to
- Called from
-
function
mom_file_parser/simplifywhitespace(string) [character(len=len(string)+16)]¶ Constructs a string with all repeated whitespace replaced with single blanks and insert white space where it helps delineate tokens (e.g. around =)
- Parameters
string :: [in] A string to modify to simpify white space
- Call to
- Called from
-
subroutine
mom_file_parser/read_param_int(CS, varname, value, fail_if_missing)¶ This subroutine reads the value of an integer model parameter from a parameter file.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
- Call to
- Called from
-
subroutine
mom_file_parser/read_param_int_array(CS, varname, value, fail_if_missing)¶ This subroutine reads the values of an array of integer model parameters from a parameter file.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
- Call to
- Called from
-
subroutine
mom_file_parser/read_param_real(CS, varname, value, fail_if_missing, scale)¶ This subroutine reads the value of a real model parameter from a parameter file.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
scale :: [in] A scaling factor that the parameter is multiplied by before it is returned.
- Call to
- Called from
-
subroutine
mom_file_parser/read_param_real_array(CS, varname, value, fail_if_missing, scale)¶ This subroutine reads the values of an array of real model parameters from a parameter file.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
scale :: [in] A scaling factor that the parameter is multiplied by before it is returned.
- Call to
- Called from
-
subroutine
mom_file_parser/read_param_char(CS, varname, value, fail_if_missing)¶ This subroutine reads the value of a character string model parameter from a parameter file.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
- Call to
- Called from
-
subroutine
mom_file_parser/read_param_char_array(CS, varname, value, fail_if_missing)¶ This subroutine reads the values of an array of character string model parameters from a parameter file.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
- Call to
- Called from
-
subroutine
mom_file_parser/read_param_logical(CS, varname, value, fail_if_missing)¶ This subroutine reads the value of a logical model parameter from a parameter file.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
- Call to
- Called from
-
subroutine
mom_file_parser/read_param_time(CS, varname, value, timeunit, fail_if_missing, date_format)¶ This subroutine reads the value of a time_type model parameter from a parameter file.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file
timeunit :: [in] The number of seconds in a time unit for real-number input.
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
date_format :: [out] If present, this indicates whether this parameter was read in a date format, so that it can later be logged in the same format.
- Call to
- Called from
-
function
mom_file_parser/strip_quotes(val_str) [character(len=input_str_length)]¶ This function removes single and double quotes from a character string.
- Parameters
val_str :: The character string to work on
- Called from
-
subroutine
mom_file_parser/get_variable_line(CS, varname, found, defined, value_string, paramIsLogical)¶ This subtoutine extracts the contents of lines in the
param_file_type()that refer to a named parameter. The value_string that is returned must be interepreted in a way that depends on the type of this variable. that refer to a named parameter. The value_string that is returned must be interepreted in a way that depends on the type of this variable.- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
varname :: [in] The case-sensitive name of the parameter to read
found :: [out] If true, this parameter has been found in CS
defined :: [out] If true, this parameter is set (or true) in the CS
value_string :: [out] A string that encodes the new value
paramislogical :: [in] If true, this is a logical parameter that can be simply defined without parsing a value_string.
- Call to
flag_line_as_readinput_str_lengthmom_error_handler::is_root_peoverridewarninghasbeenissuedpopblocklevelpushblocklevel- Called from
read_param_charread_param_char_arrayread_param_intread_param_int_arrayread_param_logicalread_param_realread_param_real_arrayread_param_time
-
subroutine
mom_file_parser/flag_line_as_read(line_used, count)¶ Record that a line has been used to set a parameter.
- Parameters
line_used :: A structure indicating which lines have been read
count :: [in] The parameter on this line number has been read
- Called from
-
function
mom_file_parser/overridewarninghasbeenissued(chain, varName) [logical]¶ Returns true if an override warning has been issued for the variable varName.
- Parameters
chain :: The linked list of variables that have already had override warnings issued
varname :: [in] The name of the variable being queried for warnings
- Called from
-
subroutine
mom_file_parser/log_version_cs(CS, modulename, version, desc, log_to_all, all_default, layout, debugging)¶ Log the version of a module to a log file and/or stdout, and/or to the parameter documentation file.
- Parameters
cs :: [in] File parser type
modulename :: [in] Name of calling module
version :: [in] Version string of module
desc :: [in] Module description
log_to_all :: [in] If present and true, log this parameter to the …_doc.all files, even if this module also has layout or debugging parameters.
all_default :: [in] If true, all parameters take their default values.
layout :: [in] If present and true, this module has layout parameters.
debugging :: [in] If present and true, this module has debugging parameters.
- Call to
-
subroutine
mom_file_parser/log_version_plain(modulename, version)¶ Log the version of a module to a log file and/or stdout.
- Parameters
modulename :: [in] Name of calling module
version :: [in] Version string of module
- Call to
-
subroutine
mom_file_parser/log_param_int(CS, modulename, varname, value, desc, units, default, layoutParam, debuggingParam, like_default)¶ Log the name and value of an integer model parameter in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the module using this parameter
varname :: [in] The name of the parameter to log
value :: [in] The value of the parameter to log
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
layoutparam :: [in] If present and true, this parameter is logged in the layout parameter file
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
- Called from
-
subroutine
mom_file_parser/log_param_int_array(CS, modulename, varname, value, desc, units, default, layoutParam, debuggingParam, like_default)¶ Log the name and values of an array of integer model parameter in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the module using this parameter
varname :: [in] The name of the parameter to log
value :: [in] The value of the parameter to log
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
layoutparam :: [in] If present and true, this parameter is logged in the layout parameter file
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
- Called from
-
subroutine
mom_file_parser/log_param_real(CS, modulename, varname, value, desc, units, default, debuggingParam, like_default)¶ Log the name and value of a real model parameter in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The name of the parameter to log
value :: [in] The value of the parameter to log
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
mom_error_handler::is_root_pemom_string_functions::left_real- Called from
-
subroutine
mom_file_parser/log_param_real_array(CS, modulename, varname, value, desc, units, default, debuggingParam, like_default)¶ Log the name and values of an array of real model parameter in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The name of the parameter to log
value :: [in] The value of the parameter to log
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
mom_error_handler::is_root_pemom_string_functions::left_reals- Called from
-
subroutine
mom_file_parser/log_param_logical(CS, modulename, varname, value, desc, units, default, layoutParam, debuggingParam, like_default)¶ Log the name and value of a logical model parameter in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The name of the parameter to log
value :: [in] The value of the parameter to log
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
layoutparam :: [in] If present and true, this parameter is logged in the layout parameter file
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
- Called from
-
subroutine
mom_file_parser/log_param_char(CS, modulename, varname, value, desc, units, default, layoutParam, debuggingParam, like_default)¶ Log the name and value of a character string model parameter in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The name of the parameter to log
value :: [in] The value of the parameter to log
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
layoutparam :: [in] If present and true, this parameter is logged in the layout parameter file
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
- Called from
-
subroutine
mom_file_parser/log_param_time(CS, modulename, varname, value, desc, units, default, timeunit, layoutParam, debuggingParam, log_date, like_default)¶ This subroutine writes the value of a time-type parameter to a log file, along with its name and the module it came from.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The name of the parameter to log
value :: [in] The value of the parameter to log
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
timeunit :: [in] The number of seconds in a time unit for real-number output.
log_date :: [in] If true, log the time_type in date format. If missing the default is false.
layoutparam :: [in] If present and true, this parameter is logged in the layout parameter file
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
like_default :: [in] If present and true, log this parameter as though it has the default value, even if there is no default.
- Call to
- Called from
-
function
mom_file_parser/convert_date_to_string(date) [character(len=40)]¶ This function converts a date into a string, valid with ticks and for dates up to year 99,999,999.
- Parameters
date :: [in] The date to be translated into a string.
- Return
undefined :: A date string in a format like YYYY-MM-DD HH:MM:SS.sss
- Called from
-
subroutine
mom_file_parser/get_param_int(CS, modulename, varname, value, desc, units, default, fail_if_missing, do_not_read, do_not_log, static_value, layoutParam, debuggingParam)¶ This subroutine reads the value of an integer model parameter from a parameter file and logs it in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file and logged
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
static_value :: [in] If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
do_not_read :: [in] If present and true, do not read a value for this parameter, although it might be logged.
do_not_log :: [in] If present and true, do not log this parameter to the documentation files
layoutparam :: [in] If present and true, this parameter is logged in the layout parameter file
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
- Call to
-
subroutine
mom_file_parser/get_param_int_array(CS, modulename, varname, value, desc, units, default, fail_if_missing, do_not_read, do_not_log, static_value, layoutParam, debuggingParam)¶ This subroutine reads the values of an array of integer model parameters from a parameter file and logs them in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be reset from the parameter file
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
static_value :: [in] If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
do_not_read :: [in] If present and true, do not read a value for this parameter, although it might be logged.
do_not_log :: [in] If present and true, do not log this parameter to the documentation files
layoutparam :: [in] If present and true, this parameter is logged in the layout parameter file
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
- Call to
-
subroutine
mom_file_parser/get_param_real(CS, modulename, varname, value, desc, units, default, fail_if_missing, do_not_read, do_not_log, static_value, debuggingParam, scale, unscaled)¶ This subroutine reads the value of a real model parameter from a parameter file and logs it in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file and logged
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
static_value :: [in] If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
do_not_read :: [in] If present and true, do not read a value for this parameter, although it might be logged.
do_not_log :: [in] If present and true, do not log this parameter to the documentation files
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
scale :: [in] A scaling factor that the parameter is multiplied by before it is returned.
unscaled :: [out] The value of the parameter that would be returned without any multiplication by a scaling factor.
- Call to
-
subroutine
mom_file_parser/get_param_real_array(CS, modulename, varname, value, desc, units, default, fail_if_missing, do_not_read, do_not_log, debuggingParam, static_value, scale, unscaled)¶ This subroutine reads the values of an array of real model parameters from a parameter file and logs them in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file and logged
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
static_value :: [in] If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
do_not_read :: [in] If present and true, do not read a value for this parameter, although it might be logged.
do_not_log :: [in] If present and true, do not log this parameter to the documentation files
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
scale :: [in] A scaling factor that the parameter is multiplied by before it is returned.
unscaled :: [out] The value of the parameter that would be returned without any multiplication by a scaling factor.
- Call to
-
subroutine
mom_file_parser/get_param_char(CS, modulename, varname, value, desc, units, default, fail_if_missing, do_not_read, do_not_log, static_value, layoutParam, debuggingParam)¶ This subroutine reads the value of a character string model parameter from a parameter file and logs it in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file and logged
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
static_value :: [in] If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
do_not_read :: [in] If present and true, do not read a value for this parameter, although it might be logged.
do_not_log :: [in] If present and true, do not log this parameter to the documentation files
layoutparam :: [in] If present and true, this parameter is logged in the layout parameter file
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
- Call to
-
subroutine
mom_file_parser/get_param_char_array(CS, modulename, varname, value, desc, units, default, fail_if_missing, do_not_read, do_not_log, static_value)¶ This subroutine reads the values of an array of character string model parameters from a parameter file and logs them in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file and logged
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
static_value :: [in] If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
do_not_read :: [in] If present and true, do not read a value for this parameter, although it might be logged.
do_not_log :: [in] If present and true, do not log this parameter to the documentation files
- Call to
-
subroutine
mom_file_parser/get_param_logical(CS, modulename, varname, value, desc, units, default, fail_if_missing, do_not_read, do_not_log, static_value, layoutParam, debuggingParam)¶ This subroutine reads the value of a logical model parameter from a parameter file and logs it in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file and logged
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
static_value :: [in] If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
do_not_read :: [in] If present and true, do not read a value for this parameter, although it might be logged.
do_not_log :: [in] If present and true, do not log this parameter to the documentation files
layoutparam :: [in] If present and true, this parameter is logged in the layout parameter file
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
- Call to
-
subroutine
mom_file_parser/get_param_time(CS, modulename, varname, value, desc, units, default, fail_if_missing, do_not_read, do_not_log, timeunit, static_value, layoutParam, debuggingParam, log_as_date)¶ This subroutine reads the value of a time-type model parameter from a parameter file and logs it in documentation files.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
modulename :: [in] The name of the calling module
varname :: [in] The case-sensitive name of the parameter to read
value :: [inout] The value of the parameter that may be read from the parameter file and logged
desc :: [in] A description of this variable; if not present, this parameter is not written to a doc file
units :: [in] The units of this parameter
default :: [in] The default value of the parameter
static_value :: [in] If this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
fail_if_missing :: [in] If present and true, a fatal error occurs if this variable is not found in the parameter file
do_not_read :: [in] If present and true, do not read a value for this parameter, although it might be logged.
do_not_log :: [in] If present and true, do not log this parameter to the documentation files
timeunit :: [in] The number of seconds in a time unit for real-number input to be translated to a time.
layoutparam :: [in] If present and true, this parameter is logged in the layout parameter file
debuggingparam :: [in] If present and true, this parameter is logged in the debugging parameter file
log_as_date :: [in] If true, log the time_type in date format. The default is false.
- Call to
-
subroutine
mom_file_parser/clearparameterblock(CS)¶ Resets the parameter block name to blank.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
- Call to
-
subroutine
mom_file_parser/openparameterblock(CS, blockName, desc)¶ Tags blockName onto the end of the active parameter block name.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
blockname :: [in] The name of a parameter block being added
desc :: [in] A description of the parameter block being added
- Call to
mom_document::doc_openblockmom_error_handler::is_root_pepushblocklevel- Called from
baroclinic_zone_initialization::bcz_paramsmom_cvmix_kpp::kpp_init
-
subroutine
mom_file_parser/closeparameterblock(CS)¶ Remove the lowest level of recursion from the active block name.
- Parameters
cs :: [in] The control structure for the file_parser module, it is also a structure to parse for run-time parameters
- Call to
mom_document::doc_closeblockmom_error_handler::is_root_pepopblocklevel- Called from
baroclinic_zone_initialization::bcz_paramsmom_cvmix_kpp::kpp_init
-
function
mom_file_parser/pushblocklevel(oldblockName, newBlockName) [character(len=len(oldblockname)+40)]¶ Extends block name (deeper level of parameter block)
- Parameters
oldblockname :: [in] A sequence of hierarchical parameter block names
newblockname :: [in] A new block name to add to the end of the sequence
- Called from
-
function
mom_file_parser/popblocklevel(oldblockName) [character(len=len(oldblockname)+40)]¶ Truncates block name (shallower level of parameter block)
- Parameters
oldblockname :: [in] A sequence of hierarchical parameter block names
- Call to
- Called from