Go to the documentation of this file.
36 end interface valcheck
65 integer,
intent(in) :: current_line
66 real(
rp),
intent(in) :: v
72 log_error(
"CHECK",*)
'uninitialized value at line:', current_line
96 integer ,
intent(in) :: KA, KS, KE
97 real(RP),
intent(in) :: var(KA)
98 real(RP),
intent(in) :: valmin
99 real(RP),
intent(in) :: valmax
100 character(len=*),
intent(in) :: varname
101 character(len=*),
intent(in) :: current_file
102 integer,
intent(in) :: current_line
104 logical,
intent(in),
optional :: mask(KA)
106 logical :: invalid_value
114 invalid_value = .false.
115 if (
present(mask) )
then
118 if ( .not. mask(k) ) cycle
119 if ( var(k)*0.0_rp /= 0.0_rp &
120 .OR. var(k) < valmin &
121 .OR. var(k) > valmax )
then
122 invalid_value = .true.
128 if ( var(k)*0.0_rp /= 0.0_rp &
129 .OR. var(k) < valmin &
130 .OR. var(k) > valmax )
then
131 invalid_value = .true.
137 if ( invalid_value )
then
138 log_error(
"VALCHECK_1D",*)
'invalid value): ', trim(varname), &
140 log_error_cont(*)
'in file : ', trim(current_file),
', at line : ', current_line
152 IA, IS, IE, JA, JS, JE, &
164 integer ,
intent(in) :: IA, IS, IE
165 integer ,
intent(in) :: JA, JS, JE
166 real(RP),
intent(in) :: var(IA,JA)
167 real(RP),
intent(in) :: valmin
168 real(RP),
intent(in) :: valmax
169 character(len=*),
intent(in) :: varname
170 character(len=*),
intent(in) :: current_file
171 integer,
intent(in) :: current_line
173 logical,
intent(in),
optional :: mask(IA,JA)
175 logical :: invalid_value
183 invalid_value = .false.
184 if (
present(mask) )
then
188 if ( .not. mask(i,j) ) cycle
189 if ( var(i,j)*0.0_rp /= 0.0_rp &
190 .OR. var(i,j) < valmin &
191 .OR. var(i,j) > valmax )
then
192 invalid_value = .true.
200 if ( var(i,j)*0.0_rp /= 0.0_rp &
201 .OR. var(i,j) < valmin &
202 .OR. var(i,j) > valmax )
then
203 invalid_value = .true.
210 if ( invalid_value )
then
211 log_error(
"VALCHECK_2D",*)
'invalid value:', trim(varname), &
212 '(', i,
',', j,
')=', var(i,j)
213 log_error_cont(*)
'in file : ', trim(current_file),
', at line : ', current_line
239 integer ,
intent(in) :: KA, KS, KE
240 integer ,
intent(in) :: IA, IS, IE
241 integer ,
intent(in) :: JA, JS, JE
242 real(RP),
intent(in) :: var(KA,IA,JA)
243 real(RP),
intent(in) :: valmin
244 real(RP),
intent(in) :: valmax
245 character(len=*),
intent(in) :: varname
246 character(len=*),
intent(in) :: current_file
247 integer,
intent(in) :: current_line
249 logical,
intent(in),
optional :: mask(IA,JA)
251 logical :: invalid_value
259 invalid_value = .false.
260 if (
present(mask) )
then
264 if ( .not. mask(i,j) ) cycle
266 if ( var(k,i,j)*0.0_rp /= 0.0_rp &
267 .OR. var(k,i,j) < valmin &
268 .OR. var(k,i,j) > valmax )
then
269 invalid_value = .true.
279 if ( var(k,i,j)*0.0_rp /= 0.0_rp &
280 .OR. var(k,i,j) < valmin &
281 .OR. var(k,i,j) > valmax )
then
282 invalid_value = .true.
290 if ( invalid_value )
then
291 log_error(
"VALCHECK_3D",*)
'Invalid value:', trim(varname), &
292 '(', k,
',', i,
',', j,
')=', var(k,i,j)
293 log_error_cont(*)
'in file : ', trim(current_file),
', at line : ', current_line
subroutine, public prc_abort
Abort Process.
subroutine, public prof_rapstart(rapname_base, level, disable_barrier)
Start raptime.
subroutine valcheck_1d(KA, KS, KE, var, valmin, valmax, varname, current_file, current_line, mask)
Nan & extreme value checker (1D)
integer, public prc_myrank
process num in local communicator
subroutine valcheck_2d(IA, IS, IE, JA, JS, JE, var, valmin, valmax, varname, current_file, current_line, mask)
Nan & extreme value checker (2D)
integer, parameter, public rp
subroutine, public check(current_line, v)
Undefined value checker.
subroutine valcheck_3d(KA, KS, KE, IA, IS, IE, JA, JS, JE, var, valmin, valmax, varname, current_file, current_line, mask)
Nan & extreme value checker (3D)
subroutine, public prof_rapend(rapname_base, level, disable_barrier)
Save raptime.
real(rp), public const_undef
integer, public debug_domain_num