13 use mpp_mod
, only : mpp_error, note, warning, fatal
14 use mpp_mod
, only : mpp_pe, mpp_root_pe, stdlog, stdout
16 implicit none ;
private 52 if (mpp_pe() == mpp_root_pe()) is_root_pe = .true.
56 subroutine mom_mesg(message, verb, all_print)
57 character(len=*),
intent(in) :: message
58 integer,
optional,
intent(in) :: verb
59 logical,
optional,
intent(in) :: all_print
65 if (
present(all_print)) write_msg = write_msg .or. all_print
67 verb_msg = 2 ;
if (
present(verb)) verb_msg = verb
68 if (write_msg .and. (
verbosity >= verb_msg))
call mpp_error(note, message)
72 subroutine mom_error(level, message, all_print)
73 integer,
intent(in) :: level
74 character(len=*),
intent(in) :: message
75 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)
96 integer,
intent(in) :: verb
97 character(len=80) :: msg
98 if (verb>0 .and. verb<10)
then 101 write(msg(1:80),
'("Attempt to set verbosity outside of range (0-9). verb=",I0)') verb
107 integer :: MOM_get_verbosity
112 integer,
intent(in) :: verb
113 logical :: MOM_verbose_enough
120 logical :: callTree_showQuery
126 character(len=*) :: mesg
127 integer,
optional :: n
129 character(len=8) :: nAsString
135 write(nasstring(1:8),
'(i8)') n
136 call mpp_error(note,
'callTree: '// &
139 call mpp_error(note,
'callTree: '// &
147 character(len=*) :: mesg
151 if (
is_root_pe())
call mpp_error(note,
'callTree: '// &
157 character(len=*) :: mesg
158 integer,
optional :: n
160 character(len=8) :: nAsString
166 write(nasstring(1:8),
'(i8)') n
167 call mpp_error(note,
'callTree: '// &
170 call mpp_error(note,
'callTree: '// &
177 subroutine assert(logical_arg, msg)
178 logical,
intent(in) :: logical_arg
179 character(len=*),
intent(in) :: msg
181 if (.not. logical_arg)
then
integer function, public mom_get_verbosity()
logical function, public mom_verbose_enough(verb)
subroutine, public calltree_leave(mesg)
Writes a message about leaving a subroutine if call tree reporting is active.
integer calltreeindentlevel
subroutine, public calltree_waypoint(mesg, n)
Writes a message about reaching a milestone if call tree reporting is active.
logical function, public is_root_pe()
subroutine, public assert(logical_arg, msg)
Issues a FATAL error if the assertion fails, i.e. the first argument is false.
subroutine, public mom_set_verbosity(verb)
subroutine, public mom_mesg(message, verb, all_print)
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)
subroutine, public calltree_enter(mesg, n)
Writes a message about entering a subroutine if call tree reporting is active.