35 end interface valcheck
64 integer,
intent(in) :: current_line
65 real(RP),
intent(in) :: v
71 write(*,*)
'xxx uninitialized value at line:', current_line
94 real(RP),
intent(in) :: var(:)
95 real(RP),
intent(in) :: valmin
96 real(RP),
intent(in) :: valmax
97 character(len=*),
intent(in) :: varname
98 character(len=*),
intent(in) :: current_file
99 integer,
intent(in) :: current_line
101 logical :: invalid_value
102 integer :: k, kstr, kend
107 kstr = lbound( var(:), 1 )
108 kend = ubound( var(:), 1 )
110 invalid_value = .false.
112 if ( var(k)*0.0_rp /= 0.0_rp &
113 .OR. var(k) < valmin &
114 .OR. var(k) > valmax )
then 115 invalid_value = .true.
120 if ( invalid_value )
then 121 write(*,*)
'xxx [VALCHECK_1D] invalid value:', trim(varname), &
123 write(*,*)
'xxx in file : ', trim(current_file),
', at line : ', current_line
147 real(RP),
intent(in) :: var(:,:)
148 real(RP),
intent(in) :: valmin
149 real(RP),
intent(in) :: valmax
150 character(len=*),
intent(in) :: varname
151 character(len=*),
intent(in) :: current_file
152 integer,
intent(in) :: current_line
154 logical :: invalid_value
155 integer :: k, kstr, kend
156 integer :: i, istr, iend
161 kstr = lbound( var(:,:), 1 )
162 kend = ubound( var(:,:), 1 )
164 istr = lbound( var(:,:), 2 )
165 iend = ubound( var(:,:), 2 )
167 invalid_value = .false.
168 outer:
do i = istr, iend
170 if ( var(k,i)*0.0_rp /= 0.0_rp &
171 .OR. var(k,i) < valmin &
172 .OR. var(k,i) > valmax )
then 173 invalid_value = .true.
179 if ( invalid_value )
then 180 write(*,*)
'xxx [VALCHECK_2D] invalid value:', trim(varname), &
181 '(',
prc_myrank,
',', k,
',', i,
')=', var(k,i)
182 write(*,*)
'xxx in file : ', trim(current_file),
', at line : ', current_line
206 real(RP),
intent(in) :: var(:,:,:)
207 real(RP),
intent(in) :: valmin
208 real(RP),
intent(in) :: valmax
209 character(len=*),
intent(in) :: varname
210 character(len=*),
intent(in) :: current_file
211 integer,
intent(in) :: current_line
213 logical :: invalid_value
214 integer :: k, kstr, kend
215 integer :: i, istr, iend
216 integer :: j, jstr, jend
221 kstr = lbound( var(:,:,:), 1 )
222 kend = ubound( var(:,:,:), 1 )
224 istr = lbound( var(:,:,:), 2 )
225 iend = ubound( var(:,:,:), 2 )
227 jstr = lbound( var(:,:,:), 3 )
228 jend = ubound( var(:,:,:), 3 )
230 invalid_value = .false.
231 outer:
do j = jstr, jend
234 if ( var(k,i,j)*0.0_rp /= 0.0_rp &
235 .OR. var(k,i,j) < valmin &
236 .OR. var(k,i,j) > valmax )
then 237 invalid_value = .true.
244 if ( invalid_value )
then 245 write(*,*)
'xxx [VALCHECK_3D] Invalid value:', trim(varname), &
246 '(',
prc_myrank,
',', k,
',', i,
',', j,
')=', var(k,i,j)
247 write(*,*)
'xxx in file : ', trim(current_file),
', at line : ', current_line
subroutine valcheck_1d(var, valmin, valmax, varname, current_file, current_line)
Nan & extreme value checker (1D)
subroutine, public prc_mpistop
Abort MPI.
subroutine valcheck_2d(var, valmin, valmax, varname, current_file, current_line)
Nan & extreme value checker (2D)
subroutine, public check(current_line, v)
Undefined value checker.
real(rp), public const_undef
subroutine valcheck_3d(var, valmin, valmax, varname, current_file, current_line)
Nan & extreme value checker (3D)
integer, public prc_myrank
process num in local communicator
subroutine, public prof_rapstart(rapname_base, level)
Start raptime.
integer, public debug_domain_num
subroutine, public prof_rapend(rapname_base, level)
Save raptime.