!
! 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.
!
!
use mpp_mod, only : mpp_error, &
FATAL, &
NOTE, &
WARNING, &
mpp_pe, &
mpp_root_pe, &
stdlog, &
stdout
use mpp_io_mod, only : mpp_io_init, &
mpp_open, &
mpp_close, &
MPP_ASCII, &
MPP_RDONLY
use fms_mod, only : lowercase, &
file_exist, &
write_version_number
implicit none
private
! Include variable "version" to be written to log file.
#include