MOM6
mom_file_parser::get_param Interface Reference

Detailed Description

An overloaded interface to read and log the values of various types of parameters.

Definition at line 102 of file MOM_file_parser.F90.

Private functions

subroutine 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. More...
 
subroutine 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. More...
 
subroutine 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. More...
 
subroutine 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. More...
 
subroutine 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. More...
 
subroutine 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. More...
 
subroutine 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. More...
 
subroutine 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. More...
 

Functions and subroutines

◆ get_param_char()

subroutine mom_file_parser::get_param::get_param_char ( type(param_file_type), intent(in)  CS,
character(len=*), intent(in)  modulename,
character(len=*), intent(in)  varname,
character(len=*), intent(inout)  value,
character(len=*), intent(in), optional  desc,
character(len=*), intent(in), optional  units,
character(len=*), intent(in), optional  default,
logical, intent(in), optional  fail_if_missing,
logical, intent(in), optional  do_not_read,
logical, intent(in), optional  do_not_log,
character(len=*), intent(in), optional  static_value,
logical, intent(in), optional  layoutParam,
logical, intent(in), optional  debuggingParam 
)
private

This subroutine reads the value of a character string model parameter from a parameter file and logs it in documentation files.

Parameters
[in]csThe control structure for the file_parser module, it is also a structure to parse for run-time parameters
[in]modulenameThe name of the calling module
[in]varnameThe case-sensitive name of the parameter to read
[in,out]valueThe value of the parameter that may be read from the parameter file and logged
[in]descA description of this variable; if not present, this parameter is not written to a doc file
[in]unitsThe units of this parameter
[in]defaultThe default value of the parameter
[in]static_valueIf this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
[in]fail_if_missingIf present and true, a fatal error occurs if this variable is not found in the parameter file
[in]do_not_readIf present and true, do not read a value for this parameter, although it might be logged.
[in]do_not_logIf present and true, do not log this parameter to the documentation files
[in]layoutparamIf present and true, this parameter is logged in the layout parameter file
[in]debuggingparamIf present and true, this parameter is logged in the debugging parameter file

Definition at line 1799 of file MOM_file_parser.F90.

1799  type(param_file_type), intent(in) :: CS !< The control structure for the file_parser module,
1800  !! it is also a structure to parse for run-time parameters
1801  character(len=*), intent(in) :: modulename !< The name of the calling module
1802  character(len=*), intent(in) :: varname !< The case-sensitive name of the parameter to read
1803  character(len=*), intent(inout) :: value !< The value of the parameter that may be
1804  !! read from the parameter file and logged
1805  character(len=*), optional, intent(in) :: desc !< A description of this variable; if not
1806  !! present, this parameter is not written to a doc file
1807  character(len=*), optional, intent(in) :: units !< The units of this parameter
1808  character(len=*), optional, intent(in) :: default !< The default value of the parameter
1809  character(len=*), optional, intent(in) :: static_value !< If this parameter is static, it takes
1810  !! this value, which can be compared for consistency with
1811  !! what is in the parameter file.
1812  logical, optional, intent(in) :: fail_if_missing !< If present and true, a fatal error occurs
1813  !! if this variable is not found in the parameter file
1814  logical, optional, intent(in) :: do_not_read !< If present and true, do not read a
1815  !! value for this parameter, although it might be logged.
1816  logical, optional, intent(in) :: do_not_log !< If present and true, do not log this
1817  !! parameter to the documentation files
1818  logical, optional, intent(in) :: layoutParam !< If present and true, this parameter is
1819  !! logged in the layout parameter file
1820  logical, optional, intent(in) :: debuggingParam !< If present and true, this parameter is
1821  !! logged in the debugging parameter file
1822 
1823  logical :: do_read, do_log
1824 
1825  do_read = .true. ; if (present(do_not_read)) do_read = .not.do_not_read
1826  do_log = .true. ; if (present(do_not_log)) do_log = .not.do_not_log
1827 
1828  if (do_read) then
1829  if (present(default)) value = default
1830  if (present(static_value)) value = static_value
1831  call read_param_char(cs, varname, value, fail_if_missing)
1832  endif
1833 
1834  if (do_log) then
1835  call log_param_char(cs, modulename, varname, value, desc, units, &
1836  default, layoutparam, debuggingparam)
1837  endif
1838 

◆ get_param_char_array()

subroutine mom_file_parser::get_param::get_param_char_array ( type(param_file_type), intent(in)  CS,
character(len=*), intent(in)  modulename,
character(len=*), intent(in)  varname,
character(len=*), dimension(:), intent(inout)  value,
character(len=*), intent(in), optional  desc,
character(len=*), intent(in), optional  units,
character(len=*), intent(in), optional  default,
logical, intent(in), optional  fail_if_missing,
logical, intent(in), optional  do_not_read,
logical, intent(in), optional  do_not_log,
character(len=*), intent(in), optional  static_value 
)
private

This subroutine reads the values of an array of character string model parameters from a parameter file and logs them in documentation files.

Parameters
[in]csThe control structure for the file_parser module, it is also a structure to parse for run-time parameters
[in]modulenameThe name of the calling module
[in]varnameThe case-sensitive name of the parameter to read
[in,out]valueThe value of the parameter that may be read from the parameter file and logged
[in]descA description of this variable; if not present, this parameter is not written to a doc file
[in]unitsThe units of this parameter
[in]defaultThe default value of the parameter
[in]static_valueIf this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
[in]fail_if_missingIf present and true, a fatal error occurs if this variable is not found in the parameter file
[in]do_not_readIf present and true, do not read a value for this parameter, although it might be logged.
[in]do_not_logIf present and true, do not log this parameter to the documentation files

Definition at line 1845 of file MOM_file_parser.F90.

1845  type(param_file_type), intent(in) :: CS !< The control structure for the file_parser module,
1846  !! it is also a structure to parse for run-time parameters
1847  character(len=*), intent(in) :: modulename !< The name of the calling module
1848  character(len=*), intent(in) :: varname !< The case-sensitive name of the parameter to read
1849  character(len=*), dimension(:), intent(inout) :: value !< The value of the parameter that may be
1850  !! read from the parameter file and logged
1851  character(len=*), optional, intent(in) :: desc !< A description of this variable; if not
1852  !! present, this parameter is not written to a doc file
1853  character(len=*), optional, intent(in) :: units !< The units of this parameter
1854  character(len=*), optional, intent(in) :: default !< The default value of the parameter
1855  character(len=*), optional, intent(in) :: static_value !< If this parameter is static, it takes
1856  !! this value, which can be compared for consistency with
1857  !! what is in the parameter file.
1858  logical, optional, intent(in) :: fail_if_missing !< If present and true, a fatal error occurs
1859  !! if this variable is not found in the parameter file
1860  logical, optional, intent(in) :: do_not_read !< If present and true, do not read a
1861  !! value for this parameter, although it might be logged.
1862  logical, optional, intent(in) :: do_not_log !< If present and true, do not log this
1863  !! parameter to the documentation files
1864 
1865  ! Local variables
1866  logical :: do_read, do_log
1867  integer :: i, len_tot, len_val
1868  character(len=240) :: cat_val
1869 
1870  do_read = .true. ; if (present(do_not_read)) do_read = .not.do_not_read
1871  do_log = .true. ; if (present(do_not_log)) do_log = .not.do_not_log
1872 
1873  if (do_read) then
1874  if (present(default)) then ; value(:) = default ; endif
1875  if (present(static_value)) then ; value(:) = static_value ; endif
1876  call read_param_char_array(cs, varname, value, fail_if_missing)
1877  endif
1878 
1879  if (do_log) then
1880  cat_val = trim(value(1)); len_tot = len_trim(value(1))
1881  do i=2,size(value)
1882  len_val = len_trim(value(i))
1883  if ((len_val > 0) .and. (len_tot + len_val + 2 < 240)) then
1884  cat_val = trim(cat_val)//achar(34)// ", "//achar(34)//trim(value(i))
1885  len_tot = len_tot + len_val
1886  endif
1887  enddo
1888  call log_param_char(cs, modulename, varname, cat_val, desc, &
1889  units, default)
1890  endif
1891 

◆ get_param_int()

subroutine mom_file_parser::get_param::get_param_int ( type(param_file_type), intent(in)  CS,
character(len=*), intent(in)  modulename,
character(len=*), intent(in)  varname,
integer, intent(inout)  value,
character(len=*), intent(in), optional  desc,
character(len=*), intent(in), optional  units,
integer, intent(in), optional  default,
logical, intent(in), optional  fail_if_missing,
logical, intent(in), optional  do_not_read,
logical, intent(in), optional  do_not_log,
integer, intent(in), optional  static_value,
logical, intent(in), optional  layoutParam,
logical, intent(in), optional  debuggingParam 
)
private

This subroutine reads the value of an integer model parameter from a parameter file and logs it in documentation files.

Parameters
[in]csThe control structure for the file_parser module, it is also a structure to parse for run-time parameters
[in]modulenameThe name of the calling module
[in]varnameThe case-sensitive name of the parameter to read
[in,out]valueThe value of the parameter that may be read from the parameter file and logged
[in]descA description of this variable; if not present, this parameter is not written to a doc file
[in]unitsThe units of this parameter
[in]defaultThe default value of the parameter
[in]static_valueIf this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
[in]fail_if_missingIf present and true, a fatal error occurs if this variable is not found in the parameter file
[in]do_not_readIf present and true, do not read a value for this parameter, although it might be logged.
[in]do_not_logIf present and true, do not log this parameter to the documentation files
[in]layoutparamIf present and true, this parameter is logged in the layout parameter file
[in]debuggingparamIf present and true, this parameter is logged in the debugging parameter file

Definition at line 1601 of file MOM_file_parser.F90.

1601  type(param_file_type), intent(in) :: CS !< The control structure for the file_parser module,
1602  !! it is also a structure to parse for run-time parameters
1603  character(len=*), intent(in) :: modulename !< The name of the calling module
1604  character(len=*), intent(in) :: varname !< The case-sensitive name of the parameter to read
1605  integer, intent(inout) :: value !< The value of the parameter that may be
1606  !! read from the parameter file and logged
1607  character(len=*), optional, intent(in) :: desc !< A description of this variable; if not
1608  !! present, this parameter is not written to a doc file
1609  character(len=*), optional, intent(in) :: units !< The units of this parameter
1610  integer, optional, intent(in) :: default !< The default value of the parameter
1611  integer, optional, intent(in) :: static_value !< If this parameter is static, it takes
1612  !! this value, which can be compared for consistency with
1613  !! what is in the parameter file.
1614  logical, optional, intent(in) :: fail_if_missing !< If present and true, a fatal error occurs
1615  !! if this variable is not found in the parameter file
1616  logical, optional, intent(in) :: do_not_read !< If present and true, do not read a
1617  !! value for this parameter, although it might be logged.
1618  logical, optional, intent(in) :: do_not_log !< If present and true, do not log this
1619  !! parameter to the documentation files
1620  logical, optional, intent(in) :: layoutParam !< If present and true, this parameter is
1621  !! logged in the layout parameter file
1622  logical, optional, intent(in) :: debuggingParam !< If present and true, this parameter is
1623  !! logged in the debugging parameter file
1624 
1625  logical :: do_read, do_log
1626 
1627  do_read = .true. ; if (present(do_not_read)) do_read = .not.do_not_read
1628  do_log = .true. ; if (present(do_not_log)) do_log = .not.do_not_log
1629 
1630  if (do_read) then
1631  if (present(default)) value = default
1632  if (present(static_value)) value = static_value
1633  call read_param_int(cs, varname, value, fail_if_missing)
1634  endif
1635 
1636  if (do_log) then
1637  call log_param_int(cs, modulename, varname, value, desc, units, &
1638  default, layoutparam, debuggingparam)
1639  endif
1640 

◆ get_param_int_array()

subroutine mom_file_parser::get_param::get_param_int_array ( type(param_file_type), intent(in)  CS,
character(len=*), intent(in)  modulename,
character(len=*), intent(in)  varname,
integer, dimension(:), intent(inout)  value,
character(len=*), intent(in), optional  desc,
character(len=*), intent(in), optional  units,
integer, intent(in), optional  default,
logical, intent(in), optional  fail_if_missing,
logical, intent(in), optional  do_not_read,
logical, intent(in), optional  do_not_log,
integer, intent(in), optional  static_value,
logical, intent(in), optional  layoutParam,
logical, intent(in), optional  debuggingParam 
)
private

This subroutine reads the values of an array of integer model parameters from a parameter file and logs them in documentation files.

Parameters
[in]csThe control structure for the file_parser module, it is also a structure to parse for run-time parameters
[in]modulenameThe name of the calling module
[in]varnameThe case-sensitive name of the parameter to read
[in,out]valueThe value of the parameter that may be reset from the parameter file
[in]descA description of this variable; if not present, this parameter is not written to a doc file
[in]unitsThe units of this parameter
[in]defaultThe default value of the parameter
[in]static_valueIf this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
[in]fail_if_missingIf present and true, a fatal error occurs if this variable is not found in the parameter file
[in]do_not_readIf present and true, do not read a value for this parameter, although it might be logged.
[in]do_not_logIf present and true, do not log this parameter to the documentation files
[in]layoutparamIf present and true, this parameter is logged in the layout parameter file
[in]debuggingparamIf present and true, this parameter is logged in the debugging parameter file

Definition at line 1648 of file MOM_file_parser.F90.

1648  type(param_file_type), intent(in) :: CS !< The control structure for the file_parser module,
1649  !! it is also a structure to parse for run-time parameters
1650  character(len=*), intent(in) :: modulename !< The name of the calling module
1651  character(len=*), intent(in) :: varname !< The case-sensitive name of the parameter to read
1652  integer, dimension(:), intent(inout) :: value !< The value of the parameter that may be reset
1653  !! from the parameter file
1654  character(len=*), optional, intent(in) :: desc !< A description of this variable; if not
1655  !! present, this parameter is not written to a doc file
1656  character(len=*), optional, intent(in) :: units !< The units of this parameter
1657  integer, optional, intent(in) :: default !< The default value of the parameter
1658  integer, optional, intent(in) :: static_value !< If this parameter is static, it takes
1659  !! this value, which can be compared for consistency with
1660  !! what is in the parameter file.
1661  logical, optional, intent(in) :: fail_if_missing !< If present and true, a fatal error occurs
1662  !! if this variable is not found in the parameter file
1663  logical, optional, intent(in) :: do_not_read !< If present and true, do not read a
1664  !! value for this parameter, although it might be logged.
1665  logical, optional, intent(in) :: do_not_log !< If present and true, do not log this
1666  !! parameter to the documentation files
1667  logical, optional, intent(in) :: layoutParam !< If present and true, this parameter is
1668  !! logged in the layout parameter file
1669  logical, optional, intent(in) :: debuggingParam !< If present and true, this parameter is
1670  !! logged in the debugging parameter file
1671 
1672  logical :: do_read, do_log
1673 
1674  do_read = .true. ; if (present(do_not_read)) do_read = .not.do_not_read
1675  do_log = .true. ; if (present(do_not_log)) do_log = .not.do_not_log
1676 
1677  if (do_read) then
1678  if (present(default)) then ; value(:) = default ; endif
1679  if (present(static_value)) then ; value(:) = static_value ; endif
1680  call read_param_int_array(cs, varname, value, fail_if_missing)
1681  endif
1682 
1683  if (do_log) then
1684  call log_param_int_array(cs, modulename, varname, value, desc, &
1685  units, default, layoutparam, debuggingparam)
1686  endif
1687 

◆ get_param_logical()

subroutine mom_file_parser::get_param::get_param_logical ( type(param_file_type), intent(in)  CS,
character(len=*), intent(in)  modulename,
character(len=*), intent(in)  varname,
logical, intent(inout)  value,
character(len=*), intent(in), optional  desc,
character(len=*), intent(in), optional  units,
logical, intent(in), optional  default,
logical, intent(in), optional  fail_if_missing,
logical, intent(in), optional  do_not_read,
logical, intent(in), optional  do_not_log,
logical, intent(in), optional  static_value,
logical, intent(in), optional  layoutParam,
logical, intent(in), optional  debuggingParam 
)
private

This subroutine reads the value of a logical model parameter from a parameter file and logs it in documentation files.

Parameters
[in]csThe control structure for the file_parser module, it is also a structure to parse for run-time parameters
[in]modulenameThe name of the calling module
[in]varnameThe case-sensitive name of the parameter to read
[in,out]valueThe value of the parameter that may be read from the parameter file and logged
[in]descA description of this variable; if not present, this parameter is not written to a doc file
[in]unitsThe units of this parameter
[in]defaultThe default value of the parameter
[in]static_valueIf this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
[in]fail_if_missingIf present and true, a fatal error occurs if this variable is not found in the parameter file
[in]do_not_readIf present and true, do not read a value for this parameter, although it might be logged.
[in]do_not_logIf present and true, do not log this parameter to the documentation files
[in]layoutparamIf present and true, this parameter is logged in the layout parameter file
[in]debuggingparamIf present and true, this parameter is logged in the debugging parameter file

Definition at line 1899 of file MOM_file_parser.F90.

1899  type(param_file_type), intent(in) :: CS !< The control structure for the file_parser module,
1900  !! it is also a structure to parse for run-time parameters
1901  character(len=*), intent(in) :: modulename !< The name of the calling module
1902  character(len=*), intent(in) :: varname !< The case-sensitive name of the parameter to read
1903  logical, intent(inout) :: value !< The value of the parameter that may be
1904  !! read from the parameter file and logged
1905  character(len=*), optional, intent(in) :: desc !< A description of this variable; if not
1906  !! present, this parameter is not written to a doc file
1907  character(len=*), optional, intent(in) :: units !< The units of this parameter
1908  logical, optional, intent(in) :: default !< The default value of the parameter
1909  logical, optional, intent(in) :: static_value !< If this parameter is static, it takes
1910  !! this value, which can be compared for consistency with
1911  !! what is in the parameter file.
1912  logical, optional, intent(in) :: fail_if_missing !< If present and true, a fatal error occurs
1913  !! if this variable is not found in the parameter file
1914  logical, optional, intent(in) :: do_not_read !< If present and true, do not read a
1915  !! value for this parameter, although it might be logged.
1916  logical, optional, intent(in) :: do_not_log !< If present and true, do not log this
1917  !! parameter to the documentation files
1918  logical, optional, intent(in) :: layoutParam !< If present and true, this parameter is
1919  !! logged in the layout parameter file
1920  logical, optional, intent(in) :: debuggingParam !< If present and true, this parameter is
1921  !! logged in the debugging parameter file
1922 
1923  logical :: do_read, do_log
1924 
1925  do_read = .true. ; if (present(do_not_read)) do_read = .not.do_not_read
1926  do_log = .true. ; if (present(do_not_log)) do_log = .not.do_not_log
1927 
1928  if (do_read) then
1929  if (present(default)) value = default
1930  if (present(static_value)) value = static_value
1931  call read_param_logical(cs, varname, value, fail_if_missing)
1932  endif
1933 
1934  if (do_log) then
1935  call log_param_logical(cs, modulename, varname, value, desc, &
1936  units, default, layoutparam, debuggingparam)
1937  endif
1938 

◆ get_param_real()

subroutine mom_file_parser::get_param::get_param_real ( type(param_file_type), intent(in)  CS,
character(len=*), intent(in)  modulename,
character(len=*), intent(in)  varname,
real, intent(inout)  value,
character(len=*), intent(in), optional  desc,
character(len=*), intent(in), optional  units,
real, intent(in), optional  default,
logical, intent(in), optional  fail_if_missing,
logical, intent(in), optional  do_not_read,
logical, intent(in), optional  do_not_log,
real, intent(in), optional  static_value,
logical, intent(in), optional  debuggingParam,
real, intent(in), optional  scale,
real, intent(out), optional  unscaled 
)
private

This subroutine reads the value of a real model parameter from a parameter file and logs it in documentation files.

Parameters
[in]csThe control structure for the file_parser module, it is also a structure to parse for run-time parameters
[in]modulenameThe name of the calling module
[in]varnameThe case-sensitive name of the parameter to read
[in,out]valueThe value of the parameter that may be read from the parameter file and logged
[in]descA description of this variable; if not present, this parameter is not written to a doc file
[in]unitsThe units of this parameter
[in]defaultThe default value of the parameter
[in]static_valueIf this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
[in]fail_if_missingIf present and true, a fatal error occurs if this variable is not found in the parameter file
[in]do_not_readIf present and true, do not read a value for this parameter, although it might be logged.
[in]do_not_logIf present and true, do not log this parameter to the documentation files
[in]debuggingparamIf present and true, this parameter is logged in the debugging parameter file
[in]scaleA scaling factor that the parameter is multiplied by before it is returned.
[out]unscaledThe value of the parameter that would be returned without any multiplication by a scaling factor.

Definition at line 1695 of file MOM_file_parser.F90.

1695  type(param_file_type), intent(in) :: CS !< The control structure for the file_parser module,
1696  !! it is also a structure to parse for run-time parameters
1697  character(len=*), intent(in) :: modulename !< The name of the calling module
1698  character(len=*), intent(in) :: varname !< The case-sensitive name of the parameter to read
1699  real, intent(inout) :: value !< The value of the parameter that may be
1700  !! read from the parameter file and logged
1701  character(len=*), optional, intent(in) :: desc !< A description of this variable; if not
1702  !! present, this parameter is not written to a doc file
1703  character(len=*), optional, intent(in) :: units !< The units of this parameter
1704  real, optional, intent(in) :: default !< The default value of the parameter
1705  real, optional, intent(in) :: static_value !< If this parameter is static, it takes
1706  !! this value, which can be compared for consistency with
1707  !! what is in the parameter file.
1708  logical, optional, intent(in) :: fail_if_missing !< If present and true, a fatal error occurs
1709  !! if this variable is not found in the parameter file
1710  logical, optional, intent(in) :: do_not_read !< If present and true, do not read a
1711  !! value for this parameter, although it might be logged.
1712  logical, optional, intent(in) :: do_not_log !< If present and true, do not log this
1713  !! parameter to the documentation files
1714  logical, optional, intent(in) :: debuggingParam !< If present and true, this parameter is
1715  !! logged in the debugging parameter file
1716  real, optional, intent(in) :: scale !< A scaling factor that the parameter is
1717  !! multiplied by before it is returned.
1718  real, optional, intent(out) :: unscaled !< The value of the parameter that would be
1719  !! returned without any multiplication by a scaling factor.
1720 
1721  logical :: do_read, do_log
1722 
1723  do_read = .true. ; if (present(do_not_read)) do_read = .not.do_not_read
1724  do_log = .true. ; if (present(do_not_log)) do_log = .not.do_not_log
1725 
1726  if (do_read) then
1727  if (present(default)) value = default
1728  if (present(static_value)) value = static_value
1729  call read_param_real(cs, varname, value, fail_if_missing)
1730  endif
1731 
1732  if (do_log) then
1733  call log_param_real(cs, modulename, varname, value, desc, units, &
1734  default, debuggingparam)
1735  endif
1736 
1737  if (present(unscaled)) unscaled = value
1738  if (present(scale)) value = scale*value
1739 

◆ get_param_real_array()

subroutine mom_file_parser::get_param::get_param_real_array ( type(param_file_type), intent(in)  CS,
character(len=*), intent(in)  modulename,
character(len=*), intent(in)  varname,
real, dimension(:), intent(inout)  value,
character(len=*), intent(in), optional  desc,
character(len=*), intent(in), optional  units,
real, intent(in), optional  default,
logical, intent(in), optional  fail_if_missing,
logical, intent(in), optional  do_not_read,
logical, intent(in), optional  do_not_log,
logical, intent(in), optional  debuggingParam,
real, intent(in), optional  static_value,
real, intent(in), optional  scale,
real, dimension(:), intent(out), optional  unscaled 
)
private

This subroutine reads the values of an array of real model parameters from a parameter file and logs them in documentation files.

Parameters
[in]csThe control structure for the file_parser module, it is also a structure to parse for run-time parameters
[in]modulenameThe name of the calling module
[in]varnameThe case-sensitive name of the parameter to read
[in,out]valueThe value of the parameter that may be read from the parameter file and logged
[in]descA description of this variable; if not present, this parameter is not written to a doc file
[in]unitsThe units of this parameter
[in]defaultThe default value of the parameter
[in]static_valueIf this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
[in]fail_if_missingIf present and true, a fatal error occurs if this variable is not found in the parameter file
[in]do_not_readIf present and true, do not read a value for this parameter, although it might be logged.
[in]do_not_logIf present and true, do not log this parameter to the documentation files
[in]debuggingparamIf present and true, this parameter is logged in the debugging parameter file
[in]scaleA scaling factor that the parameter is multiplied by before it is returned.
[out]unscaledThe value of the parameter that would be returned without any multiplication by a scaling factor.

Definition at line 1747 of file MOM_file_parser.F90.

1747  type(param_file_type), intent(in) :: CS !< The control structure for the file_parser module,
1748  !! it is also a structure to parse for run-time parameters
1749  character(len=*), intent(in) :: modulename !< The name of the calling module
1750  character(len=*), intent(in) :: varname !< The case-sensitive name of the parameter to read
1751  real, dimension(:), intent(inout) :: value !< The value of the parameter that may be
1752  !! read from the parameter file and logged
1753  character(len=*), optional, intent(in) :: desc !< A description of this variable; if not
1754  !! present, this parameter is not written to a doc file
1755  character(len=*), optional, intent(in) :: units !< The units of this parameter
1756  real, optional, intent(in) :: default !< The default value of the parameter
1757  real, optional, intent(in) :: static_value !< If this parameter is static, it takes
1758  !! this value, which can be compared for consistency with
1759  !! what is in the parameter file.
1760  logical, optional, intent(in) :: fail_if_missing !< If present and true, a fatal error occurs
1761  !! if this variable is not found in the parameter file
1762  logical, optional, intent(in) :: do_not_read !< If present and true, do not read a
1763  !! value for this parameter, although it might be logged.
1764  logical, optional, intent(in) :: do_not_log !< If present and true, do not log this
1765  !! parameter to the documentation files
1766  logical, optional, intent(in) :: debuggingParam !< If present and true, this parameter is
1767  !! logged in the debugging parameter file
1768  real, optional, intent(in) :: scale !< A scaling factor that the parameter is
1769  !! multiplied by before it is returned.
1770  real, dimension(:), optional, intent(out) :: unscaled !< The value of the parameter that would be
1771  !! returned without any multiplication by a scaling factor.
1772 
1773  logical :: do_read, do_log
1774 
1775  do_read = .true. ; if (present(do_not_read)) do_read = .not.do_not_read
1776  do_log = .true. ; if (present(do_not_log)) do_log = .not.do_not_log
1777 
1778  if (do_read) then
1779  if (present(default)) then ; value(:) = default ; endif
1780  if (present(static_value)) then ; value(:) = static_value ; endif
1781  call read_param_real_array(cs, varname, value, fail_if_missing)
1782  endif
1783 
1784  if (do_log) then
1785  call log_param_real_array(cs, modulename, varname, value, desc, &
1786  units, default, debuggingparam)
1787  endif
1788 
1789  if (present(unscaled)) unscaled(:) = value(:)
1790  if (present(scale)) value(:) = scale*value(:)
1791 

◆ get_param_time()

subroutine mom_file_parser::get_param::get_param_time ( type(param_file_type), intent(in)  CS,
character(len=*), intent(in)  modulename,
character(len=*), intent(in)  varname,
type(time_type), intent(inout)  value,
character(len=*), intent(in), optional  desc,
character(len=*), intent(in), optional  units,
type(time_type), intent(in), optional  default,
logical, intent(in), optional  fail_if_missing,
logical, intent(in), optional  do_not_read,
logical, intent(in), optional  do_not_log,
real, intent(in), optional  timeunit,
type(time_type), intent(in), optional  static_value,
logical, intent(in), optional  layoutParam,
logical, intent(in), optional  debuggingParam,
logical, intent(in), optional  log_as_date 
)
private

This subroutine reads the value of a time-type model parameter from a parameter file and logs it in documentation files.

Parameters
[in]csThe control structure for the file_parser module, it is also a structure to parse for run-time parameters
[in]modulenameThe name of the calling module
[in]varnameThe case-sensitive name of the parameter to read
[in,out]valueThe value of the parameter that may be read from the parameter file and logged
[in]descA description of this variable; if not present, this parameter is not written to a doc file
[in]unitsThe units of this parameter
[in]defaultThe default value of the parameter
[in]static_valueIf this parameter is static, it takes this value, which can be compared for consistency with what is in the parameter file.
[in]fail_if_missingIf present and true, a fatal error occurs if this variable is not found in the parameter file
[in]do_not_readIf present and true, do not read a value for this parameter, although it might be logged.
[in]do_not_logIf present and true, do not log this parameter to the documentation files
[in]timeunitThe number of seconds in a time unit for real-number input to be translated to a time.
[in]layoutparamIf present and true, this parameter is logged in the layout parameter file
[in]debuggingparamIf present and true, this parameter is logged in the debugging parameter file
[in]log_as_dateIf true, log the time_type in date format. The default is false.

Definition at line 1947 of file MOM_file_parser.F90.

1947  type(param_file_type), intent(in) :: CS !< The control structure for the file_parser module,
1948  !! it is also a structure to parse for run-time parameters
1949  character(len=*), intent(in) :: modulename !< The name of the calling module
1950  character(len=*), intent(in) :: varname !< The case-sensitive name of the parameter to read
1951  type(time_type), intent(inout) :: value !< The value of the parameter that may be
1952  !! read from the parameter file and logged
1953  character(len=*), optional, intent(in) :: desc !< A description of this variable; if not
1954  !! present, this parameter is not written to a doc file
1955  character(len=*), optional, intent(in) :: units !< The units of this parameter
1956  type(time_type), optional, intent(in) :: default !< The default value of the parameter
1957  type(time_type), optional, intent(in) :: static_value !< If this parameter is static, it takes
1958  !! this value, which can be compared for consistency with
1959  !! what is in the parameter file.
1960  logical, optional, intent(in) :: fail_if_missing !< If present and true, a fatal error occurs
1961  !! if this variable is not found in the parameter file
1962  logical, optional, intent(in) :: do_not_read !< If present and true, do not read a
1963  !! value for this parameter, although it might be logged.
1964  logical, optional, intent(in) :: do_not_log !< If present and true, do not log this
1965  !! parameter to the documentation files
1966  real, optional, intent(in) :: timeunit !< The number of seconds in a time unit for
1967  !! real-number input to be translated to a time.
1968  logical, optional, intent(in) :: layoutParam !< If present and true, this parameter is
1969  !! logged in the layout parameter file
1970  logical, optional, intent(in) :: debuggingParam !< If present and true, this parameter is
1971  !! logged in the debugging parameter file
1972  logical, optional, intent(in) :: log_as_date !< If true, log the time_type in date
1973  !! format. The default is false.
1974 
1975  logical :: do_read, do_log, date_format, log_date
1976 
1977  do_read = .true. ; if (present(do_not_read)) do_read = .not.do_not_read
1978  do_log = .true. ; if (present(do_not_log)) do_log = .not.do_not_log
1979  log_date = .false.
1980 
1981  if (do_read) then
1982  if (present(default)) value = default
1983  if (present(static_value)) value = static_value
1984  call read_param_time(cs, varname, value, timeunit, fail_if_missing, date_format=log_date)
1985  endif
1986 
1987  if (do_log) then
1988  if (present(log_as_date)) log_date = log_as_date
1989  call log_param_time(cs, modulename, varname, value, desc, units, default, &
1990  timeunit, layoutparam=layoutparam, &
1991  debuggingparam=debuggingparam, log_date=log_date)
1992  endif
1993 

The documentation for this interface was generated from the following file: