FMS  2024.03
Flexible Modeling System
field_manager_mod

Reads entries from a field table and stores this information along with the type of field it belongs to. More...

Data Types

type  field_def
 Private type for internal use. More...
 
type  field_mgr_type
 Private type for internal use. More...
 
type  field_names_type
 Private type for internal use. More...
 
type  field_names_type_short
 Private type for internal use. More...
 
interface  find_field_index
 Returns an index corresponding to the given field name. More...
 
interface  fm_get_value
 An overloaded function to find and extract a value for a named field. More...
 
type  fm_list_iter_type
 Iterator over the field manager list. More...
 
interface  fm_loop_over_list
 A function for looping over a list. More...
 
interface  fm_new_value
 An overloaded function to assign a value to a field. More...
 
type  method_type
 This method_type is a way to allow a component module to alter the parameters it needs for various tracers. More...
 
type  method_type_short
 This method_type is the same as method_type except that the method_control string is not present. This is used when you wish to change to a scheme within a module but do not need to pass parameters. See method_type for member information. More...
 
type  method_type_very_short
 This is the same as method_type except that the method_control and method_name strings are not present. This is used when you wish to change to a scheme within a module but do not need to pass parameters. More...
 
interface  parse
 A function to parse an integer or an array of integers, a real or an array of reals, a string or an array of strings. More...
 

Functions/Subroutines

subroutine check_for_name_duplication
 
subroutine concat_strings (str1, str2)
 private function: appends str2 to the end of str1, with length check
 
type(field_def) function, pointer, private create_field (parent_p, name)
 A function to create a field as a child of parent_p. This will return a pointer to a field_def type. More...
 
logical recursive function, private dump_list (list_p, recursive, depth, out_unit)
 This is a function that lists the parameters of a field. More...
 
subroutine, public field_manager_end
 Destructor for field manager. More...
 
subroutine, public field_manager_init (nfields, table_name)
 Routine to initialize the field manager. More...
 
subroutine, private find_base (name, path, base)
 A subroutine that splits a listname into a path and a base. More...
 
type(field_def) function, pointer, private find_field (name, this_list_p)
 Find and return a pointer to the field in the specified list. Return a null pointer on error. More...
 
integer function, public find_field_index_new (field_name)
 
integer function, public find_field_index_old (model, field_name)
 Function to return the index of the field. More...
 
subroutine, private find_head (name, head, rest)
 Find the first list for a name by splitting the name into a head and the rest. More...
 
type(field_def) function, pointer, private find_list (path, relative_p, create)
 Find and return a pointer to the specified list, relative to relative_p. Return a null pointer on error. More...
 
recursive logical function find_method (list_p, recursive, num_meth, method, control)
 Given a field list pointer this function retrieves methods and associated parameters for the field list. More...
 
logical function, public fm_change_list (name)
 Change the current list. Return true on success, false otherwise. More...
 
logical function, public fm_change_root (name)
 Change the root list. More...
 
integer function, public fm_copy_list (list_name, suffix, create)
 A function that allows the user to copy a field and add a suffix to the name of the new field. More...
 
logical function, public fm_dump_list (name, recursive, unit)
 A function to list properties associated with a field. More...
 
logical function, public fm_exists (name)
 A function to test whether a named field exists. More...
 
logical function, public fm_find_methods (list_name, methods, control)
 This function retrieves all the methods associated with a field. More...
 
character(len=fms_path_len) function, public fm_get_current_list ()
 A function to return the full path of the current list. More...
 
integer function, public fm_get_index (name)
 A function to return the index of a named field. More...
 
integer function, public fm_get_length (name)
 A function to return how many elements are contained within the named list or entry. More...
 
character(len=8) function, public fm_get_type (name)
 A function to return the type of the named field. More...
 
logical function, public fm_get_value_integer (name, get_ival, index)
 
logical function, public fm_get_value_logical (name, get_lval, index)
 
logical function, public fm_get_value_string (name, get_sval, index)
 
subroutine, public fm_init_loop (loop_list, iter)
 given a name of the list, prepares an iterator over the list content. If the name of the given list is blank, then the current list is used More...
 
logical function fm_loop_over_list_new (iter, name, field_type, index)
 given a list iterator, returns information about curren list element and advances the iterator to the next list element. At the end of the list, returns FALSE More...
 
logical function fm_loop_over_list_old (list, name, field_type, index)
 Iterates through the given list. More...
 
logical function, public fm_modify_name (oldname, newname)
 This function allows a user to rename a field without modifying the contents of the field. More...
 
integer function, public fm_new_list (name, create, keep)
 A function to create a new list. More...
 
integer function, public fm_new_value_integer (name, new_ival, create, index, append)
 Assigns a given value to a given field. More...
 
integer function, public fm_new_value_logical (name, new_lval, create, index, append)
 Assigns a given value to a given field. More...
 
integer function, public fm_new_value_string (name, new_sval, create, index, append)
 Assigns a given value to a given field. More...
 
logical function, public fm_query_method (name, method_name, method_control)
 This is a function that provides the capability to return parameters associated with a field in a pair of strings. More...
 
subroutine, public fm_reset_loop
 Resets the loop variable. For use in conjunction with fm_loop_over_list.
 
subroutine, public fm_return_root
 Return the root list to the value at initialization. More...
 
type(field_def) function, pointer, private get_field (name, this_list_p)
 Return a pointer to the field if it exists relative to this_list_p, null otherwise. More...
 
subroutine, public get_field_info (n, fld_type, fld_name, model, num_methods)
 This routine allows access to field information given an index. More...
 
subroutine, public get_field_method (n, m, method)
 A routine to get a specified method. More...
 
subroutine, public get_field_methods (n, methods)
 A routine to obtain all the methods associated with a field. More...
 
subroutine, private initialize_module_variables
 A function to initialize the values of the pointers. This will remove all fields and reset the field tree to only the root field.
 
type(field_def) function, pointer, private make_list (this_list_p, name)
 This function creates a new field and returns a pointer to that field. More...
 
subroutine new_name (list_name, method_name_in, val_name_in)
 Subroutine to add new values to list parameters. More...
 
subroutine new_name_yaml (list_name, method_name_in, val_name_in)
 Subroutine to add new values to list parameters. More...
 
integer function parse_integer (text, label, parse_ival)
 
function parse_integers (text, label, values)
 
integer function parse_string (text, label, parse_sval)
 
function parse_strings (text, label, values)
 
recursive logical function query_method (list_p, recursive, name, method_name, method_control)
 A private function that can recursively recover values for parameters associated with a field. More...
 
subroutine read_field_table_legacy (nfields, table_name)
 Routine to read and parse the field table yaml. More...
 
subroutine read_field_table_yaml (nfields, table_name)
 Routine to read and parse the field table yaml. More...
 
logical function set_list_stuff ()
 If the the pointer matches to the right list, extract the field information. Used in fm_loop_over_list. More...
 
subroutine strip_front_blanks (name)
 A routine to strip whitespace from the start of character strings. More...
 

Variables

type(field_def), pointer current_list_p => NULL()
 
type(method_type), public default_method
 
character(len=fm_type_name_len), dimension(num_types) field_type_name
 
type(field_mgr_type), dimension(:), allocatable, private fields
 fields of field_mgr_type
 
integer, parameter, public fm_field_name_len = 48
 The length of a character string representing the field name.
 
integer, parameter, public fm_path_name_len = FMS_PATH_LEN
 The length of a character string representing the field path.
 
integer, parameter, public fm_string_len = 1024
 The length of a character string representing character values for the field.
 
integer, parameter, public fm_type_name_len = 8
 The length of a character string representing the various types that the values of the field can take.
 
character(len=fms_path_len) loop_list
 
type(field_def), pointer loop_list_p => NULL()
 
integer, parameter, public model_atmos = 1
 Atmospheric model.
 
integer, parameter, public model_coupler = 5
 Ice model.
 
integer, parameter, public model_ice = 4
 Ice model.
 
integer, parameter, public model_land = 3
 Land model.
 
character(len=11), dimension(num_models), parameter, public model_names =(/'atmospheric','oceanic ','land ','ice ','coupler '/)
 Model names, e.g. MODEL_NAMES(MODEL_OCEAN) is 'oceanic'.
 
integer, parameter, public model_ocean = 2
 Ocean model.
 
integer, parameter, public no_field = -1
 The value returned if a field is not defined.
 
integer num_fields = 0
 
integer, parameter, public num_models = 5
 Number of models (ATMOS, OCEAN, LAND, ICE, COUPLER).
 
type(field_def), target, save root
 
type(field_def), pointer root_p => NULL()
 
character(len=fm_field_name_len) save_root_name
 
type(field_def), pointer save_root_parent_p => NULL()
 
character(len=52) set = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
 
character(len=50) set_nonexp = "ABCDFGHIJKLMNOPQRSTUVWXYZabcdfghijklmnopqrstuvwxyz"
 
character(len=13) setnum = "0123456789+-."
 
logical use_field_table_yaml = .false.
 .True. if using the field_table.yaml, .false. if using the legacy field_table
 

Detailed Description

Reads entries from a field table and stores this information along with the type of field it belongs to.

This allows the component models to query the field manager to see if non-default methods of operation are desired. In essence the field table is a powerful type of namelist. Default values can be provided for all the fields through a namelist, individual fields can be modified through the field table however.

Author
William Cooke

An example of field table entries could be

              "tracer","atmos_mod","sphum"

              "tracer","atmos_mod","sf6"
              "longname","sulf_hex"
              "advection_scheme_horiz","2nd_order"
              "Profile_type","Fixed","surface_value = 0.0E+00"/

              "prog_tracers","ocean_mod","age_global"
              horizontal-advection-scheme = mdfl_sweby
              vertical-advection-scheme = mdfl_sweby
              restart_file = ocean_age.res.nc
 

The field table consists of entries in the following format.

The first line of an entry should consist of three quoted strings.

The first quoted string will tell the field manager what type of field it is.

The second quoted string will tell the field manager which model the field is being applied to. The supported types at present are

      "coupler_mod" for the coupler,
      "atmos_mod" for the atmosphere model,
      "ocean_mod" for the ocean model,
      "land_mod" for the land model, and,
      "ice_mod" for the ice model.

The third quoted string should be a unique name that can be used as a query.

The second and following lines of each entry are called methods in this context. Methods can be developed within any module and these modules can query the field manager to find any methods that are supplied in the field table.

These lines can be coded quite flexibly.

The line can consist of two or three quoted strings or a simple unquoted string.

If the line consists two or three quoted strings, then the first string will be an identifier that the querying module will ask for.

The second string will be a name that the querying module can use to set up values for the module.

The third string, if present, can supply parameters to the calling module that can be parsed and used to further modify values.

If the line consists of a simple unquoted string then quotes are not allowed in any part of the line.

An entry is ended with a backslash (/) as the final character in a row.

Comments can be inserted in the field table by having a # as the first character in the line.

In the example above we have three field entries.

The first is a simple declaration of a tracer called "sphum".

The second is for a tracer called "sf6". In this case a field named "longname" will be given the value "sulf_hex". A field named "advection_scheme_horiz" will be given the value "2nd_order". Finally a field name "Profile_type" will be given a child field called "Fixed", and that field will be given a field called "surface_value" with a real value of 0.0E+00.

The third entry is an example of a oceanic age tracer. Note that the method lines are formatted differently here. This is the flexibility mentioned above.

With these formats, a number of restrictions are required.

The following formats are equally valid.

      "longname","sulf_hex"
      "longname = sulf_hex"
      longname = sulf_hex

However the following is not valid.

      longname = "sulf_hex"

In the SF6 example above the last line of the entry could be written in the following ways.

      "Profile_type","Fixed","surface_value = 0.0E+00"/
      Profile_type/Fixed/surface_value = 0.0E+00/

Values supplied with fields are converted to the various types with the following assumptions.

 Real values : These values contain a decimal point or are in exponential format.
    These values only support e or E format for exponentials.
    e.g. 10.0, 1e10 and 1E10 are considered to be real numbers.

 Integer values : These values only contain numbers.
    e.g 10 is an integer. 10.0 and 1e10 are not.

 Logical values : These values are supplied as one of the following formats.
    T, .T., TRUE, .TRUE.
    t, .t., true, .true.
    F, .F., FALSE, .FALSE.
    f, .f., false, .false.
    These will be converted to T or F in a dump of the field.

 Character strings : These values are assumed to be strings if a character
    other than an e (or E) is in the value. Numbers can be suppled in the value.
    If the value does not meet the criteria for a real, integer or logical type,
    it is assumed to be a character type.

The entries within the field table can be designed by the individual authors of code to allow modification of their routines.


Data Type Documentation

◆ field_manager_mod::field_def

type field_manager_mod::field_def

Private type for internal use.

Definition at line 490 of file field_manager.F90.

Collaboration diagram for field_def:
[legend]

Private Attributes

integer array_dim
 
integer field_type
 
type(field_def), pointer first_field => NULL()
 
integer, dimension(:), allocatable i_value
 
integer index
 
logical, dimension(:), allocatable l_value
 
type(field_def), pointer last_field => NULL()
 
integer length
 
integer max_index
 
character(len=fm_field_name_len) name
 
type(field_def), pointer next => NULL()
 
type(field_def), pointer parent => NULL()
 
type(field_def), pointer prev => NULL()
 
real(r8_kind), dimension(:), allocatable r_value
 string to real conversion will be done at r8; all real values will be stored as r8_kind.
 
character(len=fm_string_len), dimension(:), allocatable s_value
 

◆ field_manager_mod::field_mgr_type

type field_manager_mod::field_mgr_type

Private type for internal use.

Definition at line 464 of file field_manager.F90.

Collaboration diagram for field_mgr_type:
[legend]

Private Attributes

character(len=fm_string_len) field_name
 
character(len=fm_field_name_len) field_type
 
type(method_type), dimension(:), allocatable methods
 methods associated with this field name
 
integer model
 
integer num_methods
 

◆ field_manager_mod::field_names_type

type field_manager_mod::field_names_type

Private type for internal use.

Definition at line 475 of file field_manager.F90.

Collaboration diagram for field_names_type:
[legend]

Private Attributes

character(len=fm_string_len) fld_name
 
character(len=fm_field_name_len) fld_type
 
character(len=fm_field_name_len) mod_name
 

◆ field_manager_mod::field_names_type_short

type field_manager_mod::field_names_type_short

Private type for internal use.

Definition at line 483 of file field_manager.F90.

Collaboration diagram for field_names_type_short:
[legend]

Private Attributes

character(len=fm_field_name_len) fld_type
 
character(len=fm_field_name_len) mod_name
 

◆ field_manager_mod::find_field_index

interface field_manager_mod::find_field_index

Returns an index corresponding to the given field name.

Model number can be given for old method.
Example usage:

value=find_field_index( model, field_name )
value=find_field_index( field_name )

Definition at line 350 of file field_manager.F90.

Private Member Functions

integer function find_field_index_new (field_name)
 
integer function find_field_index_old (model, field_name)
 Function to return the index of the field. More...
 

Member Function/Subroutine Documentation

◆ find_field_index_new()

integer function find_field_index_new ( character(len=*), intent(in)  field_name)
private
Returns
index of the field corresponding to field_name
Parameters
[in]field_nameThe path to the name of the field that an index is being requested for.

Definition at line 1434 of file field_manager.F90.

◆ find_field_index_old()

integer function find_field_index_old ( integer, intent(in)  model,
character(len=*), intent(in)  field_name 
)
private

Function to return the index of the field.

This function when passed a model number and a field name will return the index of the field within the field manager. This index can be used to access other information from the field manager.

Returns
The index of the field corresponding to field_name.
Parameters
[in]modelThe number indicating which model is used.
[in]field_nameThe name of the field that an index is being requested for.

Definition at line 1414 of file field_manager.F90.

◆ field_manager_mod::fm_get_value

interface field_manager_mod::fm_get_value

An overloaded function to find and extract a value for a named field.

Find and extract the value for name. The value may be of type real, integer, logical or character. If a single value from an array of values is required, an optional index can be supplied. Return true for success and false for failure
Example usage:

success = fm_get_value(name, value, index)

Definition at line 415 of file field_manager.F90.

Private Member Functions

logical function fm_get_value_integer (name, get_ival, index)
 
logical function fm_get_value_logical (name, get_lval, index)
 
 fm_get_value_real_r4
 
 fm_get_value_real_r8
 
logical function fm_get_value_string (name, get_sval, index)
 

Member Function/Subroutine Documentation

◆ fm_get_value_integer()

logical function fm_get_value_integer ( character(len=*), intent(in)  name,
integer, intent(out)  get_ival,
integer, intent(in), optional  index 
)
private
Returns
A flag to indicate whether the function operated with (false) or without (true) errors.
Parameters
[in]nameThe name of a field that the user wishes to get a value for.
[out]get_ivalThe value associated with the named field.
[in]indexAn optional index to retrieve a single value from an array.

Definition at line 2292 of file field_manager.F90.

◆ fm_get_value_logical()

logical function fm_get_value_logical ( character(len=*), intent(in)  name,
logical, intent(out)  get_lval,
integer, intent(in), optional  index 
)
private
Returns
A flag to indicate whether the function operated with (false) or without (true) errors.
Parameters
[in]nameThe name of a field that the user wishes to get a value for.
[out]get_lvalThe value associated with the named field
[in]indexAn optional index to retrieve a single value from an array.

Definition at line 2349 of file field_manager.F90.

◆ fm_get_value_string()

logical function fm_get_value_string ( character(len=*), intent(in)  name,
character(len=*), intent(out)  get_sval,
integer, intent(in), optional  index 
)
private
Returns
A flag to indicate whether the function operated with (false) or without (true) errors.
Parameters
[in]nameThe name of a field that the user wishes to get a value for.
[out]get_svalThe value associated with the named field
[in]indexAn optional index to retrieve a single value from an array.

Definition at line 2407 of file field_manager.F90.

◆ field_manager_mod::fm_list_iter_type

type field_manager_mod::fm_list_iter_type

Iterator over the field manager list.

Definition at line 334 of file field_manager.F90.

Collaboration diagram for fm_list_iter_type:
[legend]

Public Attributes

type(field_def), pointer ptr => NULL()
 pointer to the current field
 

◆ field_manager_mod::fm_loop_over_list

interface field_manager_mod::fm_loop_over_list

A function for looping over a list.

Loop over the list, setting the name, type and index of the next field. Return false at the end of the loop.
Example usage:

success = fm_loop_over_list(list, name, field_type, index)

Definition at line 432 of file field_manager.F90.

Private Member Functions

logical function fm_loop_over_list_new (iter, name, field_type, index)
 given a list iterator, returns information about curren list element and advances the iterator to the next list element. At the end of the list, returns FALSE More...
 
logical function fm_loop_over_list_old (list, name, field_type, index)
 Iterates through the given list. More...
 

Member Function/Subroutine Documentation

◆ fm_loop_over_list_new()

logical function fm_loop_over_list_new ( type (fm_list_iter_type), intent(inout)  iter,
character(len=*), intent(out)  name,
character(len=*), intent(out)  field_type,
integer, intent(out)  index 
)
private

given a list iterator, returns information about curren list element and advances the iterator to the next list element. At the end of the list, returns FALSE

Parameters
[in,out]iterlist iterator
[out]namename of the current list item
[out]field_typetype of the field
[out]indexindex in the list

Definition at line 2551 of file field_manager.F90.

◆ fm_loop_over_list_old()

logical function fm_loop_over_list_old ( character(len=*), intent(in)  list,
character(len=*), intent(out)  name,
character(len=fm_type_name_len), intent(out)  field_type,
integer, intent(out)  index 
)
private

Iterates through the given list.

Returns
A flag to indicate whether the function operated with (FALSE) or without (TRUE) errors
Parameters
[in]listName of a list to loop over
[out]namename of a field from list
[out]field_typetype of a list entry
[out]indexindex of the field within the list

Definition at line 2465 of file field_manager.F90.

◆ field_manager_mod::fm_new_value

interface field_manager_mod::fm_new_value

An overloaded function to assign a value to a field.

Allocate and initialize a new value and return the index. If an error condition occurs the parameter NO_FIELD is returned.

If the type of the field is changing (e.g. real values being transformed to integers), then any previous values for the field are removed and replaced by the value passed in the present call to this function.

If append is present and .true., then index cannot be greater than 0 if it is present.
Example usage:

field_index= fm_new_value(name, value, [create], [index], [append])

Definition at line 396 of file field_manager.F90.

Private Member Functions

integer function fm_new_value_integer (name, new_ival, create, index, append)
 Assigns a given value to a given field. More...
 
integer function fm_new_value_logical (name, new_lval, create, index, append)
 Assigns a given value to a given field. More...
 
 fm_new_value_real_r4
 
 fm_new_value_real_r8
 
integer function fm_new_value_string (name, new_sval, create, index, append)
 Assigns a given value to a given field. More...
 

Member Function/Subroutine Documentation

◆ fm_new_value_integer()

integer function fm_new_value_integer ( character(len=*), intent(in)  name,
integer, intent(in)  new_ival,
logical, intent(in), optional  create,
integer, intent(in), optional  index,
logical, intent(in), optional  append 
)
private

Assigns a given value to a given field.

Returns
An index for the named field
Parameters
[in]nameThe name of a field that the user wishes to create a value for.
[in]new_ivalThe value that the user wishes to apply to the named field.
[in]createIf present and .true., then a value for this field will be created.
[in]indexThe index to an array of values that the user wishes to apply a new value.
[in]appendIf present and .true., then append the value to an array of the present values. If present and .true., then index cannot be greater than 0.

Definition at line 2639 of file field_manager.F90.

◆ fm_new_value_logical()

integer function fm_new_value_logical ( character(len=*), intent(in)  name,
logical, intent(in)  new_lval,
logical, intent(in), optional  create,
integer, intent(in), optional  index,
logical, intent(in), optional  append 
)
private

Assigns a given value to a given field.

Returns
An index for the named field
Parameters
[in]nameThe name of a field that the user wishes to create a value for.
[in]new_lvalThe value that the user wishes to apply to the named field.
[in]createIf present and .true., then a value for this field will be created.
[in]indexThe index to an array of values that the user wishes to apply a new value.
[in]appendIf present and .true., then append the value to an array of the present values. If present and .true., then index cannot be greater than 0.

Definition at line 2779 of file field_manager.F90.

◆ fm_new_value_string()

integer function fm_new_value_string ( character(len=*), intent(in)  name,
character(len=*), intent(in)  new_sval,
logical, intent(in), optional  create,
integer, intent(in), optional  index,
logical, intent(in), optional  append 
)
private

Assigns a given value to a given field.

Returns
An index for the named field
Parameters
[in]nameThe name of a field that the user wishes to create a value for.
[in]new_svalThe value that the user wishes to apply to the named field.
[in]createIf present and .true., then a value for this field will be created.
[in]indexThe index to an array of values that the user wishes to apply a new value.
[in]appendIf present and .true., then append the value to

Definition at line 2913 of file field_manager.F90.

◆ field_manager_mod::method_type

type field_manager_mod::method_type

This method_type is a way to allow a component module to alter the parameters it needs for various tracers.

In essence this is a way to modify a namelist. A namelist can supply default parameters for all tracers. This method will allow the user to modify these default parameters for an individual tracer. An example could be that the user wishes to use second order advection on a tracer and also use fourth order advection on a second tracer within the same model run. The default advection could be second order and the field table would then indicate that the second tracer requires fourth order advection. This would be parsed by the advection routine.

Definition at line 300 of file field_manager.F90.

Collaboration diagram for method_type:
[legend]

Public Attributes

character(len=fm_string_len) method_control
 This is the string containing parameters that the module can use as values for a field method. These should override default values within the module.
 
character(len=fm_string_len) method_name
 This is the name of a method which the module can parse and use to assign different default values to a field method.
 
character(len=fm_string_len) method_type
 This string represents a tag that a module using this method can key on. Typically this should contain some reference to the module that is calling it.
 

◆ field_manager_mod::method_type_short

type field_manager_mod::method_type_short

This method_type is the same as method_type except that the method_control string is not present. This is used when you wish to change to a scheme within a module but do not need to pass parameters. See method_type for member information.

Definition at line 318 of file field_manager.F90.

Collaboration diagram for method_type_short:
[legend]

Public Attributes

character(len=fm_string_len) method_name
 
character(len=fm_string_len) method_type
 

◆ field_manager_mod::method_type_very_short

type field_manager_mod::method_type_very_short

This is the same as method_type except that the method_control and method_name strings are not present. This is used when you wish to change to a scheme within a module but do not need to pass parameters.

Definition at line 328 of file field_manager.F90.

Collaboration diagram for method_type_very_short:
[legend]

Public Attributes

character(len=fm_string_len) method_type
 

◆ field_manager_mod::parse

interface field_manager_mod::parse

A function to parse an integer or an array of integers, a real or an array of reals, a string or an array of strings.

Parse is an integer function that decodes values from a text string. The text string has the form: "label=list" where "label" is an arbitrary user defined label describing the values being decoded, and "list" is a list of one or more values separated by commas. The values may be integer, real, or character. Parse returns the number of values decoded.
Example usage:

number = parse(text, label, value)

Definition at line 369 of file field_manager.F90.

Private Member Functions

integer function parse_integer (text, label, parse_ival)
 
function parse_integers (text, label, values)
 
 parse_real_r4
 
 parse_real_r8
 
 parse_reals_r4
 
 parse_reals_r8
 
integer function parse_string (text, label, parse_sval)
 
function parse_strings (text, label, values)
 

Member Function/Subroutine Documentation

◆ parse_integer()

integer function parse_integer ( character(len=*), intent(in)  text,
character(len=*), intent(in)  label,
integer, intent(out)  parse_ival 
)
private
Parameters
[in]textThe text string from which the values will be parsed.
[in]labelA label which describes the values being decoded.
[out]parse_ivalThe value or values that have been decoded.

Definition at line 1527 of file field_manager.F90.

◆ parse_integers()

function parse_integers ( character(len=*), intent(in)  text,
character(len=*), intent(in)  label,
integer, dimension(:), intent(out)  values 
)
private
Returns
The number of values that have been decoded. This allows a user to define a large array and fill it partially with values from a list. This should be the size of the value array.
Parameters
[in]textThe text string from which the values will be parsed.
[in]labelA label which describes the values being decoded.
[out]valuesThe value or values that have been decoded.

Definition at line 1511 of file field_manager.F90.

◆ parse_string()

integer function parse_string ( character(len=*), intent(in)  text,
character(len=*), intent(in)  label,
character(len=*), intent(out)  parse_sval 
)
private
Parameters
[in]textThe text string from which the values will be parsed.
[in]labelA label which describes the values being decoded.
[out]parse_svalThe value or values that have been decoded.

Definition at line 1539 of file field_manager.F90.

◆ parse_strings()

function parse_strings ( character(len=*), intent(in)  text,
character(len=*), intent(in)  label,
character(len=*), dimension(:), intent(out)  values 
)
private
Parameters
[in]textThe text string from which the values will be parsed.
[in]labelA label which describes the values being decoded.
[out]valuesThe value or values that have been decoded.

Definition at line 1519 of file field_manager.F90.

Function/Subroutine Documentation

◆ create_field()

type (field_def) function, pointer, private field_manager_mod::create_field ( type (field_def), pointer  parent_p,
character(len=*), intent(in)  name 
)
private

A function to create a field as a child of parent_p. This will return a pointer to a field_def type.

Allocate and initialize a new field in parent_p list. Return a pointer to the field on success, or a null pointer on failure.
Example usage:

list_p => create_field(parent_p, name)
Parameters
parent_pA pointer to the parent of the field that is to be created
[in]nameThe name of the field that is to be created

Definition at line 1561 of file field_manager.F90.

◆ dump_list()

logical recursive function, private field_manager_mod::dump_list ( type (field_def), pointer  list_p,
logical, intent(in)  recursive,
integer, intent(in)  depth,
integer, intent(in)  out_unit 
)
private

This is a function that lists the parameters of a field.

Given a pointer to a list, this function prints out the fields, and subfields, if recursive is true, associated with the list.

This is most likely to be used through fm_dump_list.
Example usage:

success = dump_list(list_p, recursive=.true., depth=0)
Parameters
list_ppointer to the field to be printed out
[in]recursiveflag to make function recursively print subfields
[in]depthListing will be padded so that 'depth' spaces appear before the field being printed
[in]out_unitunit number to print to

Definition at line 1626 of file field_manager.F90.

◆ field_manager_end()

subroutine, public field_manager_mod::field_manager_end

Destructor for field manager.

This subroutine deallocates allocated variables (if allocated) and changes the initialized flag to false.

Definition at line 1386 of file field_manager.F90.

◆ field_manager_init()

subroutine, public field_manager_mod::field_manager_init ( integer, intent(out), optional  nfields,
character(len=fm_string_len), intent(in), optional  table_name 
)

Routine to initialize the field manager.

This routine reads from a file containing yaml paramaters. These yaml parameters contain information on which schemes are needed within various modules. The field manager does not initialize any of those schemes however. It simply holds the information and is queried by the appropriate module.

The routine has two loops. The first loop initializes the my_table object and counts the number of fields contained therein. The second loop is the main loop that acts on each field in the my_table object, defining a list object (in the field_manager definition) from which various fm routines may be called, as well as populating the "fields" object and the "methods" objects within each field object. The "fields" and "methods" objects are then used with the subroutine new_name to append various characteristics to the list object. Note that the "fields" and "methods" objects are also used with other fm routines in a bit of a parallel system.

Parameters
[out]nfieldsnumber of fields
[in]table_nameName of the field table, default

Definition at line 556 of file field_manager.F90.

◆ find_base()

subroutine, private field_manager_mod::find_base ( character(len=*), intent(in)  name,
character(len=*), intent(out)  path,
character(len=*), intent(out)  base 
)
private

A subroutine that splits a listname into a path and a base.

Find the base name for a list by splitting the list name into a path and base. The base is the last field within name, while the path is the preceding section of name. The base string can then be used to query for values associated with name.

Parameters
[in]namelist name for a field
[out]pathpath of the base field
[out]baseA string which can be used to query for values associated with name

Definition at line 1755 of file field_manager.F90.

◆ find_field()

type (field_def) function, pointer, private field_manager_mod::find_field ( character(len=*), intent(in)  name,
type (field_def), pointer  this_list_p 
)
private

Find and return a pointer to the field in the specified list. Return a null pointer on error.

Find and return a pointer to the field in the specified list. Return a null pointer on error. Given a pointer to a field, this function searchs for "name" as a sub field.

Returns
A pointer to the field corresponding to "name" or an unassociated pointer if the field name does not exist.
Parameters
[in]nameThe name of a field that the user wishes to find
this_list_pA pointer to a list which the user wishes to search for a field "name".

Definition at line 1812 of file field_manager.F90.

◆ find_field_index_new()

integer function, public field_manager_mod::find_field_index_new ( character(len=*), intent(in)  field_name)
Returns
index of the field corresponding to field_name
Parameters
[in]field_nameThe path to the name of the field that an index is being requested for.

Definition at line 1434 of file field_manager.F90.

◆ find_field_index_old()

integer function, public field_manager_mod::find_field_index_old ( integer, intent(in)  model,
character(len=*), intent(in)  field_name 
)

Function to return the index of the field.

This function when passed a model number and a field name will return the index of the field within the field manager. This index can be used to access other information from the field manager.

Returns
The index of the field corresponding to field_name.
Parameters
[in]modelThe number indicating which model is used.
[in]field_nameThe name of the field that an index is being requested for.

Definition at line 1414 of file field_manager.F90.

◆ find_head()

subroutine, private field_manager_mod::find_head ( character(len=*), intent(in)  name,
character(len=*), intent(out)  head,
character(len=*), intent(out)  rest 
)
private

Find the first list for a name by splitting the name into a head and the rest.

Find the first list for a name by splitting the name into a head and the rest. The head is the first field within name, while rest is the remaining section of name. The head string can then be used to find other fields that may be associated with name.

Parameters
[in]nameThe name of a field of interest
[out]headthe first field within name
[out]restthe remaining section of name

Definition at line 1857 of file field_manager.F90.

◆ find_list()

type (field_def) function, pointer, private field_manager_mod::find_list ( character(len=*), intent(in)  path,
type (field_def), pointer  relative_p,
logical, intent(in)  create 
)
private

Find and return a pointer to the specified list, relative to relative_p. Return a null pointer on error.

This function, when supplied a pointer to a field and a name of a second field relative to that pointer, will find a list and return the pointer to the second field. If create is .true. and the second field does not exist, it will be created.

Returns
A pointer to the list to be returned
Parameters
[in]pathpath to the list of interest
relative_ppointer to the list to which "path" is relative to
[in]createIf the list does not exist, it will be created if set to true

Definition at line 1903 of file field_manager.F90.

◆ find_method()

recursive logical function field_manager_mod::find_method ( type (field_def), pointer  list_p,
logical, intent(in)  recursive,
integer, intent(inout)  num_meth,
character(len=*), dimension(:), intent(out)  method,
character(len=*), dimension(:), intent(out)  control 
)
private

Given a field list pointer this function retrieves methods and associated parameters for the field list.

Returns
A flag to indicate whether the function operated with (FALSE) or without (TRUE) errors.
Parameters
list_pA pointer to the field of interest
[in]recursiveIf true, search recursively for fields
[in,out]num_methThe number of methods found
[out]methodThe methods associated with the field pointed to by list_p
[out]controlThe control parameters for the methods found

Definition at line 3567 of file field_manager.F90.

◆ fm_change_list()

logical function, public field_manager_mod::fm_change_list ( character(len=*), intent(in)  name)

Change the current list. Return true on success, false otherwise.

This function changes the currect list to correspond to the list named name. If the first character of name is the list separator (/) then the list will search for "name" starting from the root of the field tree. Otherwise it will search for name starting from the current list.

Returns
A flag to indicate operation success, true = no errors
Parameters
[in]namename of a list to change to

Definition at line 1991 of file field_manager.F90.

◆ fm_change_root()

logical function, public field_manager_mod::fm_change_root ( character(len=*), intent(in)  name)

Change the root list.

This function changes the root of the field tree to correspond to the field named name. An example of a use of this would be if code is interested in a subset of fields with a common base. This common base could be set using fm_change_root and fields could be referenced using this root.

This function should be used in conjunction with fm_return_root.

Returns
A flag to indicate operation success, true = no errors
Parameters
[in]namename of the field which the user wishes to become the root.

Definition at line 2023 of file field_manager.F90.

◆ fm_copy_list()

integer function, public field_manager_mod::fm_copy_list ( character(len=*), intent(in)  list_name,
character(len=*), intent(in)  suffix,
logical, intent(in), optional  create 
)

A function that allows the user to copy a field and add a suffix to the name of the new field.

Given the name of a pre-existing field and a suffix, this function will create a new field. The name of the new field will be that of the old field with a suffix supplied by the user.

Returns
index of the field that has been created by the copy
Parameters
[in]list_namename of a field that the user wishes to copy
[in]suffixsuffix that will be added to list_name when field is copied
[in]createflag to create new list if applicable

Definition at line 3417 of file field_manager.F90.

◆ fm_dump_list()

logical function, public field_manager_mod::fm_dump_list ( character(len=*), intent(in)  name,
logical, intent(in), optional  recursive,
integer, intent(in), optional  unit 
)

A function to list properties associated with a field.

This function writes the contents of the field named "name" to stdout. If recursive is present and .true., then this function writes out the contents of any subfields associated with the field named "name".

Returns
A flag to indicate operation success, true = no errors
Parameters
[in]nameThe name of the field for which output is requested.
[in]recursiveIf present and .true., then a recursive listing of fields will be performed.
[in]unitfile to print to

Definition at line 2074 of file field_manager.F90.

◆ fm_exists()

logical function, public field_manager_mod::fm_exists ( character(len=*), intent(in)  name)

A function to test whether a named field exists.

This function determines is a field exists, relative to the current list, and returns true if the list exists, false otherwise.

Returns
A flag to indicate operation success, true = no errors
Parameters
[in]nameThe name of the field that is being queried

Definition at line 2118 of file field_manager.F90.

◆ fm_find_methods()

logical function, public field_manager_mod::fm_find_methods ( character(len=*), intent(in)  list_name,
character(len=*), dimension(:), intent(out)  methods,
character(len=*), dimension(:), intent(out)  control 
)

This function retrieves all the methods associated with a field.

This is different from fm_query_method in that this function gets all the methods associated as opposed to 1 method.

Returns
A flag to indicate whether the function operated with (FALSE) or without (TRUE) errors.
Parameters
[in]list_nameThe name of a list that the user wishes to find methods for
[out]methodsAn array of the methods associated with list_name
[out]controlAn array of the parameters associated with methods

Definition at line 3521 of file field_manager.F90.

◆ fm_get_current_list()

character(len=fms_path_len) function, public field_manager_mod::fm_get_current_list

A function to return the full path of the current list.

This function returns the full path for the current list. A blank path indicates an error condition has occurred.

Returns
The path corresponding to the current list

Definition at line 2175 of file field_manager.F90.

◆ fm_get_index()

integer function, public field_manager_mod::fm_get_index ( character(len=*), intent(in)  name)

A function to return the index of a named field.

Returns the index for name, returns the parameter NO_FIELD if it does not exist. If the first character of the named field is the list peparator, then the named field will be relative to the root of the field tree. Otherwise the named field will be relative to the current list.

Returns
index of the named field if it exists, otherwise the parameter NO_FIELD
Parameters
[in]nameThe name of a field that the user wishes to get an index for

Definition at line 2141 of file field_manager.F90.

◆ fm_get_length()

integer function, public field_manager_mod::fm_get_length ( character(len=*), intent(in)  name)

A function to return how many elements are contained within the named list or entry.

This function returns the list or entry length for the named list or entry. If the named field or entry does not exist, a value of 0 is returned.

Returns
The number of elements that the field name has.
Parameters
[in]nameThe name of a list or entry that the user wishes to get the length of

Definition at line 2219 of file field_manager.F90.

◆ fm_get_type()

character(len=8) function, public field_manager_mod::fm_get_type ( character(len=*), intent(in)  name)

A function to return the type of the named field.

This function returns the type of the field for name. This indicates whether the named field is a "list" (has children fields), or has values of type "integer", "real", "logical" or "string". If it does not exist it returns a blank string.

Returns
A string containing the type of the named field
Parameters
[in]nameThe name of a field that the user wishes to find the type of

Definition at line 2260 of file field_manager.F90.

◆ fm_get_value_integer()

logical function, public field_manager_mod::fm_get_value_integer ( character(len=*), intent(in)  name,
integer, intent(out)  get_ival,
integer, intent(in), optional  index 
)
Returns
A flag to indicate whether the function operated with (false) or without (true) errors.
Parameters
[in]nameThe name of a field that the user wishes to get a value for.
[out]get_ivalThe value associated with the named field.
[in]indexAn optional index to retrieve a single value from an array.

Definition at line 2292 of file field_manager.F90.

◆ fm_get_value_logical()

logical function, public field_manager_mod::fm_get_value_logical ( character(len=*), intent(in)  name,
logical, intent(out)  get_lval,
integer, intent(in), optional  index 
)
Returns
A flag to indicate whether the function operated with (false) or without (true) errors.
Parameters
[in]nameThe name of a field that the user wishes to get a value for.
[out]get_lvalThe value associated with the named field
[in]indexAn optional index to retrieve a single value from an array.

Definition at line 2349 of file field_manager.F90.

◆ fm_get_value_string()

logical function, public field_manager_mod::fm_get_value_string ( character(len=*), intent(in)  name,
character(len=*), intent(out)  get_sval,
integer, intent(in), optional  index 
)
Returns
A flag to indicate whether the function operated with (false) or without (true) errors.
Parameters
[in]nameThe name of a field that the user wishes to get a value for.
[out]get_svalThe value associated with the named field
[in]indexAn optional index to retrieve a single value from an array.

Definition at line 2407 of file field_manager.F90.

◆ fm_init_loop()

subroutine, public field_manager_mod::fm_init_loop ( character(len=*), intent(in)  loop_list,
type(fm_list_iter_type), intent(out)  iter 
)

given a name of the list, prepares an iterator over the list content. If the name of the given list is blank, then the current list is used

Parameters
[in]loop_listname of the list to iterate over
[out]iterloop iterator

Definition at line 2534 of file field_manager.F90.

◆ fm_loop_over_list_new()

logical function field_manager_mod::fm_loop_over_list_new ( type (fm_list_iter_type), intent(inout)  iter,
character(len=*), intent(out)  name,
character(len=*), intent(out)  field_type,
integer, intent(out)  index 
)
private

given a list iterator, returns information about curren list element and advances the iterator to the next list element. At the end of the list, returns FALSE

Parameters
[in,out]iterlist iterator
[out]namename of the current list item
[out]field_typetype of the field
[out]indexindex in the list

Definition at line 2551 of file field_manager.F90.

◆ fm_loop_over_list_old()

logical function field_manager_mod::fm_loop_over_list_old ( character(len=*), intent(in)  list,
character(len=*), intent(out)  name,
character(len=fm_type_name_len), intent(out)  field_type,
integer, intent(out)  index 
)
private

Iterates through the given list.

Returns
A flag to indicate whether the function operated with (FALSE) or without (TRUE) errors
Parameters
[in]listName of a list to loop over
[out]namename of a field from list
[out]field_typetype of a list entry
[out]indexindex of the field within the list

Definition at line 2465 of file field_manager.F90.

◆ fm_modify_name()

logical function, public field_manager_mod::fm_modify_name ( character(len=*), intent(in)  oldname,
character(len=*), intent(in)  newname 
)

This function allows a user to rename a field without modifying the contents of the field.

Function to modify the name of a field. Should be used with caution.

Returns
A flag to indicate whether the function operated with (FALSE) or without (TRUE) errors.
Parameters
[in]oldnameThe name of a field that the user wishes to change the name of
[in]newnameThe name that the user wishes to change the name of the field to.

Definition at line 3119 of file field_manager.F90.

◆ fm_new_list()

integer function, public field_manager_mod::fm_new_list ( character(len=*), intent(in)  name,
logical, intent(in), optional  create,
logical, intent(in), optional  keep 
)

A function to create a new list.

Allocate and initialize a new list and return the index of the list. If an error occurs return the parameter NO_FIELD.

Returns
integer index of the newly created list
Parameters
[in]nameName of a list that user wishes to create
[in]createIf present and true, create the list if it does not exist
[in]keepIf present and true, make this list the current list

Definition at line 2578 of file field_manager.F90.

◆ fm_new_value_integer()

integer function, public field_manager_mod::fm_new_value_integer ( character(len=*), intent(in)  name,
integer, intent(in)  new_ival,
logical, intent(in), optional  create,
integer, intent(in), optional  index,
logical, intent(in), optional  append 
)

Assigns a given value to a given field.

Returns
An index for the named field
Parameters
[in]nameThe name of a field that the user wishes to create a value for.
[in]new_ivalThe value that the user wishes to apply to the named field.
[in]createIf present and .true., then a value for this field will be created.
[in]indexThe index to an array of values that the user wishes to apply a new value.
[in]appendIf present and .true., then append the value to an array of the present values. If present and .true., then index cannot be greater than 0.

Definition at line 2639 of file field_manager.F90.

◆ fm_new_value_logical()

integer function, public field_manager_mod::fm_new_value_logical ( character(len=*), intent(in)  name,
logical, intent(in)  new_lval,
logical, intent(in), optional  create,
integer, intent(in), optional  index,
logical, intent(in), optional  append 
)

Assigns a given value to a given field.

Returns
An index for the named field
Parameters
[in]nameThe name of a field that the user wishes to create a value for.
[in]new_lvalThe value that the user wishes to apply to the named field.
[in]createIf present and .true., then a value for this field will be created.
[in]indexThe index to an array of values that the user wishes to apply a new value.
[in]appendIf present and .true., then append the value to an array of the present values. If present and .true., then index cannot be greater than 0.

Definition at line 2779 of file field_manager.F90.

◆ fm_new_value_string()

integer function, public field_manager_mod::fm_new_value_string ( character(len=*), intent(in)  name,
character(len=*), intent(in)  new_sval,
logical, intent(in), optional  create,
integer, intent(in), optional  index,
logical, intent(in), optional  append 
)

Assigns a given value to a given field.

Returns
An index for the named field
Parameters
[in]nameThe name of a field that the user wishes to create a value for.
[in]new_svalThe value that the user wishes to apply to the named field.
[in]createIf present and .true., then a value for this field will be created.
[in]indexThe index to an array of values that the user wishes to apply a new value.
[in]appendIf present and .true., then append the value to

Definition at line 2913 of file field_manager.F90.

◆ fm_query_method()

logical function, public field_manager_mod::fm_query_method ( character(len=*), intent(in)  name,
character(len=*), intent(out)  method_name,
character(len=*), intent(out)  method_control 
)

This is a function that provides the capability to return parameters associated with a field in a pair of strings.

Given a name return a list of method names and control strings. This function should return strings similar to those in the field table if a comma delimited format is being used.

Returns
A flag to indicate whether the function operated with (FALSE) or without (TRUE) errors
Parameters
[in]namename of a list that the user wishes to change to
[out]method_namename of a parameter associated with the named field
[out]method_controlvalue of parameters associated with the named field

Definition at line 3261 of file field_manager.F90.

◆ fm_return_root()

subroutine, public field_manager_mod::fm_return_root

Return the root list to the value at initialization.

For use in conjunction with fm_change_root.

Users should use this routine before leaving their routine if they previously used fm_change_root.

Definition at line 3065 of file field_manager.F90.

◆ get_field()

type (field_def) function, pointer, private field_manager_mod::get_field ( character(len=*), intent(in)  name,
type (field_def), pointer  this_list_p 
)
private

Return a pointer to the field if it exists relative to this_list_p, null otherwise.

Returns
A pointer to the field name
Parameters
[in]nameThe name of a list that the user wishes to get information for
this_list_pA pointer to a list that serves as the base point for searching for name

Definition at line 3084 of file field_manager.F90.

◆ get_field_info()

subroutine, public field_manager_mod::get_field_info ( integer, intent(in)  n,
character (len=*), intent(out)  fld_type,
character (len=*), intent(out)  fld_name,
integer, intent(out)  model,
integer, intent(out)  num_methods 
)

This routine allows access to field information given an index.

When passed an index, this routine will return the type of field, the name of the field, the model which the field is associated and the number of methods associated with the field.
Example usage:

call get_field_info( n,fld_type,fld_name,model,num_methods )
Parameters
[in]nindex of field
[out]fld_typefield type
[out]fld_namename of the field
[out]modelnumber indicating which model is used
[out]num_methodsnumber of methods

Definition at line 1455 of file field_manager.F90.

◆ get_field_method()

subroutine, public field_manager_mod::get_field_method ( integer, intent(in)  n,
integer, intent(in)  m,
type(method_type), intent(inout)  method 
)

A routine to get a specified method.

This routine, when passed a field index and a method index will return the method text associated with the field(n) method(m).

Parameters
[in]nindex of field
[in]mindex of method
[in,out]methodthe m-th method of field with index n

Definition at line 1475 of file field_manager.F90.

◆ get_field_methods()

subroutine, public field_manager_mod::get_field_methods ( integer, intent(in)  n,
type(method_type), dimension(:), intent(inout)  methods 
)

A routine to obtain all the methods associated with a field.

When passed a field index, this routine will return the text associated with all the methods attached to the field.

Parameters
[in]nfield index
[in,out]methodsan array of methods for field with index n

Definition at line 1492 of file field_manager.F90.

◆ make_list()

type (field_def) function, pointer, private field_manager_mod::make_list ( type (field_def), pointer  this_list_p,
character(len=*), intent(in)  name 
)
private

This function creates a new field and returns a pointer to that field.

Allocate and initialize a new list in this_list_p list.

Returns
a pointer to the list on success, or a null pointer on failure.
Parameters
this_list_pBase of a list that the user wishes to add a list to
[in]namename of a list that the user wishes to create

Definition at line 3217 of file field_manager.F90.

◆ new_name()

subroutine field_manager_mod::new_name ( character(len=*), intent(in)  list_name,
character(len=*), intent(in)  method_name_in,
character(len=*), intent(inout)  val_name_in 
)
private

Subroutine to add new values to list parameters.

This subroutine uses input strings list_name, method_name and val_name_in to add new values to the list. Given list_name a new list item is created that is named method_name and is given the value or values in val_name_in. If there is more than 1 value in val_name_in, these values should be comma-separated.

Parameters
[in]list_nameThe name of the field that is of interest here.
[in]method_name_inThe name of the method that values are being supplied for.
[in,out]val_name_inThe value or values that will be parsed and used as the value when creating a new field or fields.

Definition at line 1202 of file field_manager.F90.

◆ new_name_yaml()

subroutine field_manager_mod::new_name_yaml ( character(len=*), intent(in)  list_name,
character(len=*), intent(in)  method_name_in,
character(len=*), intent(inout)  val_name_in 
)
private

Subroutine to add new values to list parameters.

This subroutine uses input strings list_name, method_name and val_name_in to add new values to the list. Given list_name a new list item is created that is named method_name and is given the value or values in val_name_in. If there is more than 1 value in val_name_in, these values should be comma-separated.

Parameters
[in]list_nameThe name of the field that is of interest here.
[in]method_name_inThe name of the method that values are being supplied for.
[in,out]val_name_inThe value or values that will be parsed and used as the value when creating a new field or fields.

Definition at line 720 of file field_manager.F90.

◆ parse_integer()

integer function field_manager_mod::parse_integer ( character(len=*), intent(in)  text,
character(len=*), intent(in)  label,
integer, intent(out)  parse_ival 
)
private
Parameters
[in]textThe text string from which the values will be parsed.
[in]labelA label which describes the values being decoded.
[out]parse_ivalThe value or values that have been decoded.

Definition at line 1527 of file field_manager.F90.

◆ parse_integers()

function field_manager_mod::parse_integers ( character(len=*), intent(in)  text,
character(len=*), intent(in)  label,
integer, dimension(:), intent(out)  values 
)
private
Returns
The number of values that have been decoded. This allows a user to define a large array and fill it partially with values from a list. This should be the size of the value array.
Parameters
[in]textThe text string from which the values will be parsed.
[in]labelA label which describes the values being decoded.
[out]valuesThe value or values that have been decoded.

Definition at line 1511 of file field_manager.F90.

◆ parse_string()

integer function field_manager_mod::parse_string ( character(len=*), intent(in)  text,
character(len=*), intent(in)  label,
character(len=*), intent(out)  parse_sval 
)
private
Parameters
[in]textThe text string from which the values will be parsed.
[in]labelA label which describes the values being decoded.
[out]parse_svalThe value or values that have been decoded.

Definition at line 1539 of file field_manager.F90.

◆ parse_strings()

function field_manager_mod::parse_strings ( character(len=*), intent(in)  text,
character(len=*), intent(in)  label,
character(len=*), dimension(:), intent(out)  values 
)
private
Parameters
[in]textThe text string from which the values will be parsed.
[in]labelA label which describes the values being decoded.
[out]valuesThe value or values that have been decoded.

Definition at line 1519 of file field_manager.F90.

◆ query_method()

recursive logical function field_manager_mod::query_method ( type (field_def), pointer  list_p,
logical, intent(in)  recursive,
character(len=*), intent(in)  name,
character(len=*), intent(out)  method_name,
character(len=*), intent(out)  method_control 
)
private

A private function that can recursively recover values for parameters associated with a field.

Returns
A flag to indicate whether the function operated with (FALSE) or without (TRUE) errors
Parameters
list_pA pointer to the field that is of interest
[in]recursiveA flag to enable recursive searching if true
[in]namename of a list that the user wishes to change to
[out]method_namename of a parameter associated with the named field
[out]method_controlvalue of parameters associated with the named field

Definition at line 3325 of file field_manager.F90.

◆ read_field_table_legacy()

subroutine field_manager_mod::read_field_table_legacy ( integer, intent(out), optional  nfields,
character(len=fm_string_len), intent(in), optional  table_name 
)
private

Routine to read and parse the field table yaml.

This routine reads from a file containing formatted strings. These formatted strings contain information on which schemes are needed within various modules. The field manager does not initialize any of those schemes however. It simply holds the information and is queried by the appropriate module.

Parameters
[out]nfieldsnumber of fields
[in]table_nameName of the field table, default is 'field_table'

Definition at line 854 of file field_manager.F90.

◆ read_field_table_yaml()

subroutine field_manager_mod::read_field_table_yaml ( integer, intent(out), optional  nfields,
character(len=*), intent(in), optional  table_name 
)
private

Routine to read and parse the field table yaml.

Parameters
[out]nfieldsnumber of fields
[in]table_nameName of the field table file, default is 'field_table.yaml'

Definition at line 591 of file field_manager.F90.

◆ set_list_stuff()

logical function fm_loop_over_list_old::set_list_stuff
private

If the the pointer matches to the right list, extract the field information. Used in fm_loop_over_list.

Returns
A flag to indicate whether the function operated with (FALSE) or without (TRUE) errors

Definition at line 2510 of file field_manager.F90.

◆ strip_front_blanks()

subroutine field_manager_mod::strip_front_blanks ( character(len=*), intent(inout)  name)
private

A routine to strip whitespace from the start of character strings.

This subroutine removes spaces and tabs from the start of a character string.

Parameters
[in,out]namename to remove whitespace from

Definition at line 1401 of file field_manager.F90.