Go to the documentation of this file.
6 use mpp_mod,
only : mpp_error, note, warning, fatal
7 use mpp_mod,
only : mpp_pe, mpp_root_pe, stdlog, stdout
9 implicit none ;
private
47 if (mpp_pe() == mpp_root_pe())
is_root_pe = .true.
52 subroutine mom_mesg(message, verb, all_print)
53 character(len=*),
intent(in) :: message
54 integer,
optional,
intent(in) :: verb
55 logical,
optional,
intent(in) :: all_print
62 if (
present(all_print)) write_msg = write_msg .or. all_print
64 verb_msg = 2 ;
if (
present(verb)) verb_msg = verb
65 if (write_msg .and. (
verbosity >= verb_msg))
call mpp_error(note, message)
71 subroutine mom_error(level, message, all_print)
72 integer,
intent(in) :: level
73 character(len=*),
intent(in) :: message
74 logical,
optional,
intent(in) :: all_print
81 if (
present(all_print)) write_msg = write_msg .or. all_print
85 if (write_msg.and.
verbosity>=2)
call mpp_error(note, message)
87 if (write_msg.and.
verbosity>=1)
call mpp_error(warning, message)
89 if (
verbosity>=0)
call mpp_error(fatal, message)
91 call mpp_error(level, message)
97 integer,
intent(in) :: verb
98 character(len=80) :: msg
99 if (verb>0 .and. verb<10)
then
102 write(msg(1:80),
'("Attempt to set verbosity outside of range (0-9). verb=",I0)') verb
116 integer,
intent(in) :: verb
130 character(len=*),
intent(in) :: mesg
131 integer,
optional,
intent(in) :: n
133 character(len=8) :: nasstring
139 write(nasstring(1:8),
'(i8)') n
140 call mpp_error(note,
'callTree: '// &
143 call mpp_error(note,
'callTree: '// &
151 character(len=*) :: mesg
155 if (
is_root_pe())
call mpp_error(note,
'callTree: '// &
161 character(len=*),
intent(in) :: mesg
162 integer,
optional,
intent(in) :: n
164 character(len=8) :: nasstring
170 write(nasstring(1:8),
'(i8)') n
171 call mpp_error(note,
'callTree: '// &
174 call mpp_error(note,
'callTree: '// &
181 subroutine assert(logical_arg, msg)
182 logical,
intent(in) :: logical_arg
183 character(len=*),
intent(in) :: msg
185 if (.not. logical_arg)
then
subroutine, public mom_mesg(message, verb, all_print)
This provides a convenient interface for writing an informative comment.
logical function, public mom_verbose_enough(verb)
This tests whether the level of verbosity filtering MOM error messages is sufficient to write a messa...
integer calltreeindentlevel
The level of calling within the call tree.
subroutine, public calltree_leave(mesg)
Writes a message about leaving a subroutine if call tree reporting is active.
integer function, public mom_get_verbosity()
This subroutine gets the level of verbosity filtering MOM error messages.
subroutine, public mom_set_verbosity(verb)
This subroutine sets the level of verbosity filtering MOM error messages.
logical function, public is_root_pe()
This returns .true. if the current PE is the root PE.
subroutine, public assert(logical_arg, msg)
Issues a FATAL error if the assertion fails, i.e. the first argument is false.
integer verbosity
Verbosity level: 0 - FATAL messages only 1 - FATAL + WARNING messages only 2 - FATAL + WARNING + NOTE...
logical function, public calltree_showquery()
Returns True, if the verbosity>=6 indicating to show the call tree.
subroutine, public mom_error(level, message, all_print)
This provides a convenient interface for writing an mpp_error message with run-time filter based on a...
subroutine, public calltree_waypoint(mesg, n)
Writes a message about reaching a milestone if call tree reporting is active.
Routines for error handling and I/O management.
subroutine, public calltree_enter(mesg, n)
Writes a message about entering a subroutine if call tree reporting is active.