FishMet: Fish feeding and appetite model, OPEN EDITION
0.1
FishMet: Fish feeding and appetite model, OPEN EDITION
|
Module that defines the runtime behaviour of the model. More...
Functions/Subroutines | |
impure subroutine | system_init |
This procedure performs basic initialisation of the system: More... | |
impure subroutine | system_run_main () |
This subroutine starts and schedules the model. More... | |
impure subroutine | read_parameters () |
The subroutine read_parameters reads global parameters defined in the commondata module from configuration file commondata::param_file_name_def. More... | |
impure subroutine | exit_with_error (message, no_exit) |
A wrapper subroutine that will produce error message and halt. More... | |
character(len=:) function, allocatable | parse_svn_version (svn_version_string) |
Parse and cut revision number in form of string from the whole SVN revision string. SVN revision number can therefore be included into the model outputs and output file names. This is convenient because the model version is identified by a single SVN revision number. More... | |
elemental logical function | check_stomach_transport_emptying_agree () |
Check if the stomach pattern matrix agrees with the stomach emptying partameter matrix, i.e. the difference is less than one hour. More... | |
Module that defines the runtime behaviour of the model.
impure subroutine runtime::system_init |
This procedure performs basic initialisation of the system:
The behaviour of the model program can be controlled using command line parameters and environment variables.
Help screen: if the program is executed with one of these command line parameters -h --help -help /h /help
, a short screen help is printed on the terminal and the program halts.
There are two output modes: normal and "quiet," in the later case only requested information is written to the screen, no accessory information is written.
The main parameter file is kept in commondata::global_param_file_name and is defined by the environment variable FFA_MODEL_PARAMETER_FILE
.
The environment variable FFA_MODEL_OUTPUT_DEST
can set the output destination directory in addition to the output_dest
parameter in the model configuration file. The value set by the environment variable takes priority over the configuration file.
Definition at line 34 of file m_runtime.f90.
impure subroutine runtime::system_run_main |
This subroutine starts and schedules the model.
Definition at line 112 of file m_runtime.f90.
impure subroutine runtime::read_parameters |
The subroutine read_parameters reads global parameters defined in the commondata module from configuration file commondata::param_file_name_def.
Definition at line 178 of file m_runtime.f90.
impure subroutine runtime::exit_with_error | ( | character(len=*), intent(in) | message, |
logical, intent(in), optional | no_exit | ||
) |
A wrapper subroutine that will produce error message and halt.
[in] | message | The error message that is printed to the standard error device or appear as a warning window depending on the interface type. |
[in] | no_exit | Optional parameter that dictates NOT to stop the program and just print the error message. This may be useful if the program must check a series of conditions and then exit at the last one. |
Definition at line 554 of file m_runtime.f90.
character(len=:) function, allocatable runtime::parse_svn_version | ( | character(*), intent(in) | svn_version_string | ) |
Parse and cut revision number in form of string from the whole SVN revision string. SVN revision number can therefore be included into the model outputs and output file names. This is convenient because the model version is identified by a single SVN revision number.
STRINGS
module uses unsafe coding prone to bugs, e.g. does not clearly state dummy parameters intent and doesn't work correctly with parameter
s. [in] | svn_version_string | The standard revision string as defined by the
|
XXX
keyword from Subversion.
Subversion has a useful feature: various keywords can be inserted and automatically updated in the source code under revision control, e.g. revision number, date, user etc. The character string parameter constant commondata::svn_version_string
keeps the Subversion revision tag. This subroutine parses the tag striping all other characters out.
Definition at line 587 of file m_runtime.f90.
elemental logical function runtime::check_stomach_transport_emptying_agree |
Check if the stomach pattern matrix agrees with the stomach emptying partameter matrix, i.e. the difference is less than one hour.
Definition at line 616 of file m_runtime.f90.