Displays information about the current state_mod of the model run.
More...
Displays information about the current state_mod of the model run.
◆ finalisation_callback()
subroutine modelsynopsis_mod::finalisation_callback |
( |
type(model_state_type), intent(inout), target |
current_state | ) |
|
|
private |
Called at the end of the MONC run, will log the reason why the model is terminating.
- Parameters
-
current_state | The current model state |
Definition at line 68 of file modelsynopsis.F90.
68 type(model_state_type),
target,
intent(inout) :: current_state
70 if (log_is_master())
then 72 if (current_state%termination_reason == time_termination_reason)
then 73 call log_log(log_info,
"Model run complete due to model time "//&
74 trim(conv_to_string(current_state%time, 2))//
" exceeding limit of "//&
75 trim(conv_to_string(options_get_real(current_state%options_database,
"termination_time"), 2)))
76 else if (current_state%termination_reason == timestep_termination_reason)
then 77 call log_log(log_info,
"Model run complete due to timestep completion, model time is "//&
78 trim(conv_to_string(current_state%time, 2)))
79 else if (current_state%termination_reason == message_termination_reason)
then 80 call log_log(log_info,
"Model run complete due to messages file containing termination command, model time is "//&
81 trim(conv_to_string(current_state%time, 2)))
82 else if (current_state%termination_reason == walltime_termination_reason)
then 83 call log_log(log_info,
"Model run complete due to walltime limit of '"//&
84 trim(options_get_string(current_state%options_database,
"walltime_limit"))//
"' reached, model time is "//&
85 trim(conv_to_string(current_state%time, 2)))
87 call log_log(log_info,
"Model run complete due to unknown reason, model time is "//&
88 trim(conv_to_string(current_state%time, 2)))
◆ initialisation_callback()
subroutine modelsynopsis_mod::initialisation_callback |
( |
type(model_state_type), intent(inout), target |
current_state | ) |
|
|
private |
Definition at line 35 of file modelsynopsis.F90.
35 type(model_state_type),
target,
intent(inout) :: current_state
37 reporting_frequency=options_get_integer(current_state%options_database,
"display_synopsis_frequency")
38 previous_ts=current_state%timestep
39 start_time=mpi_wtime()
◆ modelsynopsis_get_descriptor()
Provides a description of this component for the core to register.
- Returns
- The descriptor containing registration information for this component
Definition at line 27 of file modelsynopsis.F90.
27 modelsynopsis_get_descriptor%name=
"model_synopsis" 28 modelsynopsis_get_descriptor%version=0.1
29 modelsynopsis_get_descriptor%initialisation=>initialisation_callback
30 modelsynopsis_get_descriptor%timestep=>timestep_callback
31 modelsynopsis_get_descriptor%finalisation=>finalisation_callback
◆ timestep_callback()
subroutine modelsynopsis_mod::timestep_callback |
( |
type(model_state_type), intent(inout), target |
current_state | ) |
|
|
private |
Timestep callback hook which performs the halo swapping for each prognostic field.
In parallel this is performed with MPI communication calls and wrapping around. In serial still need to wrap data around
- Parameters
-
Definition at line 48 of file modelsynopsis.F90.
48 type(model_state_type),
target,
intent(inout) :: current_state
50 double precision :: end_time
52 if (mod(current_state%timestep, reporting_frequency)==0 .and. log_is_master())
then 55 call log_log(log_info,
"Number of completed timesteps "//conv_to_string(current_state%timestep))
56 call log_log(log_info,
"Completed "//trim(conv_to_string((current_state%timestep-previous_ts)+1))//&
57 " timesteps in "//trim(conv_to_string(int((end_time-start_time) * 1000)))//
"ms")
58 call log_log(log_info,
"Model time "//trim(conv_to_string(current_state%time, 5))//
" seconds; dtm="//&
59 trim(conv_to_string(current_state%dtm, 5)))
60 previous_ts=current_state%timestep
61 start_time=mpi_wtime()
◆ previous_ts
integer modelsynopsis_mod::previous_ts |
|
private |
Definition at line 17 of file modelsynopsis.F90.
17 integer :: previous_ts, reporting_frequency
◆ reporting_frequency
integer modelsynopsis_mod::reporting_frequency |
|
private |
◆ start_time
double precision modelsynopsis_mod::start_time |
|
private |