c-----------------------------------------------------------------------
c FORTRAN 77 utility routines for tranport code
c-----------------------------------------------------------------------
c Routine to read in grid properties and initial data parameters
c
subroutine readinput(nx, ny, xmin, xmax, ymin, ymax,
. cfl,
. niters, ml, thresh, re, mineff,
. bufw, blkw, oe)
implicit none
integer nx, ny
real*8 xmin, xmax, ymin, ymax,
. cfl, thresh,
. mineff
integer niters, ml, re, bufw, blkw, oe, d, li
integer chk
c Open file and read in parameters
open(unit=1,file='input.par')
read(1,*)nx, ny
read(1,*)xmin, xmax
read(1,*)ymin, ymax
read(1,*)cfl
read(1,*)niters
read(1,*)ml
read(1,*)thresh
read(1,*)re
read(1,*)mineff
read(1,*)bufw
read(1,*)blkw
read(1,*)oe
close(unit=1)
return
end
c-----------------------------------------------------------------------
c-----------------------------------------------------------------------
subroutine pythnorm(lb, ub, shape, truncU, truncerr,
. wgtu)
c-----------------------------------------------------------------------
implicit none
integer lb(2), ub(2), shape(2)
real*8 truncU(shape(1), shape(2)),
. truncerr(shape(1), shape(2))
real*8 wgtu
c Local variables
integer i, j
do i = 1, shape(1)
do j = 1, shape(2)
truncerr(i,j) = sqrt( wgtu * truncU(i,j)**2 )
end do
end do
return
end
c-----------------------------------------------------------------------