The field manager 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.
"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 file_in = INPUT/ocean_age.res.nc file_out = RESTART/ocean_age.res.nc/The field table consists of entries in the following format.
"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.
"longname","sulf_hex" "longname = sulf_hex" longname = sulf_hexHowever 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.
mpp_mod
mpp_io_mod
fms_mod
Name | Type | Value | Units | Description |
---|---|---|---|---|
fm_field_name_len | integer, parameter | 32 | --- | The length of a character string representing the field name. |
fm_path_name_len | integer, parameter | 512 | --- | The length of a character string representing the field path. |
fm_string_len | integer, parameter | 128 | --- | The length of a character string representing character values for the field. |
fm_type_name_len | integer, parameter | 8 | --- | The length of a character string representing the various types that the values of the field can take. |
NUM_MODELS | integer, parameter | 5 | --- | Number of models (ATMOS, OCEAN, LAND, ICE, COUPLER). |
NO_FIELD | integer, parameter | -1 | --- | The value returned if a field is not defined. |
MODEL_ATMOS | integer, parameter | 1 | --- | Atmospheric model. |
MODEL_OCEAN | integer, parameter | 2 | --- | Ocean model. |
MODEL_LAND | integer, parameter | 3 | --- | Land model. |
MODEL_ICE | integer, parameter | 4 | --- | Ice model. |
MODEL_COUPLER | integer, parameter | 5 | --- | Ice model. |
MODEL_NAMES | character(len=11), parameter | --- | --- | Model names, e.g. MODEL_NAMES(MODEL_OCEAN) is 'oceanic' |
call field_manager_init (nfields, table_name)
table_name | The name of the field table. The default name is field_table. [character, optional, dimension(len=128)] |
nfields | The number of fields. [integer] |
call field_manager_end
call strip_front_blanks (name)
value= find_field_index ( model, field_name ) value=find_field_index( field_name )
model | The number indicating which model is used. [integer] |
field_name | The name of the field that an index is being requested for. [character] |
field_name | The path to the name of the field that an index is being requested for. [character] |
find_field_index | The index of the field corresponding to field_name. [integer] |
find_field_index | The index of the field corresponding to field_name. [integer] |
call get_field_info ( n,fld_type,fld_name,model,num_methods )
n | The field index. [integer] |
fld_type | The field type. [character, dimension(*)] |
fld_name | The name of the field. [character, dimension(*)] |
model | The number indicating which model is used. [integer] |
num_methods | The number of methods. [integer] |
call get_field_method ( n,m,method )
n | The field index. [integer] |
m | The method index. [integer] |
method | The m-th method of field with index n. [type(method_type)] |
call get_field_methods ( n,methods )
n | The field index. [integer] |
method | An array of methods for field with index n. [type(method_type), dimension(:)] |
number = parse (text, label, value)
text | The text string from which the values will be parsed. [character(len=*)] |
label | A label which describes the values being decoded. [character(len=*)] |
value | The value or values that have been decoded. [integer, real, character(len=*)] |
parse | 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. [integer] |
success = fm_change_list (name)
name | The name of a list that the user wishes to change to. [character(len=*)] |
success | A flag to indicate whether the function operated with (FALSE) or
without (TRUE) errors. [logical] |
success = fm_change_root (name)
name | The name of the field which the user wishes to become the root. [character(len=*)] |
success | A flag to indicate whether the function operated with (FALSE) or
without (TRUE) errors. [logical] |
success = fm_dump_list (name, recursive = .true.)
name | The name of the field for which output is requested. [character(len=*)] |
recursive | If present and .true., then a recursive listing of fields will be
performed. [logical, optional] |
success | A flag to indicate whether the function operated with (FALSE) or
without (TRUE) errors. [logical] |
success = fm_exists (name)
name | The name of the field that is being queried. [character(len=*)] |
success | A flag to indicate whether the function operated with (FALSE) or
without (TRUE) errors. [logical] |
index = fm_get_index (name)
name | The name of a field that the user wishes to get an index for. [character(len=*)] |
index | The index of the named field if it exists.
Otherwise the parameter NO_FIELD. [index] |
path = fm_get_current_list ()
path | The path corresponding to the current list. [character(len=fm_path_name_len)] |
length = fm_get_length (name)
name | The name of a list or entry that the user wishes to get the length of. [character(len=*)] |
length | The number of elements that the field name has. [integer] |
name_field_type = fm_get_type (name)
name | The name of a field that the user wishes to find the type of. [character(len=*)] |
name_field_type | A string containing the type of the named field. [character(len=8)] |
success = fm_get_value (name, value, index)
name | The name of a field that the user wishes to get a value for. [character(len=*)] |
index | An optional index to retrieve a single value from an array. [integer, optional] |
success | A flag to indicate whether the function operated with (FALSE) or
without (TRUE) errors. [logical] |
value | The value associated with the named field. [integer, real, logical or character] |
return_p => fm_intersection (lists,dim)
dim | The dimension of lists. [dim] |
lists | A list of fields that the user wishes to find the common fields of. [character(len=*), dimension(dim)] |
return_p | A pointer to a list of names that are common to the fields provided in
lists. [type (fm_array_list_def), pointer] |
success = fm_loop_over_list (list, name, field_type, index)
list | The name of a list to loop over. [character(len=*)] |
success | A flag to indicate whether the function operated with (FALSE) or
without (TRUE) errors. [logical] |
name | The name of a field from list. [character(len=*)] |
field_type | The type of a list entry. [character(len=fm_type_name_len)] |
index | The index of tje field within the list. [integer] |
index = fm_new_list (name, create, keep)
name | The name of a list that the user wishes to create. [character(len=*)] |
create | If present and .true., create the list if it does not exist. [logical, optional] |
keep | If present and .true., make this list the current list. [logical, optional] |
index | The index of the newly created list. [integer] |
field_index = fm_new_value (name, value, [create], [index], [append])
name | The name of a field that the user wishes to create a value for. [character(len=*)] |
value | The value that the user wishes to apply to the named field. [integer, real, logical, or character(len=*)] |
create | If present and .true., then a value for this field will be created. [logical, optional] |
index | The index to an array of values that the user wishes to apply a new value. [integer, optional] |
append | If 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. [logical, optional] |
field_index | An index for the named field. [integer] |
call fm_reset_loop
call fm_return_root
success = fm_modify_name (oldname, newname)
oldname | The name of a field that the user wishes to change the name of. [character(len=*)] |
newname | The name that the user wishes to change the name of the field to. [character(len=*)] |
success | A flag to indicate whether the function operated with (FALSE) or
without (TRUE) errors. [logical] |
success = fm_query_method (name, method_name, method_control)
name | The name of a list that the user wishes to change to. [character(len=*)] |
success | A flag to indicate whether the function operated with (FALSE) or
without (TRUE) errors. [logical] |
method_name | The name of a parameter associated with the named field. [character(len=*)] |
method_control | The value of parameters associated with the named field. [character(len=*)] |
index = fm_copy_list (list_name, suffix, create)
list_name | The name of a field that the user wishes to copy.. [character(len=*)] |
suffix | The suffix that will be added to list_name when the field is copied. [character(len=*)] |
index | The index of the field that has been created by the copy. [integer] |
success = fm_find_methods (list_name, methods, control )
list_name | The name of a list that the user wishes to find methods for. [character(len=*)] |
success | A flag to indicate whether the function operated with (FALSE) or
without (TRUE) errors. [logical] |
methods | An array of the methods associated with list_name. [character(len=*)] |
control | An array of the parameters associated with methods. [character(len=*)] |
call fm_set_verbosity (verbosity)
verbosity | The level of verbosity required by the user. [integer, optional] |