43 character(len=20) :: var
56 subroutine set_infovar(v,vname,vtype,vval,vbound,xpos,ypos,vpid,vpt,vlay)
58 character(len=20) :: vname
59 integer,
intent(in) :: vtype
60 real(sp),
intent(in) :: vval
61 real(sp),
intent(in) :: vbound
62 real(sp),
intent(in) :: xpos
63 real(sp),
intent(in) :: ypos
64 integer,
intent(in) :: vpid
65 integer,
intent(in) :: vpt
66 integer,
intent(in) :: vlay
82 integer,
intent(in) :: iunit
84 write(iunit,*)
'variable: ',trim(v%var)
86 write(iunit,*)
'type : node' 88 write(iunit,*)
'type : elem' 90 write(iunit,*)
'value : ',v%val
91 write(iunit,*)
'bound : ',v%bnd
92 write(iunit,*)
'x-pos : ',v%xpos
93 write(iunit,*)
'y-pos : ',v%ypos
95 write(iunit,*)
'vertex : ',v%pt
97 write(iunit,*)
'cell : ',v%pt
99 write(iunit,*)
'prod id : ',v%pid
100 write(iunit,*)
'layer : ',v%lay
123 write(ipt,*)
'bounds checking : on' 124 write(ipt,*)
'checking interval: ',chk_interval
125 write(ipt,*)
'veloc_mag_max : ',veloc_mag_max
126 write(ipt,*)
'zeta_mag_max : ',zeta_mag_max
127 write(ipt,*)
'temp_max : ',temp_max
128 write(ipt,*)
'temp_min : ',temp_min
129 write(ipt,*)
'salt_max : ',salt_max
130 write(ipt,*)
'salt_min : ',salt_min
134 allocate(
vlist(nvars))
152 type(
infovar),
allocatable :: vlist_global(:)
153 integer :: icnt,pt,lay,i,j,k,nviolations,printproc,ierr
156 integer,
allocatable :: violations(:),tmp(:)
157 character(len=20) :: vname
161 if(.not.boundschk_on)
return 162 if(mod(iiint,chk_interval)/= 0)
return 164 allocate(tmp(nprocs))
173 val = maxval(abs(
ua(1:n)))
174 if(val > veloc_mag_max)
then 177 vname =
'vert-averaged u' 179 if(abs(
ua(i)) > veloc_mag_max)
then 189 val = maxval(abs(
va(1:n)))
190 if(val > veloc_mag_max)
then 193 vname =
'vert-averaged v' 195 if(abs(
va(i)) > veloc_mag_max)
then 205 val = maxval(abs(
u(1:n,1:kbm1)))
206 if(val > veloc_mag_max)
then 212 if(abs(
u(i,k)) > veloc_mag_max)
then 224 if(.not. barotropic)
then 227 val = maxval(
s1(1:m,1:kbm1))
228 if(val > salt_max)
then 232 smaxloop:
do k=1,kbm1
234 if(
s1(i,k) > salt_max)
then 246 val = minval(
s1(1:m,1:kbm1))
247 if(val < salt_min)
then 251 sminloop:
do k=1,kbm1
253 if(
s1(i,k) < salt_min)
then 265 val = maxval(
t1(1:m,1:kbm1))
266 if(val > temp_max)
then 269 vname =
'temperature' 270 tmaxloop:
do k=1,kbm1
272 if(
t1(i,k) > temp_max)
then 284 val = minval(
t1(1:m,1:kbm1))
285 if(val < temp_min)
then 288 vname =
'temperature' 289 tminloop:
do k=1,kbm1
291 if(
t1(i,k) < temp_min)
then 317 if(sum(tmp) == 0)
then 332 if(printproc==myid)
then 333 write(ipt,*)
'WARNING: Variable(s) have exceeded user-defined thresholds' 337 write(ipt,*)
'ARCHIVING FRAME AND HALTING' 341 force_archive = .true.
subroutine set_infovar(v, vname, vtype, vval, vbound, xpos, ypos, vpid, vpt, vlay)
real(sp), dimension(:), allocatable, target va
real(sp), dimension(:), allocatable, target yc
real(sp), dimension(:,:), allocatable, target t1
real(sp), dimension(:,:), allocatable, target u
type(infovar), dimension(:), allocatable vlist
real(sp), dimension(:,:), allocatable, target s1
subroutine setup_boundschk
real(sp), dimension(:), allocatable, target vx
subroutine print_infovar(v, iunit)
real(sp), dimension(:), allocatable, target vy
real(sp), dimension(:), allocatable, target ua
real(sp), dimension(:), allocatable, target xc
integer, dimension(:), pointer ngid
integer, dimension(:), pointer egid